diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index d4453b1cf..c943c7f36 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -167,7 +167,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -201,7 +203,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -245,7 +249,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -438,7 +444,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -472,7 +480,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -516,7 +526,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -743,7 +755,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -777,7 +791,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -849,6 +865,286 @@ ] } }, + "/call/{id}/mono-recording": { + "get": { + "operationId": "CallArtifactController_monoRecordingDownload", + "summary": "Download Call Mono Recording", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Call ID", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "302": { + "description": "Redirect to a short-lived presigned URL for the recording." + }, + "401": { + "description": "Unauthorized — missing or invalid API token." + }, + "404": { + "description": "Artifact not found." + } + }, + "tags": [ + "Calls" + ], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/call/{id}/stereo-recording": { + "get": { + "operationId": "CallArtifactController_stereoRecordingDownload", + "summary": "Download Call Stereo Recording", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Call ID", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "302": { + "description": "Redirect to a short-lived presigned URL for the recording." + }, + "401": { + "description": "Unauthorized — missing or invalid API token." + }, + "404": { + "description": "Artifact not found." + } + }, + "tags": [ + "Calls" + ], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/call/{id}/video-recording": { + "get": { + "operationId": "CallArtifactController_videoRecordingDownload", + "summary": "Download Call Video Recording", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Call ID", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "302": { + "description": "Redirect to a short-lived presigned URL for the video." + }, + "401": { + "description": "Unauthorized — missing or invalid API token." + }, + "404": { + "description": "Artifact not found." + } + }, + "tags": [ + "Calls" + ], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/call/{id}/customer-recording": { + "get": { + "operationId": "CallArtifactController_customerRecordingDownload", + "summary": "Download Call Customer Recording", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Call ID", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "302": { + "description": "Redirect to a short-lived presigned URL for the recording." + }, + "401": { + "description": "Unauthorized — missing or invalid API token." + }, + "404": { + "description": "Artifact not found." + } + }, + "tags": [ + "Calls" + ], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/call/{id}/assistant-recording": { + "get": { + "operationId": "CallArtifactController_assistantRecordingDownload", + "summary": "Download Call Assistant Recording", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Call ID", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "302": { + "description": "Redirect to a short-lived presigned URL for the recording." + }, + "401": { + "description": "Unauthorized — missing or invalid API token." + }, + "404": { + "description": "Artifact not found." + } + }, + "tags": [ + "Calls" + ], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/call/{id}/pcap": { + "get": { + "operationId": "CallArtifactController_pcapDownload", + "summary": "Download Call Packet Capture (pcap)", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Call ID", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "302": { + "description": "Redirect to a short-lived presigned URL for the pcap file." + }, + "401": { + "description": "Unauthorized — missing or invalid API token." + }, + "404": { + "description": "Artifact not found." + } + }, + "tags": [ + "Calls" + ], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/call/{id}/call-logs": { + "get": { + "operationId": "CallArtifactController_callLogsDownload", + "summary": "Download Call Logs", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Call ID", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + }, + "302": { + "description": "Redirect to a short-lived presigned URL for the log file." + }, + "401": { + "description": "Unauthorized — missing or invalid API token." + }, + "404": { + "description": "Artifact not found." + } + }, + "tags": [ + "Calls" + ], + "security": [ + { + "bearer": [] + } + ] + } + }, "/chat": { "get": { "operationId": "ChatController_listChats", @@ -932,6 +1228,20 @@ "type": "string" } }, + { + "name": "sortBy", + "required": false, + "in": "query", + "description": "This is the column to sort by. Defaults to 'createdAt'.", + "schema": { + "enum": [ + "createdAt", + "duration", + "cost" + ], + "type": "string" + } + }, { "name": "limit", "required": false, @@ -1288,7 +1598,9 @@ "enum": [ "scheduled", "in-progress", - "ended" + "ended", + "cancelled", + "archived" ], "type": "string" } @@ -1316,6 +1628,20 @@ "type": "string" } }, + { + "name": "sortBy", + "required": false, + "in": "query", + "description": "This is the column to sort by. Defaults to 'createdAt'.", + "schema": { + "enum": [ + "createdAt", + "duration", + "cost" + ], + "type": "string" + } + }, { "name": "limit", "required": false, @@ -1430,22 +1756,23 @@ ] } }, - "/campaign/{id}": { - "get": { - "operationId": "CampaignController_findOne", - "summary": "Get Campaign", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "type": "string" + "/v2/campaign": { + "post": { + "operationId": "CampaignController_createV2", + "summary": "Create Campaign V2", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCampaignDTO" + } } } - ], + }, "responses": { - "200": { + "201": { "description": "", "content": { "application/json": { @@ -1465,36 +1792,169 @@ } ] }, - "patch": { - "operationId": "CampaignController_update", - "summary": "Update Campaign", + "get": { + "operationId": "CampaignController_findAllV2", + "summary": "List Campaigns V2", "parameters": [ { "name": "id", - "required": true, - "in": "path", + "required": false, + "in": "query", "schema": { "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateCampaignDTO" - } + }, + { + "name": "status", + "required": false, + "in": "query", + "schema": { + "enum": [ + "scheduled", + "in-progress", + "ended", + "cancelled", + "archived" + ], + "type": "string" + } + }, + { + "name": "page", + "required": false, + "in": "query", + "description": "This is the page number to return. Defaults to 1.", + "schema": { + "minimum": 1, + "type": "number" + } + }, + { + "name": "sortOrder", + "required": false, + "in": "query", + "description": "This is the sort order for pagination. Defaults to 'DESC'.", + "schema": { + "enum": [ + "ASC", + "DESC" + ], + "type": "string" + } + }, + { + "name": "sortBy", + "required": false, + "in": "query", + "description": "This is the column to sort by. Defaults to 'createdAt'.", + "schema": { + "enum": [ + "createdAt", + "duration", + "cost" + ], + "type": "string" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "description": "This is the maximum number of items to return. Defaults to 100.", + "schema": { + "minimum": 0, + "maximum": 1000, + "type": "number" + } + }, + { + "name": "createdAtGt", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is greater than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "createdAtLt", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is less than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "createdAtGe", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is greater than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "createdAtLe", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is less than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtGt", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is greater than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtLt", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is less than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtGe", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is greater than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtLe", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is less than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" } } - }, + ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Campaign" + "$ref": "#/components/schemas/CampaignPaginatedResponse" } } } @@ -1508,16 +1968,222 @@ "bearer": [] } ] - }, - "delete": { - "operationId": "CampaignController_remove", - "summary": "Delete Campaign", + } + }, + "/v2/campaign/{id}": { + "get": { + "operationId": "CampaignController_findOneV2", + "summary": "Get Campaign V2", "parameters": [ { "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Campaign" + } + } + } + } + }, + "tags": [ + "Campaigns" + ], + "security": [ + { + "bearer": [] + } + ] + }, + "patch": { + "operationId": "CampaignController_updateV2", + "summary": "Update Campaign", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "The unique identifier for the resource.", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCampaignDTO" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Campaign" + } + } + } + } + }, + "tags": [ + "Campaigns" + ], + "security": [ + { + "bearer": [] + } + ] + }, + "delete": { + "operationId": "CampaignController_removeV2", + "summary": "Delete Campaign", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "The unique identifier for the resource.", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Campaign" + } + } + } + } + }, + "tags": [ + "Campaigns" + ], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/campaign/{id}": { + "get": { + "operationId": "CampaignController_findOne", + "summary": "Get Campaign", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "The unique identifier for the resource.", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Campaign" + } + } + } + } + }, + "tags": [ + "Campaigns" + ], + "security": [ + { + "bearer": [] + } + ] + }, + "patch": { + "operationId": "CampaignController_update", + "summary": "Update Campaign", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "The unique identifier for the resource.", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateCampaignDTO" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Campaign" + } + } + } + } + }, + "tags": [ + "Campaigns" + ], + "security": [ + { + "bearer": [] + } + ] + }, + "delete": { + "operationId": "CampaignController_remove", + "summary": "Delete Campaign", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "The unique identifier for the resource.", + "schema": { + "format": "uuid", "type": "string" } } @@ -1672,6 +2338,18 @@ "in": "query", "schema": {} }, + { + "name": "squadOverrides", + "required": false, + "description": "These are the overrides applied when the call targets a `squadId`. Mirrors\nthe call-level `squadOverrides` — use this instead of `assistantOverrides`\nwhen the campaign or call is squad-based.", + "allOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides" + } + ], + "in": "query", + "schema": {} + }, { "required": false, "description": "This is the number of the customer.", @@ -1776,6 +2454,20 @@ "type": "string" } }, + { + "name": "sortBy", + "required": false, + "in": "query", + "description": "This is the column to sort by. Defaults to 'createdAt'.", + "schema": { + "enum": [ + "createdAt", + "duration", + "cost" + ], + "type": "string" + } + }, { "name": "limit", "required": false, @@ -1899,7 +2591,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -1933,7 +2627,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -1977,7 +2673,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -2294,6 +2992,20 @@ "type": "string" } }, + { + "name": "sortBy", + "required": false, + "in": "query", + "description": "This is the column to sort by. Defaults to 'createdAt'.", + "schema": { + "enum": [ + "createdAt", + "duration", + "cost" + ], + "type": "string" + } + }, { "name": "limit", "required": false, @@ -2417,7 +3129,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -2483,7 +3197,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -2590,7 +3306,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -3185,7 +3903,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -3344,7 +4064,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -3633,7 +4355,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -3827,7 +4551,16 @@ "get": { "operationId": "FileController_findAll", "summary": "List Files", - "parameters": [], + "parameters": [ + { + "name": "purpose", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -3862,7 +4595,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -3896,7 +4631,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -3940,7 +4677,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -4013,6 +4752,20 @@ "type": "string" } }, + { + "name": "sortBy", + "required": false, + "in": "query", + "description": "This is the column to sort by. Defaults to 'createdAt'.", + "schema": { + "enum": [ + "createdAt", + "duration", + "cost" + ], + "type": "string" + } + }, { "name": "limit", "required": false, @@ -4171,7 +4924,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -4205,7 +4960,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } }, @@ -4257,7 +5014,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -4450,6 +5209,20 @@ "type": "string" } }, + { + "name": "sortBy", + "required": false, + "in": "query", + "description": "This is the column to sort by. Defaults to 'createdAt'.", + "schema": { + "enum": [ + "createdAt", + "duration", + "cost" + ], + "type": "string" + } + }, { "name": "limit", "required": false, @@ -4573,7 +5346,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -4665,7 +5440,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -4721,7 +5498,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -4779,7 +5558,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -4970,6 +5751,20 @@ "type": "string" } }, + { + "name": "sortBy", + "required": false, + "in": "query", + "description": "This is the column to sort by. Defaults to 'createdAt'.", + "schema": { + "enum": [ + "createdAt", + "duration", + "cost" + ], + "type": "string" + } + }, { "name": "limit", "required": false, @@ -5093,7 +5888,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -5137,7 +5934,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -5171,7 +5970,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -5207,7 +6008,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -5241,7 +6044,9 @@ "name": "id", "required": true, "in": "path", + "description": "The unique identifier for the resource.", "schema": { + "format": "uuid", "type": "string" } } @@ -5343,265 +6148,293 @@ } }, { - "name": "limit", - "required": false, - "in": "query", - "description": "This is the maximum number of items to return. Defaults to 100.", - "schema": { - "minimum": 0, - "maximum": 1000, - "type": "number" - } - }, - { - "name": "createdAtGt", - "required": false, - "in": "query", - "description": "This will return items where the createdAt is greater than the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "createdAtLt", - "required": false, - "in": "query", - "description": "This will return items where the createdAt is less than the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "createdAtGe", - "required": false, - "in": "query", - "description": "This will return items where the createdAt is greater than or equal to the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "createdAtLe", - "required": false, - "in": "query", - "description": "This will return items where the createdAt is less than or equal to the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "updatedAtGt", - "required": false, - "in": "query", - "description": "This will return items where the updatedAt is greater than the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "updatedAtLt", - "required": false, - "in": "query", - "description": "This will return items where the updatedAt is less than the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "updatedAtGe", - "required": false, - "in": "query", - "description": "This will return items where the updatedAt is greater than or equal to the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "updatedAtLe", - "required": false, - "in": "query", - "description": "This will return items where the updatedAt is less than or equal to the specified value.", - "schema": { - "format": "date-time", - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvalRunPaginatedResponse" - } - } - } - } - }, - "tags": [ - "Eval" - ], - "security": [ - { - "bearer": [] - } - ] - } - }, - "/observability/scorecard/{id}": { - "get": { - "operationId": "ScorecardController_get", - "summary": "Get Scorecard", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Scorecard" - } - } - } - } - }, - "tags": [ - "Observability/Scorecard" - ], - "security": [ - { - "bearer": [] - } - ] - }, - "patch": { - "operationId": "ScorecardController_update", - "summary": "Update Scorecard", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateScorecardDTO" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Scorecard" - } - } - } - } - }, - "tags": [ - "Observability/Scorecard" - ], - "security": [ - { - "bearer": [] - } - ] - }, - "delete": { - "operationId": "ScorecardController_remove", - "summary": "Delete Scorecard", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Scorecard" - } - } - } - } - }, - "tags": [ - "Observability/Scorecard" - ], - "security": [ - { - "bearer": [] - } - ] - } - }, - "/observability/scorecard": { - "get": { - "operationId": "ScorecardController_getPaginated", - "summary": "List Scorecards", - "parameters": [ - { - "name": "id", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "page", + "name": "sortBy", "required": false, "in": "query", - "description": "This is the page number to return. Defaults to 1.", - "schema": { - "minimum": 1, - "type": "number" - } - }, - { - "name": "sortOrder", - "required": false, - "in": "query", - "description": "This is the sort order for pagination. Defaults to 'DESC'.", + "description": "This is the column to sort by. Defaults to 'createdAt'.", "schema": { "enum": [ - "ASC", - "DESC" + "createdAt", + "duration", + "cost" + ], + "type": "string" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "description": "This is the maximum number of items to return. Defaults to 100.", + "schema": { + "minimum": 0, + "maximum": 1000, + "type": "number" + } + }, + { + "name": "createdAtGt", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is greater than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "createdAtLt", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is less than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "createdAtGe", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is greater than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "createdAtLe", + "required": false, + "in": "query", + "description": "This will return items where the createdAt is less than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtGt", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is greater than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtLt", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is less than the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtGe", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is greater than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "updatedAtLe", + "required": false, + "in": "query", + "description": "This will return items where the updatedAt is less than or equal to the specified value.", + "schema": { + "format": "date-time", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalRunPaginatedResponse" + } + } + } + } + }, + "tags": [ + "Eval" + ], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/observability/scorecard/{id}": { + "get": { + "operationId": "ScorecardController_get", + "summary": "Get Scorecard", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Scorecard" + } + } + } + } + }, + "tags": [ + "Observability/Scorecard" + ], + "security": [ + { + "bearer": [] + } + ] + }, + "patch": { + "operationId": "ScorecardController_update", + "summary": "Update Scorecard", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateScorecardDTO" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Scorecard" + } + } + } + } + }, + "tags": [ + "Observability/Scorecard" + ], + "security": [ + { + "bearer": [] + } + ] + }, + "delete": { + "operationId": "ScorecardController_remove", + "summary": "Delete Scorecard", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Scorecard" + } + } + } + } + }, + "tags": [ + "Observability/Scorecard" + ], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/observability/scorecard": { + "get": { + "operationId": "ScorecardController_getPaginated", + "summary": "List Scorecards", + "parameters": [ + { + "name": "id", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "required": false, + "in": "query", + "description": "This is the page number to return. Defaults to 1.", + "schema": { + "minimum": 1, + "type": "number" + } + }, + { + "name": "sortOrder", + "required": false, + "in": "query", + "description": "This is the sort order for pagination. Defaults to 'DESC'.", + "schema": { + "enum": [ + "ASC", + "DESC" + ], + "type": "string" + } + }, + { + "name": "sortBy", + "required": false, + "in": "query", + "description": "This is the column to sort by. Defaults to 'createdAt'.", + "schema": { + "enum": [ + "createdAt", + "duration", + "cost" ], "type": "string" } @@ -5883,6 +6716,20 @@ "type": "string" } }, + { + "name": "sortBy", + "required": false, + "in": "query", + "description": "This is the column to sort by. Defaults to 'createdAt'.", + "schema": { + "enum": [ + "createdAt", + "duration", + "cost" + ], + "type": "string" + } + }, { "name": "limit", "required": false, @@ -6308,14 +7155,15 @@ { "$ref": "#/components/schemas/FallbackSonioxTranscriber", "title": "Soniox" + }, + { + "$ref": "#/components/schemas/FallbackXaiTranscriber", + "title": "xAI" } ] } } - }, - "required": [ - "transcribers" - ] + } }, "AssemblyAITranscriber": { "type": "object", @@ -6631,7 +7479,8 @@ "model": { "type": "string", "enum": [ - "ink-whisper" + "ink-whisper", + "ink-2" ] }, "language": { @@ -7008,7 +7857,8 @@ "base-voicemail", "base-video", "whisper", - "flux-general-en" + "flux-general-en", + "flux-general-multi" ] }, { @@ -7023,8 +7873,11 @@ "ar", "az", "ba", + "be", "bg", + "bn", "br", + "bs", "ca", "cs", "da", @@ -7054,6 +7907,7 @@ "he", "hi", "hi-Latn", + "hr", "hu", "id", "is", @@ -7067,6 +7921,7 @@ "lt", "lv", "mk", + "mr", "ms", "multi", "nl", @@ -7088,8 +7943,10 @@ "sv-SE", "ta", "taq", + "te", "th", "th-TH", + "tl", "tr", "tt", "uk", @@ -7125,6 +7982,29 @@ "description": "If set to true, Deepgram will replace profanity in transcripts with surrounding asterisks, e.g. \"f***\".\n\n@default false", "example": false }, + "redaction": { + "type": "array", + "description": "Enables redaction of sensitive information from transcripts.\n\nOptions include:\n- \"pci\": Redacts credit card numbers, expiration dates, and CVV.\n- \"pii\": Redacts personally identifiable information (names, locations, identifying numbers, etc.).\n- \"phi\": Redacts protected health information (medical conditions, drugs, injuries, etc.).\n- \"numbers\": Redacts numerical and identifying entities (dates, account numbers, SSNs, etc.).\n\nMultiple values can be provided to redact different categories simultaneously.\nRedacted content is replaced with entity labels like [CREDIT_CARD_1], [SSN_1], etc.\n\nSee https://developers.deepgram.com/docs/redaction for details.", + "enum": [ + "pci", + "pii", + "phi", + "numbers" + ], + "example": [ + "pci", + "phi" + ], + "items": { + "type": "string", + "enum": [ + "pci", + "pii", + "phi", + "numbers" + ] + } + }, "confidenceThreshold": { "type": "number", "description": "Transcripts below this confidence threshold will be discarded.\n\n@default 0.4", @@ -7132,13 +8012,6 @@ "maximum": 1, "example": 0.4 }, - "eagerEotThreshold": { - "type": "number", - "description": "Eager end-of-turn confidence required to fire a eager end-of-turn event. Setting a value here will enable EagerEndOfTurn and SpeechResumed events. It is disabled by default. Only used with Flux models.", - "minimum": 0, - "maximum": 1, - "example": 0.3 - }, "eotThreshold": { "type": "number", "description": "End-of-turn confidence required to finish a turn. Only used with Flux models.\n\n@default 0.7", @@ -7153,6 +8026,17 @@ "maximum": 10000, "example": 5000 }, + "languages": { + "description": "Language hints to bias Flux Multilingual (`flux-general-multi`) toward specific languages.\nProvide BCP-47 language codes (e.g. \"en\", \"es\", \"fr\"). Multiple hints can be given for\nmultilingual or code-switching scenarios. Omit for auto-detection. Only used with `flux-general-multi`.", + "example": [ + "en", + "es" + ], + "type": "array", + "items": { + "type": "string" + } + }, "keywords": { "description": "These keywords are passed to the transcription model to help it pick up use-case specific words. Anything that may not be a common word, like your company name, should be added here.", "type": "array", @@ -7201,6 +8085,7 @@ "description": "This is the model that will be used for the transcription.", "oneOf": [ { + "type": "string", "enum": [ "scribe_v1", "scribe_v2", @@ -7484,6 +8369,7 @@ "description": "This is the Gladia model that will be used. Default is 'fast'", "oneOf": [ { + "type": "string", "enum": [ "fast", "accurate", @@ -7611,109 +8497,112 @@ ] }, "languages": { - "type": "string", + "type": "array", "description": "Defines the languages to use for the transcription. Required when languageBehaviour is 'manual'.", - "enum": [ - "af", - "sq", - "am", - "ar", - "hy", - "as", - "az", - "ba", - "eu", - "be", - "bn", - "bs", - "br", - "bg", - "ca", - "zh", - "hr", - "cs", - "da", - "nl", - "en", - "et", - "fo", - "fi", - "fr", - "gl", - "ka", - "de", - "el", - "gu", - "ht", - "ha", - "haw", - "he", - "hi", - "hu", - "is", - "id", - "it", - "ja", - "jv", - "kn", - "kk", - "km", - "ko", - "lo", - "la", - "lv", - "ln", - "lt", - "lb", - "mk", - "mg", - "ms", - "ml", - "mt", - "mi", - "mr", - "mn", - "my", - "ne", - "no", - "nn", - "oc", - "ps", - "fa", - "pl", - "pt", - "pa", - "ro", - "ru", - "sa", - "sr", - "sn", - "sd", - "si", - "sk", - "sl", - "so", - "es", - "su", - "sw", - "sv", - "tl", - "tg", - "ta", - "tt", - "te", - "th", - "bo", - "tr", - "tk", - "uk", - "ur", - "uz", - "vi", - "cy", - "yi", - "yo" - ] + "items": { + "type": "string", + "enum": [ + "af", + "sq", + "am", + "ar", + "hy", + "as", + "az", + "ba", + "eu", + "be", + "bn", + "bs", + "br", + "bg", + "ca", + "zh", + "hr", + "cs", + "da", + "nl", + "en", + "et", + "fo", + "fi", + "fr", + "gl", + "ka", + "de", + "el", + "gu", + "ht", + "ha", + "haw", + "he", + "hi", + "hu", + "is", + "id", + "it", + "ja", + "jv", + "kn", + "kk", + "km", + "ko", + "lo", + "la", + "lv", + "ln", + "lt", + "lb", + "mk", + "mg", + "ms", + "ml", + "mt", + "mi", + "mr", + "mn", + "my", + "ne", + "no", + "nn", + "oc", + "ps", + "fa", + "pl", + "pt", + "pa", + "ro", + "ru", + "sa", + "sr", + "sn", + "sd", + "si", + "sk", + "sl", + "so", + "es", + "su", + "sw", + "sv", + "tl", + "tg", + "ta", + "tt", + "te", + "th", + "bo", + "tr", + "tk", + "uk", + "ur", + "uz", + "vi", + "cy", + "yi", + "yo" + ] + } }, "transcriptionHint": { "type": "string", @@ -7792,6 +8681,27 @@ "provider" ] }, + "SonioxContextGeneralItem": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "The key describing the type of context (e.g., \"domain\", \"topic\", \"doctor\", \"organization\").", + "minLength": 1, + "example": "domain" + }, + "value": { + "type": "string", + "description": "The value for the context key (e.g., \"Healthcare\", \"Diabetes management consultation\").", + "minLength": 1, + "example": "Healthcare" + } + }, + "required": [ + "key", + "value" + ] + }, "SonioxTranscriber": { "type": "object", "properties": { @@ -7804,7 +8714,8 @@ "model": { "type": "string", "enum": [ - "stt-rt-v4" + "stt-rt-v4", + "stt-rt-v5" ], "description": "The Soniox model to use for transcription." }, @@ -7997,11 +8908,205 @@ "zh", "zu" ], - "description": "The language for transcription. Uses ISO 639-1 codes. Soniox supports 60+ languages with a single universal model." + "description": "Single language for transcription as an ISO 639-1 code (e.g., `en`, `es`). For multi-language hints or to enable Soniox auto-detect, use `languages` instead — when `languages` is set (including to an empty array), this field is ignored when building the Soniox request. Defaults to `en` if neither this nor `languages` is set." + }, + "languages": { + "type": "array", + "description": "Language hints sent to Soniox as `language_hints`. Provide `[lang1, lang2, ...]` (ISO 639-1 codes) to bias recognition toward specific languages, or provide an explicit empty array `[]` to enable Soniox auto-detect across all 60+ supported languages. When set (including the empty array), this field takes precedence over the singular `language` field. When omitted, falls back to the singular `language` (which defaults to `en` if also unset). Best accuracy is achieved with a single language.", + "items": { + "type": "string", + "enum": [ + "aa", + "ab", + "ae", + "af", + "ak", + "am", + "an", + "ar", + "as", + "av", + "ay", + "az", + "ba", + "be", + "bg", + "bh", + "bi", + "bm", + "bn", + "bo", + "br", + "bs", + "ca", + "ce", + "ch", + "co", + "cr", + "cs", + "cu", + "cv", + "cy", + "da", + "de", + "dv", + "dz", + "ee", + "el", + "en", + "eo", + "es", + "et", + "eu", + "fa", + "ff", + "fi", + "fj", + "fo", + "fr", + "fy", + "ga", + "gd", + "gl", + "gn", + "gu", + "gv", + "ha", + "he", + "hi", + "ho", + "hr", + "ht", + "hu", + "hy", + "hz", + "ia", + "id", + "ie", + "ig", + "ii", + "ik", + "io", + "is", + "it", + "iu", + "ja", + "jv", + "ka", + "kg", + "ki", + "kj", + "kk", + "kl", + "km", + "kn", + "ko", + "kr", + "ks", + "ku", + "kv", + "kw", + "ky", + "la", + "lb", + "lg", + "li", + "ln", + "lo", + "lt", + "lu", + "lv", + "mg", + "mh", + "mi", + "mk", + "ml", + "mn", + "mr", + "ms", + "mt", + "my", + "na", + "nb", + "nd", + "ne", + "ng", + "nl", + "nn", + "no", + "nr", + "nv", + "ny", + "oc", + "oj", + "om", + "or", + "os", + "pa", + "pi", + "pl", + "ps", + "pt", + "qu", + "rm", + "rn", + "ro", + "ru", + "rw", + "sa", + "sc", + "sd", + "se", + "sg", + "si", + "sk", + "sl", + "sm", + "sn", + "so", + "sq", + "sr", + "ss", + "st", + "su", + "sv", + "sw", + "ta", + "te", + "tg", + "th", + "ti", + "tk", + "tl", + "tn", + "to", + "tr", + "ts", + "tt", + "tw", + "ty", + "ug", + "uk", + "ur", + "uz", + "ve", + "vi", + "vo", + "wa", + "wo", + "xh", + "yi", + "yue", + "yo", + "za", + "zh", + "zu" + ] + } }, "languageHintsStrict": { "type": "boolean", - "description": "When enabled, restricts transcription to the language specified in the language field. When disabled, the model can detect and transcribe any of 60+ supported languages. Defaults to true." + "description": "When `true`, Soniox strictly restricts transcription to the languages in `languages` (or the singular `language` if `languages` is unset). When `false`, Soniox biases toward those languages but still allows transcription in other languages. Has no effect when no language hints are sent (e.g., `languages: []` for auto-detect). Defaults to `true` (strict mode)." }, "maxEndpointDelayMs": { "type": "number", @@ -8016,6 +9121,23 @@ "type": "string" } }, + "contextGeneral": { + "description": "General context key-value pairs that guide the AI model during transcription. Helps adapt vocabulary to the correct domain, improving accuracy. Recommended: 10 or fewer pairs. Maps to Soniox context.general.", + "example": [ + { + "key": "domain", + "value": "Healthcare" + }, + { + "key": "topic", + "value": "Diabetes management consultation" + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/SonioxContextGeneralItem" + } + }, "fallbackPlan": { "description": "This is the plan for transcriber provider fallbacks in the event that the primary transcriber provider fails.", "allOf": [ @@ -8381,6 +9503,8 @@ "type": "string", "description": "This is the model that will be used for the transcription.", "enum": [ + "gemini-3.5-flash", + "gemini-3.1-flash-lite", "gemini-3-flash-preview", "gemini-2.5-pro", "gemini-2.5-flash", @@ -8551,309 +9675,86 @@ "model" ] }, - "FallbackAssemblyAITranscriber": { + "XaiTranscriber": { "type": "object", "properties": { "provider": { "type": "string", - "description": "This is the transcription provider that will be used.", - "enum": [ - "assembly-ai" - ] - }, - "language": { - "type": "string", - "description": "This is the language that will be set for the transcription.", - "enum": [ - "multi", - "en" - ] - }, - "confidenceThreshold": { - "type": "number", - "description": "Transcripts below this confidence threshold will be discarded.\n\n@default 0.4", - "minimum": 0, - "maximum": 1, - "example": 0.4 - }, - "formatTurns": { - "type": "boolean", - "description": "This enables formatting of transcripts.\n\n@default true", - "example": true - }, - "endOfTurnConfidenceThreshold": { - "type": "number", - "description": "This is the end of turn confidence threshold. The minimum confidence that the end of turn is detected.\nNote: Only used if startSpeakingPlan.smartEndpointingPlan is not set.\n@min 0\n@max 1\n@default 0.7", - "minimum": 0, - "maximum": 1, - "example": 0.7 - }, - "minEndOfTurnSilenceWhenConfident": { - "type": "number", - "description": "This is the minimum end of turn silence when confident in milliseconds.\nNote: Only used if startSpeakingPlan.smartEndpointingPlan is not set.\n@default 160", - "minimum": 0, - "example": 160 - }, - "wordFinalizationMaxWaitTime": { - "type": "number", - "deprecated": true, - "minimum": 0, - "example": 160 - }, - "maxTurnSilence": { - "type": "number", - "description": "This is the maximum turn silence time in milliseconds.\nNote: Only used if startSpeakingPlan.smartEndpointingPlan is not set.\n@default 400", - "minimum": 0, - "example": 400 - }, - "vadAssistedEndpointingEnabled": { - "type": "boolean", - "description": "Use VAD to assist with endpointing decisions from the transcriber.\nWhen enabled, transcriber endpointing will be buffered if VAD detects the user is still speaking, preventing premature turn-taking.\nWhen disabled, transcriber endpointing will be used immediately regardless of VAD state, allowing for quicker but more aggressive turn-taking.\nNote: Only used if startSpeakingPlan.smartEndpointingPlan is not set.\n\n@default true", - "example": true - }, - "speechModel": { - "type": "string", - "description": "This is the speech model used for the streaming session.\nNote: Keyterms prompting is not supported with multilingual streaming.\n@default 'universal-streaming-english'", "enum": [ - "universal-streaming-english", - "universal-streaming-multilingual" + "xai" ] }, - "realtimeUrl": { - "type": "string", - "description": "The WebSocket URL that the transcriber connects to." - }, - "wordBoost": { - "description": "Add up to 2500 characters of custom vocabulary.", - "type": "array", - "items": { - "type": "string", - "maxLength": 2500 - } - }, - "keytermsPrompt": { - "description": "Keyterms prompting improves recognition accuracy for specific words and phrases.\nCan include up to 100 keyterms, each up to 50 characters.\nCosts an additional $0.04/hour when enabled.", - "type": "array", - "items": { - "type": "string", - "maxLength": 50 - } - }, - "endUtteranceSilenceThreshold": { - "type": "number", - "description": "The duration of the end utterance silence threshold in milliseconds." - }, - "disablePartialTranscripts": { - "type": "boolean", - "description": "Disable partial transcripts.\nSet to `true` to not receive partial transcripts. Defaults to `false`." - } - }, - "required": [ - "provider" - ] - }, - "FallbackAzureSpeechTranscriber": { - "type": "object", - "properties": { - "provider": { + "model": { "type": "string", - "description": "This is the transcription provider that will be used.", + "description": "The xAI speech-to-text model to use. xAI currently exposes a single STT model — placeholder for future model selection.", "enum": [ - "azure" + "default" ] }, "language": { "type": "string", - "description": "This is the language that will be set for the transcription. The list of languages Azure supports can be found here: https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support?tabs=stt", + "description": "Single language for transcription as an ISO 639-1 code (e.g., `en`, `es`). Defaults to `en` if not set. xAI auto-detects when omitted via the API but Vapi defaults to English for deterministic behavior.", "enum": [ - "af-ZA", - "am-ET", - "ar-AE", - "ar-BH", - "ar-DZ", - "ar-EG", - "ar-IL", - "ar-IQ", - "ar-JO", - "ar-KW", - "ar-LB", - "ar-LY", - "ar-MA", - "ar-OM", - "ar-PS", - "ar-QA", - "ar-SA", - "ar-SY", - "ar-TN", - "ar-YE", - "az-AZ", - "bg-BG", - "bn-IN", - "bs-BA", - "ca-ES", - "cs-CZ", - "cy-GB", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AU", - "en-CA", - "en-GB", - "en-GH", - "en-HK", - "en-IE", - "en-IN", - "en-KE", - "en-NG", - "en-NZ", - "en-PH", - "en-SG", - "en-TZ", - "en-US", - "en-ZA", - "es-AR", - "es-BO", - "es-CL", - "es-CO", - "es-CR", - "es-CU", - "es-DO", - "es-EC", - "es-ES", - "es-GQ", - "es-GT", - "es-HN", - "es-MX", - "es-NI", - "es-PA", - "es-PE", - "es-PR", - "es-PY", - "es-SV", - "es-US", - "es-UY", - "es-VE", - "et-EE", - "eu-ES", - "fa-IR", - "fi-FI", - "fil-PH", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "ga-IE", - "gl-ES", - "gu-IN", - "he-IL", - "hi-IN", - "hr-HR", - "hu-HU", - "hy-AM", - "id-ID", - "is-IS", - "it-CH", - "it-IT", - "ja-JP", - "jv-ID", - "ka-GE", - "kk-KZ", - "km-KH", - "kn-IN", - "ko-KR", - "lo-LA", - "lt-LT", - "lv-LV", - "mk-MK", - "ml-IN", - "mn-MN", - "mr-IN", - "ms-MY", - "mt-MT", - "my-MM", - "nb-NO", - "ne-NP", - "nl-BE", - "nl-NL", - "pa-IN", - "pl-PL", - "ps-AF", - "pt-BR", - "pt-PT", - "ro-RO", - "ru-RU", - "si-LK", - "sk-SK", - "sl-SI", - "so-SO", - "sq-AL", - "sr-RS", - "sv-SE", - "sw-KE", - "sw-TZ", - "ta-IN", - "te-IN", - "th-TH", - "tr-TR", - "uk-UA", - "ur-IN", - "uz-UZ", - "vi-VN", - "wuu-CN", - "yue-CN", - "zh-CN", - "zh-CN-shandong", - "zh-CN-sichuan", - "zh-HK", - "zh-TW", - "zu-ZA" + "ar", + "cs", + "da", + "nl", + "en", + "fil", + "fr", + "de", + "hi", + "id", + "it", + "ja", + "ko", + "mk", + "ms", + "fa", + "pl", + "pt", + "ro", + "ru", + "es", + "sv", + "th", + "tr", + "vi" ] }, - "segmentationStrategy": { - "type": "string", - "description": "Controls how phrase boundaries are detected, enabling either simple time/silence heuristics or more advanced semantic segmentation.", - "enum": [ - "Default", - "Time", - "Semantic" + "fallbackPlan": { + "description": "This is the plan for transcriber provider fallbacks in the event that the primary transcriber provider fails.", + "allOf": [ + { + "$ref": "#/components/schemas/FallbackTranscriberPlan" + } ] - }, - "segmentationSilenceTimeoutMs": { - "type": "number", - "description": "Duration of detected silence after which the service finalizes a phrase. Configure to adjust sensitivity to pauses in speech.", - "minimum": 100, - "maximum": 5000 - }, - "segmentationMaximumTimeMs": { - "type": "number", - "description": "Maximum duration a segment can reach before being cut off when using time-based segmentation.", - "minimum": 20000, - "maximum": 70000 } }, "required": [ "provider" ] }, - "FallbackCartesiaTranscriber": { + "VapiTranscriber": { "type": "object", "properties": { "provider": { "type": "string", "enum": [ - "cartesia" + "vapi" ] }, - "model": { + "version": { "type": "string", + "description": "This is the version of the Vapi transcriber. Vapi manages the underlying\nmodel and routing. When omitted, the latest version is used.\n\nManaged version params are additive-only and `'latest'` is an auto-update\nchannel — see the param-evolution INVARIANT in `vapiManaged/types.ts`.", "enum": [ - "ink-whisper" + "latest", + "1" ] }, "language": { "type": "string", + "description": "This is the language for transcription as an ISO 639-1 code (e.g. `en`).\nSelecting a language locks transcription to it. For multiple languages,\nuse `languages` instead. When neither `language` nor `languages` is set,\nthe transcriber auto-detects the spoken language.", "enum": [ "aa", "ab", @@ -9041,280 +9942,10 @@ "zh", "zu" ] - } - }, - "required": [ - "provider" - ] - }, - "FallbackCustomTranscriber": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "description": "This is the transcription provider that will be used. Use `custom-transcriber` for providers that are not natively supported.", - "enum": [ - "custom-transcriber" - ] - }, - "server": { - "description": "This is where the transcription request will be sent.\n\nUsage:\n1. Vapi will initiate a websocket connection with `server.url`.\n\n2. Vapi will send an initial text frame with the sample rate. Format:\n```\n {\n \"type\": \"start\",\n \"encoding\": \"linear16\", // 16-bit raw PCM format\n \"container\": \"raw\",\n \"sampleRate\": {{sampleRate}},\n \"channels\": 2 // customer is channel 0, assistant is channel 1\n }\n```\n\n3. Vapi will send the audio data in 16-bit raw PCM format as binary frames.\n\n4. You can read the messages something like this:\n```\nws.on('message', (data, isBinary) => {\n if (isBinary) {\n pcmBuffer = Buffer.concat([pcmBuffer, data]);\n console.log(`Received PCM data, buffer size: ${pcmBuffer.length}`);\n } else {\n console.log('Received message:', JSON.parse(data.toString()));\n }\n});\n```\n\n5. You will respond with transcriptions as you have them. Format:\n```\n {\n \"type\": \"transcriber-response\",\n \"transcription\": \"Hello, world!\",\n \"channel\": \"customer\" | \"assistant\"\n }\n```", - "allOf": [ - { - "$ref": "#/components/schemas/Server" - } - ] - } - }, - "required": [ - "provider", - "server" - ] - }, - "FallbackDeepgramTranscriber": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "description": "This is the transcription provider that will be used.", - "enum": [ - "deepgram" - ] - }, - "model": { - "description": "This is the Deepgram model that will be used. A list of models can be found here: https://developers.deepgram.com/docs/models-languages-overview", - "oneOf": [ - { - "type": "string", - "enum": [ - "nova-3", - "nova-3-general", - "nova-3-medical", - "nova-2", - "nova-2-general", - "nova-2-meeting", - "nova-2-phonecall", - "nova-2-finance", - "nova-2-conversationalai", - "nova-2-voicemail", - "nova-2-video", - "nova-2-medical", - "nova-2-drivethru", - "nova-2-automotive", - "nova", - "nova-general", - "nova-phonecall", - "nova-medical", - "enhanced", - "enhanced-general", - "enhanced-meeting", - "enhanced-phonecall", - "enhanced-finance", - "base", - "base-general", - "base-meeting", - "base-phonecall", - "base-finance", - "base-conversationalai", - "base-voicemail", - "base-video", - "whisper", - "flux-general-en" - ] - }, - { - "type": "string" - } - ] - }, - "language": { - "type": "string", - "description": "This is the language that will be set for the transcription. The list of languages Deepgram supports can be found here: https://developers.deepgram.com/docs/models-languages-overview", - "enum": [ - "ar", - "az", - "ba", - "bg", - "br", - "ca", - "cs", - "da", - "da-DK", - "de", - "de-CH", - "el", - "en", - "en-AU", - "en-CA", - "en-GB", - "en-IE", - "en-IN", - "en-NZ", - "en-US", - "es", - "es-419", - "es-LATAM", - "et", - "eu", - "fa", - "fi", - "fr", - "fr-CA", - "ha", - "haw", - "he", - "hi", - "hi-Latn", - "hu", - "id", - "is", - "it", - "ja", - "jw", - "kn", - "ko", - "ko-KR", - "ln", - "lt", - "lv", - "mk", - "ms", - "multi", - "nl", - "nl-BE", - "no", - "pl", - "pt", - "pt-BR", - "pt-PT", - "ro", - "ru", - "sk", - "sl", - "sn", - "so", - "sr", - "su", - "sv", - "sv-SE", - "ta", - "taq", - "th", - "th-TH", - "tr", - "tt", - "uk", - "ur", - "vi", - "yo", - "zh", - "zh-CN", - "zh-HK", - "zh-Hans", - "zh-Hant", - "zh-TW" - ] - }, - "smartFormat": { - "type": "boolean", - "description": "This will be use smart format option provided by Deepgram. It's default disabled because it can sometimes format numbers as times but it's getting better.", - "example": false - }, - "mipOptOut": { - "type": "boolean", - "description": "If set to true, this will add mip_opt_out=true as a query parameter of all API requests. See https://developers.deepgram.com/docs/the-deepgram-model-improvement-partnership-program#want-to-opt-out\n\nThis will only be used if you are using your own Deepgram API key.\n\n@default false", - "example": false, - "default": false - }, - "numerals": { - "type": "boolean", - "description": "If set to true, this will cause deepgram to convert spoken numbers to literal numerals. For example, \"my phone number is nine-seven-two...\" would become \"my phone number is 972...\"\n\n@default false", - "example": false - }, - "profanityFilter": { - "type": "boolean", - "description": "If set to true, Deepgram will replace profanity in transcripts with surrounding asterisks, e.g. \"f***\".\n\n@default false", - "example": false - }, - "confidenceThreshold": { - "type": "number", - "description": "Transcripts below this confidence threshold will be discarded.\n\n@default 0.4", - "minimum": 0, - "maximum": 1, - "example": 0.4 - }, - "eagerEotThreshold": { - "type": "number", - "description": "Eager end-of-turn confidence required to fire a eager end-of-turn event. Setting a value here will enable EagerEndOfTurn and SpeechResumed events. It is disabled by default. Only used with Flux models.", - "minimum": 0, - "maximum": 1, - "example": 0.3 - }, - "eotThreshold": { - "type": "number", - "description": "End-of-turn confidence required to finish a turn. Only used with Flux models.\n\n@default 0.7", - "minimum": 0.5, - "maximum": 0.9, - "example": 0.7 - }, - "eotTimeoutMs": { - "type": "number", - "description": "A turn will be finished when this much time has passed after speech, regardless of EOT confidence. Only used with Flux models.\n\n@default 5000", - "minimum": 500, - "maximum": 10000, - "example": 5000 - }, - "keywords": { - "description": "These keywords are passed to the transcription model to help it pick up use-case specific words. Anything that may not be a common word, like your company name, should be added here.", - "type": "array", - "items": { - "type": "string", - "pattern": "/^\\p{L}[\\p{L}\\d]*(?::[+-]?\\d+)?$/u" - } }, - "keyterm": { - "description": "Keyterm Prompting allows you improve Keyword Recall Rate (KRR) for important keyterms or phrases up to 90%.", + "languages": { "type": "array", - "items": { - "type": "string" - } - }, - "endpointing": { - "type": "number", - "description": "This is the timeout after which Deepgram will send transcription on user silence. You can read in-depth documentation here: https://developers.deepgram.com/docs/endpointing.\n\nHere are the most important bits:\n- Defaults to 10. This is recommended for most use cases to optimize for latency.\n- 10 can cause some missing transcriptions since because of the shorter context. This mostly happens for one-word utterances. For those uses cases, it's recommended to try 300. It will add a bit of latency but the quality and reliability of the experience will be better.\n- If neither 10 nor 300 work, contact support@vapi.ai and we'll find another solution.\n\n@default 10", - "minimum": 10, - "maximum": 500 - } - }, - "required": [ - "provider" - ] - }, - "FallbackElevenLabsTranscriber": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "description": "This is the transcription provider that will be used.", - "enum": [ - "11labs" - ] - }, - "model": { - "description": "This is the model that will be used for the transcription.", - "oneOf": [ - { - "enum": [ - "scribe_v1", - "scribe_v2", - "scribe_v2_realtime" - ] - } - ] - }, - "language": { - "type": "string", - "description": "This is the language that will be used for the transcription.", + "description": "These are the languages for transcription as ISO 639-1 codes. Set one or\nmore codes to restrict and bias recognition to those languages. An empty\narray `[]` (or omitting both this and `language`) enables auto-detection\nof the spoken language.", "enum": [ "aa", "ab", @@ -9501,399 +10132,519 @@ "za", "zh", "zu" - ] - }, - "silenceThresholdSeconds": { - "type": "number", - "description": "This is the number of seconds of silence before VAD commits (0.3-3.0).", - "minimum": 0.3, - "maximum": 3, - "example": 1.5 - }, - "confidenceThreshold": { - "type": "number", - "description": "This is the VAD sensitivity (0.1-0.9, lower indicates more sensitive).", - "minimum": 0.1, - "maximum": 0.9, - "example": 0.4 + ], + "items": { + "type": "string", + "enum": [ + "aa", + "ab", + "ae", + "af", + "ak", + "am", + "an", + "ar", + "as", + "av", + "ay", + "az", + "ba", + "be", + "bg", + "bh", + "bi", + "bm", + "bn", + "bo", + "br", + "bs", + "ca", + "ce", + "ch", + "co", + "cr", + "cs", + "cu", + "cv", + "cy", + "da", + "de", + "dv", + "dz", + "ee", + "el", + "en", + "eo", + "es", + "et", + "eu", + "fa", + "ff", + "fi", + "fj", + "fo", + "fr", + "fy", + "ga", + "gd", + "gl", + "gn", + "gu", + "gv", + "ha", + "he", + "hi", + "ho", + "hr", + "ht", + "hu", + "hy", + "hz", + "ia", + "id", + "ie", + "ig", + "ii", + "ik", + "io", + "is", + "it", + "iu", + "ja", + "jv", + "ka", + "kg", + "ki", + "kj", + "kk", + "kl", + "km", + "kn", + "ko", + "kr", + "ks", + "ku", + "kv", + "kw", + "ky", + "la", + "lb", + "lg", + "li", + "ln", + "lo", + "lt", + "lu", + "lv", + "mg", + "mh", + "mi", + "mk", + "ml", + "mn", + "mr", + "ms", + "mt", + "my", + "na", + "nb", + "nd", + "ne", + "ng", + "nl", + "nn", + "no", + "nr", + "nv", + "ny", + "oc", + "oj", + "om", + "or", + "os", + "pa", + "pi", + "pl", + "ps", + "pt", + "qu", + "rm", + "rn", + "ro", + "ru", + "rw", + "sa", + "sc", + "sd", + "se", + "sg", + "si", + "sk", + "sl", + "sm", + "sn", + "so", + "sq", + "sr", + "ss", + "st", + "su", + "sv", + "sw", + "ta", + "te", + "tg", + "th", + "ti", + "tk", + "tl", + "tn", + "to", + "tr", + "ts", + "tt", + "tw", + "ty", + "ug", + "uk", + "ur", + "uz", + "ve", + "vi", + "vo", + "wa", + "wo", + "xh", + "yi", + "yue", + "yo", + "za", + "zh", + "zu" + ] + } }, - "minSpeechDurationMs": { - "type": "number", - "description": "This is the minimum speech duration for VAD (50-2000ms).", - "minimum": 50, - "maximum": 2000, - "example": 100 + "keywords": { + "description": "These are custom keywords/vocabulary to boost recognition of use-case\nspecific words (company names, product names, jargon).", + "type": "array", + "items": { + "type": "string" + } }, - "minSilenceDurationMs": { - "type": "number", - "description": "This is the minimum silence duration for VAD (50-2000ms).", - "minimum": 50, - "maximum": 2000, - "example": 100 + "turnTaking": { + "type": "string", + "description": "This is the turn-taking mode. `intelligent` uses the underlying model's\nnative end-of-turn detection; `manual` ignores it and waits a fixed\nend-of-turn delay. Defaults to `intelligent`.", + "enum": [ + "intelligent", + "manual" + ] } }, "required": [ "provider" ] }, - "GladiaVocabularyItemDTO": { + "FallbackAssemblyAITranscriber": { "type": "object", "properties": { - "value": { + "provider": { "type": "string", - "description": "The vocabulary word or phrase" + "description": "This is the transcription provider that will be used.", + "enum": [ + "assembly-ai" + ] }, - "pronunciations": { - "description": "Alternative pronunciations for the vocabulary item", - "type": "array", - "items": { - "type": "string" - } + "language": { + "type": "string", + "description": "This is the language that will be set for the transcription.", + "enum": [ + "multi", + "en" + ] }, - "intensity": { + "confidenceThreshold": { "type": "number", + "description": "Transcripts below this confidence threshold will be discarded.\n\n@default 0.4", "minimum": 0, "maximum": 1, - "description": "Intensity for this specific vocabulary item (0.0 to 1.0)" + "example": 0.4 }, - "language": { + "formatTurns": { + "type": "boolean", + "description": "This enables formatting of transcripts.\n\n@default true", + "example": true + }, + "endOfTurnConfidenceThreshold": { + "type": "number", + "description": "This is the end of turn confidence threshold. The minimum confidence that the end of turn is detected.\nNote: Only used if startSpeakingPlan.smartEndpointingPlan is not set.\n@min 0\n@max 1\n@default 0.7", + "minimum": 0, + "maximum": 1, + "example": 0.7 + }, + "minEndOfTurnSilenceWhenConfident": { + "type": "number", + "description": "This is the minimum end of turn silence when confident in milliseconds.\nNote: Only used if startSpeakingPlan.smartEndpointingPlan is not set.\n@default 160", + "minimum": 0, + "example": 160 + }, + "wordFinalizationMaxWaitTime": { + "type": "number", + "deprecated": true, + "minimum": 0, + "example": 160 + }, + "maxTurnSilence": { + "type": "number", + "description": "This is the maximum turn silence time in milliseconds.\nNote: Only used if startSpeakingPlan.smartEndpointingPlan is not set.\n@default 400", + "minimum": 0, + "example": 400 + }, + "vadAssistedEndpointingEnabled": { + "type": "boolean", + "description": "Use VAD to assist with endpointing decisions from the transcriber.\nWhen enabled, transcriber endpointing will be buffered if VAD detects the user is still speaking, preventing premature turn-taking.\nWhen disabled, transcriber endpointing will be used immediately regardless of VAD state, allowing for quicker but more aggressive turn-taking.\nNote: Only used if startSpeakingPlan.smartEndpointingPlan is not set.\n\n@default true", + "example": true + }, + "speechModel": { "type": "string", - "description": "Language code for this vocabulary item (ISO 639-1)" + "description": "This is the speech model used for the streaming session.\nNote: Keyterms prompting is not supported with multilingual streaming.\n@default 'universal-streaming-english'", + "enum": [ + "universal-streaming-english", + "universal-streaming-multilingual" + ] + }, + "realtimeUrl": { + "type": "string", + "description": "The WebSocket URL that the transcriber connects to." + }, + "wordBoost": { + "description": "Add up to 2500 characters of custom vocabulary.", + "type": "array", + "items": { + "type": "string", + "maxLength": 2500 + } + }, + "keytermsPrompt": { + "description": "Keyterms prompting improves recognition accuracy for specific words and phrases.\nCan include up to 100 keyterms, each up to 50 characters.\nCosts an additional $0.04/hour when enabled.", + "type": "array", + "items": { + "type": "string", + "maxLength": 50 + } + }, + "endUtteranceSilenceThreshold": { + "type": "number", + "description": "The duration of the end utterance silence threshold in milliseconds." + }, + "disablePartialTranscripts": { + "type": "boolean", + "description": "Disable partial transcripts.\nSet to `true` to not receive partial transcripts. Defaults to `false`." } }, "required": [ - "value" + "provider" ] }, - "FallbackGladiaTranscriber": { + "FallbackAzureSpeechTranscriber": { "type": "object", "properties": { "provider": { "type": "string", "description": "This is the transcription provider that will be used.", "enum": [ - "gladia" - ] - }, - "model": { - "description": "This is the Gladia model that will be used. Default is 'fast'", - "oneOf": [ - { - "enum": [ - "fast", - "accurate", - "solaria-1" - ] - } - ] - }, - "languageBehaviour": { - "description": "Defines how the transcription model detects the audio language. Default value is 'automatic single language'.", - "oneOf": [ - { - "type": "string", - "enum": [ - "manual", - "automatic single language", - "automatic multiple languages" - ] - } + "azure" ] }, "language": { "type": "string", - "description": "Defines the language to use for the transcription. Required when languageBehaviour is 'manual'.", + "description": "This is the language that will be set for the transcription. The list of languages Azure supports can be found here: https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support?tabs=stt", "enum": [ - "af", - "sq", - "am", - "ar", - "hy", - "as", - "az", - "ba", - "eu", - "be", - "bn", - "bs", - "br", - "bg", - "ca", - "zh", - "hr", - "cs", - "da", - "nl", - "en", - "et", - "fo", - "fi", - "fr", - "gl", - "ka", - "de", - "el", - "gu", - "ht", - "ha", - "haw", - "he", - "hi", - "hu", - "is", - "id", - "it", - "ja", - "jv", - "kn", - "kk", - "km", - "ko", - "lo", - "la", - "lv", - "ln", - "lt", - "lb", - "mk", - "mg", - "ms", - "ml", - "mt", - "mi", - "mr", - "mn", - "my", - "ne", - "no", - "nn", - "oc", - "ps", - "fa", - "pl", - "pt", - "pa", - "ro", - "ru", - "sa", - "sr", - "sn", - "sd", - "si", - "sk", - "sl", - "so", - "es", - "su", - "sw", - "sv", - "tl", - "tg", - "ta", - "tt", - "te", - "th", - "bo", - "tr", - "tk", - "uk", - "ur", - "uz", - "vi", - "cy", - "yi", - "yo" + "af-ZA", + "am-ET", + "ar-AE", + "ar-BH", + "ar-DZ", + "ar-EG", + "ar-IL", + "ar-IQ", + "ar-JO", + "ar-KW", + "ar-LB", + "ar-LY", + "ar-MA", + "ar-OM", + "ar-PS", + "ar-QA", + "ar-SA", + "ar-SY", + "ar-TN", + "ar-YE", + "az-AZ", + "bg-BG", + "bn-IN", + "bs-BA", + "ca-ES", + "cs-CZ", + "cy-GB", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AU", + "en-CA", + "en-GB", + "en-GH", + "en-HK", + "en-IE", + "en-IN", + "en-KE", + "en-NG", + "en-NZ", + "en-PH", + "en-SG", + "en-TZ", + "en-US", + "en-ZA", + "es-AR", + "es-BO", + "es-CL", + "es-CO", + "es-CR", + "es-CU", + "es-DO", + "es-EC", + "es-ES", + "es-GQ", + "es-GT", + "es-HN", + "es-MX", + "es-NI", + "es-PA", + "es-PE", + "es-PR", + "es-PY", + "es-SV", + "es-US", + "es-UY", + "es-VE", + "et-EE", + "eu-ES", + "fa-IR", + "fi-FI", + "fil-PH", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "ga-IE", + "gl-ES", + "gu-IN", + "he-IL", + "hi-IN", + "hr-HR", + "hu-HU", + "hy-AM", + "id-ID", + "is-IS", + "it-CH", + "it-IT", + "ja-JP", + "jv-ID", + "ka-GE", + "kk-KZ", + "km-KH", + "kn-IN", + "ko-KR", + "lo-LA", + "lt-LT", + "lv-LV", + "mk-MK", + "ml-IN", + "mn-MN", + "mr-IN", + "ms-MY", + "mt-MT", + "my-MM", + "nb-NO", + "ne-NP", + "nl-BE", + "nl-NL", + "pa-IN", + "pl-PL", + "ps-AF", + "pt-BR", + "pt-PT", + "ro-RO", + "ru-RU", + "si-LK", + "sk-SK", + "sl-SI", + "so-SO", + "sq-AL", + "sr-RS", + "sv-SE", + "sw-KE", + "sw-TZ", + "ta-IN", + "te-IN", + "th-TH", + "tr-TR", + "uk-UA", + "ur-IN", + "uz-UZ", + "vi-VN", + "wuu-CN", + "yue-CN", + "zh-CN", + "zh-CN-shandong", + "zh-CN-sichuan", + "zh-HK", + "zh-TW", + "zu-ZA" ] }, - "languages": { + "segmentationStrategy": { "type": "string", - "description": "Defines the languages to use for the transcription. Required when languageBehaviour is 'manual'.", + "description": "Controls how phrase boundaries are detected, enabling either simple time/silence heuristics or more advanced semantic segmentation.", "enum": [ - "af", - "sq", - "am", - "ar", - "hy", - "as", - "az", - "ba", - "eu", - "be", - "bn", - "bs", - "br", - "bg", - "ca", - "zh", - "hr", - "cs", - "da", - "nl", - "en", - "et", - "fo", - "fi", - "fr", - "gl", - "ka", - "de", - "el", - "gu", - "ht", - "ha", - "haw", - "he", - "hi", - "hu", - "is", - "id", - "it", - "ja", - "jv", - "kn", - "kk", - "km", - "ko", - "lo", - "la", - "lv", - "ln", - "lt", - "lb", - "mk", - "mg", - "ms", - "ml", - "mt", - "mi", - "mr", - "mn", - "my", - "ne", - "no", - "nn", - "oc", - "ps", - "fa", - "pl", - "pt", - "pa", - "ro", - "ru", - "sa", - "sr", - "sn", - "sd", - "si", - "sk", - "sl", - "so", - "es", - "su", - "sw", - "sv", - "tl", - "tg", - "ta", - "tt", - "te", - "th", - "bo", - "tr", - "tk", - "uk", - "ur", - "uz", - "vi", - "cy", - "yi", - "yo" + "Default", + "Time", + "Semantic" ] }, - "transcriptionHint": { - "type": "string", - "description": "Provides a custom vocabulary to the model to improve accuracy of transcribing context specific words, technical terms, names, etc. If empty, this argument is ignored.\n⚠️ Warning ⚠️: Please be aware that the transcription_hint field has a character limit of 600. If you provide a transcription_hint longer than 600 characters, it will be automatically truncated to meet this limit.", - "maxLength": 600, - "example": "custom vocabulary" - }, - "prosody": { - "type": "boolean", - "description": "If prosody is true, you will get a transcription that can contain prosodies i.e. (laugh) (giggles) (malefic laugh) (toss) (music)… Default value is false.", - "example": false - }, - "audioEnhancer": { - "type": "boolean", - "description": "If true, audio will be pre-processed to improve accuracy but latency will increase. Default value is false.", - "example": false - }, - "confidenceThreshold": { - "type": "number", - "description": "Transcripts below this confidence threshold will be discarded.\n\n@default 0.4", - "minimum": 0, - "maximum": 1, - "example": 0.4 - }, - "endpointing": { + "segmentationSilenceTimeoutMs": { "type": "number", - "minimum": 0.01, - "maximum": 10, - "example": 0.05, - "description": "Endpointing time in seconds - time to wait before considering speech ended" + "description": "Duration of detected silence after which the service finalizes a phrase. Configure to adjust sensitivity to pauses in speech.", + "minimum": 100, + "maximum": 5000 }, - "speechThreshold": { + "segmentationMaximumTimeMs": { "type": "number", - "minimum": 0, - "maximum": 1, - "example": 0.6, - "description": "Speech threshold - sensitivity configuration for speech detection (0.0 to 1.0)" - }, - "customVocabularyEnabled": { - "type": "boolean", - "example": false, - "description": "Enable custom vocabulary for improved accuracy" - }, - "customVocabularyConfig": { - "description": "Custom vocabulary configuration", - "allOf": [ - { - "$ref": "#/components/schemas/GladiaCustomVocabularyConfigDTO" - } - ] - }, - "region": { - "type": "string", - "enum": [ - "us-west", - "eu-west" - ], - "description": "Region for processing audio (us-west or eu-west)", - "example": "us-west" - }, - "receivePartialTranscripts": { - "type": "boolean", - "example": false, - "description": "Enable partial transcripts for low-latency streaming transcription" + "description": "Maximum duration a segment can reach before being cut off when using time-based segmentation.", + "minimum": 20000, + "maximum": 70000 } }, "required": [ "provider" ] }, - "FallbackSonioxTranscriber": { + "FallbackCartesiaTranscriber": { "type": "object", "properties": { "provider": { "type": "string", "enum": [ - "soniox" + "cartesia" ] }, "model": { "type": "string", "enum": [ - "stt-rt-v4" - ], - "description": "The Soniox model to use for transcription." + "ink-whisper", + "ink-2" + ] }, "language": { "type": "string", @@ -10083,550 +10834,317 @@ "za", "zh", "zu" - ], - "description": "The language for transcription. Uses ISO 639-1 codes. Soniox supports 60+ languages with a single universal model." - }, - "languageHintsStrict": { - "type": "boolean", - "description": "When enabled, restricts transcription to the language specified in the language field. When disabled, the model can detect and transcribe any of 60+ supported languages. Defaults to true." - }, - "maxEndpointDelayMs": { - "type": "number", - "minimum": 500, - "maximum": 3000, - "description": "Maximum delay in milliseconds between when the speaker stops and when the endpoint is detected. Lower values mean faster turn-taking but more false endpoints. Range: 500-3000. Default: 500." - }, - "customVocabulary": { - "description": "Custom vocabulary terms to boost recognition accuracy. Useful for brand names, product names, and domain-specific terminology. Maps to Soniox context.terms.", - "type": "array", - "items": { - "type": "string" - } + ] } }, "required": [ "provider" ] }, - "FallbackSpeechmaticsTranscriber": { + "FallbackCustomTranscriber": { "type": "object", "properties": { "provider": { "type": "string", - "description": "This is the transcription provider that will be used.", + "description": "This is the transcription provider that will be used. Use `custom-transcriber` for providers that are not natively supported.", "enum": [ - "speechmatics" + "custom-transcriber" ] }, - "model": { + "server": { + "description": "This is where the transcription request will be sent.\n\nUsage:\n1. Vapi will initiate a websocket connection with `server.url`.\n\n2. Vapi will send an initial text frame with the sample rate. Format:\n```\n {\n \"type\": \"start\",\n \"encoding\": \"linear16\", // 16-bit raw PCM format\n \"container\": \"raw\",\n \"sampleRate\": {{sampleRate}},\n \"channels\": 2 // customer is channel 0, assistant is channel 1\n }\n```\n\n3. Vapi will send the audio data in 16-bit raw PCM format as binary frames.\n\n4. You can read the messages something like this:\n```\nws.on('message', (data, isBinary) => {\n if (isBinary) {\n pcmBuffer = Buffer.concat([pcmBuffer, data]);\n console.log(`Received PCM data, buffer size: ${pcmBuffer.length}`);\n } else {\n console.log('Received message:', JSON.parse(data.toString()));\n }\n});\n```\n\n5. You will respond with transcriptions as you have them. Format:\n```\n {\n \"type\": \"transcriber-response\",\n \"transcription\": \"Hello, world!\",\n \"channel\": \"customer\" | \"assistant\"\n }\n```", + "allOf": [ + { + "$ref": "#/components/schemas/Server" + } + ] + } + }, + "required": [ + "provider", + "server" + ] + }, + "FallbackDeepgramTranscriber": { + "type": "object", + "properties": { + "provider": { "type": "string", - "description": "This is the model that will be used for the transcription.", + "description": "This is the transcription provider that will be used.", "enum": [ - "default" + "deepgram" + ] + }, + "model": { + "description": "This is the Deepgram model that will be used. A list of models can be found here: https://developers.deepgram.com/docs/models-languages-overview", + "oneOf": [ + { + "type": "string", + "enum": [ + "nova-3", + "nova-3-general", + "nova-3-medical", + "nova-2", + "nova-2-general", + "nova-2-meeting", + "nova-2-phonecall", + "nova-2-finance", + "nova-2-conversationalai", + "nova-2-voicemail", + "nova-2-video", + "nova-2-medical", + "nova-2-drivethru", + "nova-2-automotive", + "nova", + "nova-general", + "nova-phonecall", + "nova-medical", + "enhanced", + "enhanced-general", + "enhanced-meeting", + "enhanced-phonecall", + "enhanced-finance", + "base", + "base-general", + "base-meeting", + "base-phonecall", + "base-finance", + "base-conversationalai", + "base-voicemail", + "base-video", + "whisper", + "flux-general-en", + "flux-general-multi" + ] + }, + { + "type": "string" + } ] }, "language": { "type": "string", + "description": "This is the language that will be set for the transcription. The list of languages Deepgram supports can be found here: https://developers.deepgram.com/docs/models-languages-overview", "enum": [ - "auto", "ar", - "ar_en", + "az", "ba", - "eu", "be", - "bn", "bg", - "yue", + "bn", + "br", + "bs", "ca", - "hr", "cs", "da", - "nl", + "da-DK", + "de", + "de-CH", + "el", "en", - "eo", + "en-AU", + "en-CA", + "en-GB", + "en-IE", + "en-IN", + "en-NZ", + "en-US", + "es", + "es-419", + "es-LATAM", "et", + "eu", + "fa", "fi", "fr", - "gl", - "de", - "el", + "fr-CA", + "ha", + "haw", "he", "hi", + "hi-Latn", + "hr", "hu", "id", - "ia", - "ga", + "is", "it", "ja", + "jw", + "kn", "ko", - "lv", + "ko-KR", + "ln", "lt", - "ms", - "en_ms", - "mt", - "cmn", - "cmn_en", + "lv", + "mk", "mr", - "mn", + "ms", + "multi", + "nl", + "nl-BE", "no", - "fa", "pl", "pt", + "pt-BR", + "pt-PT", "ro", "ru", "sk", "sl", - "es", - "en_es", - "sw", + "sn", + "so", + "sr", + "su", "sv", - "tl", + "sv-SE", "ta", - "en_ta", + "taq", + "te", "th", + "th-TH", + "tl", "tr", + "tt", "uk", "ur", - "ug", "vi", - "cy" + "yo", + "zh", + "zh-CN", + "zh-HK", + "zh-Hans", + "zh-Hant", + "zh-TW" ] }, - "operatingPoint": { - "type": "string", - "description": "This is the operating point for the transcription. Choose between `standard` for faster turnaround with strong accuracy or `enhanced` for highest accuracy when precision is critical.\n\n@default 'enhanced'", - "example": "enhanced", - "enum": [ - "standard", - "enhanced" - ], - "default": "enhanced" - }, - "region": { - "type": "string", - "description": "This is the region for the Speechmatics API. Choose between EU (Europe) and US (United States) regions for lower latency and data sovereignty compliance.\n\n@default 'eu'", - "example": "us", - "enum": [ - "eu", - "us" - ], - "default": "eu" + "smartFormat": { + "type": "boolean", + "description": "This will be use smart format option provided by Deepgram. It's default disabled because it can sometimes format numbers as times but it's getting better.", + "example": false }, - "enableDiarization": { + "mipOptOut": { "type": "boolean", - "description": "This enables speaker diarization, which identifies and separates speakers in the transcription. Essential for multi-speaker conversations and conference calls.\n\n@default false", - "example": true, + "description": "If set to true, this will add mip_opt_out=true as a query parameter of all API requests. See https://developers.deepgram.com/docs/the-deepgram-model-improvement-partnership-program#want-to-opt-out\n\nThis will only be used if you are using your own Deepgram API key.\n\n@default false", + "example": false, "default": false }, - "maxDelay": { - "type": "number", - "description": "This sets the maximum delay in milliseconds for partial transcripts. Balances latency and accuracy.\n\n@default 3000", - "example": 1500, - "minimum": 500, - "maximum": 10000, - "default": 3000 + "numerals": { + "type": "boolean", + "description": "If set to true, this will cause deepgram to convert spoken numbers to literal numerals. For example, \"my phone number is nine-seven-two...\" would become \"my phone number is 972...\"\n\n@default false", + "example": false }, - "customVocabulary": { + "profanityFilter": { + "type": "boolean", + "description": "If set to true, Deepgram will replace profanity in transcripts with surrounding asterisks, e.g. \"f***\".\n\n@default false", + "example": false + }, + "redaction": { + "type": "array", + "description": "Enables redaction of sensitive information from transcripts.\n\nOptions include:\n- \"pci\": Redacts credit card numbers, expiration dates, and CVV.\n- \"pii\": Redacts personally identifiable information (names, locations, identifying numbers, etc.).\n- \"phi\": Redacts protected health information (medical conditions, drugs, injuries, etc.).\n- \"numbers\": Redacts numerical and identifying entities (dates, account numbers, SSNs, etc.).\n\nMultiple values can be provided to redact different categories simultaneously.\nRedacted content is replaced with entity labels like [CREDIT_CARD_1], [SSN_1], etc.\n\nSee https://developers.deepgram.com/docs/redaction for details.", + "enum": [ + "pci", + "pii", + "phi", + "numbers" + ], "example": [ - { - "content": "Speechmatics", - "soundsLike": [ - "speech mattix" - ] - } + "pci", + "phi" ], - "type": "array", "items": { - "$ref": "#/components/schemas/SpeechmaticsCustomVocabularyItem" + "type": "string", + "enum": [ + "pci", + "pii", + "phi", + "numbers" + ] } }, - "numeralStyle": { - "type": "string", - "description": "This controls how numbers, dates, currencies, and other entities are formatted in the transcription output.\n\n@default 'written'", - "example": "spoken", - "enum": [ - "written", - "spoken" - ], - "default": "written" - }, - "endOfTurnSensitivity": { + "confidenceThreshold": { "type": "number", - "description": "This is the sensitivity level for end-of-turn detection, which determines when a speaker has finished talking. Higher values are more sensitive.\n\n@default 0.5", - "example": 0.8, + "description": "Transcripts below this confidence threshold will be discarded.\n\n@default 0.4", "minimum": 0, "maximum": 1, - "default": 0.5 - }, - "removeDisfluencies": { - "type": "boolean", - "description": "This enables removal of disfluencies (um, uh) from the transcript to create cleaner, more professional output.\n\nThis is only supported for the English language transcriber.\n\n@default false", - "example": true, - "default": false + "example": 0.4 }, - "minimumSpeechDuration": { + "eotThreshold": { "type": "number", - "description": "This is the minimum duration in seconds for speech segments. Shorter segments will be filtered out. Helps remove noise and improve accuracy.\n\n@default 0.0", - "example": 0.2, - "minimum": 0, - "maximum": 5, - "default": 0 - } - }, - "required": [ - "provider", - "customVocabulary" - ] - }, - "FallbackTalkscriberTranscriber": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "description": "This is the transcription provider that will be used.", - "enum": [ - "talkscriber" - ] + "description": "End-of-turn confidence required to finish a turn. Only used with Flux models.\n\n@default 0.7", + "minimum": 0.5, + "maximum": 0.9, + "example": 0.7 }, - "model": { - "type": "string", - "description": "This is the model that will be used for the transcription.", - "enum": [ - "whisper" - ] + "eotTimeoutMs": { + "type": "number", + "description": "A turn will be finished when this much time has passed after speech, regardless of EOT confidence. Only used with Flux models.\n\n@default 5000", + "minimum": 500, + "maximum": 10000, + "example": 5000 }, - "language": { - "type": "string", - "description": "This is the language that will be set for the transcription. The list of languages Whisper supports can be found here: https://github.com/openai/whisper/blob/main/whisper/tokenizer.py", - "enum": [ + "languages": { + "description": "Language hints to bias Flux Multilingual (`flux-general-multi`) toward specific languages.\nProvide BCP-47 language codes (e.g. \"en\", \"es\", \"fr\"). Multiple hints can be given for\nmultilingual or code-switching scenarios. Omit for auto-detection. Only used with `flux-general-multi`.", + "example": [ "en", - "zh", - "de", - "es", - "ru", - "ko", - "fr", - "ja", - "pt", - "tr", - "pl", - "ca", - "nl", - "ar", - "sv", - "it", - "id", - "hi", - "fi", - "vi", - "he", - "uk", - "el", - "ms", - "cs", - "ro", - "da", - "hu", - "ta", - "no", - "th", - "ur", - "hr", - "bg", - "lt", - "la", - "mi", - "ml", - "cy", - "sk", - "te", - "fa", - "lv", - "bn", - "sr", - "az", - "sl", - "kn", - "et", - "mk", - "br", - "eu", - "is", - "hy", - "ne", - "mn", - "bs", - "kk", - "sq", - "sw", - "gl", - "mr", - "pa", - "si", - "km", - "sn", - "yo", - "so", - "af", - "oc", - "ka", - "be", - "tg", - "sd", - "gu", - "am", - "yi", - "lo", - "uz", - "fo", - "ht", - "ps", - "tk", - "nn", - "mt", - "sa", - "lb", - "my", - "bo", - "tl", - "mg", - "as", - "tt", - "haw", - "ln", - "ha", - "ba", - "jw", - "su", - "yue" - ] - } - }, - "required": [ - "provider" - ] - }, - "FallbackGoogleTranscriber": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "description": "This is the transcription provider that will be used.", - "enum": [ - "google" - ] + "es" + ], + "type": "array", + "items": { + "type": "string" + } }, - "model": { - "type": "string", - "description": "This is the model that will be used for the transcription.", - "enum": [ - "gemini-3-flash-preview", - "gemini-2.5-pro", - "gemini-2.5-flash", - "gemini-2.5-flash-lite", - "gemini-2.0-flash-thinking-exp", - "gemini-2.0-pro-exp-02-05", - "gemini-2.0-flash", - "gemini-2.0-flash-lite", - "gemini-2.0-flash-exp", - "gemini-2.0-flash-realtime-exp", - "gemini-1.5-flash", - "gemini-1.5-flash-002", - "gemini-1.5-pro", - "gemini-1.5-pro-002", - "gemini-1.0-pro" - ] + "keywords": { + "description": "These keywords are passed to the transcription model to help it pick up use-case specific words. Anything that may not be a common word, like your company name, should be added here.", + "type": "array", + "items": { + "type": "string", + "pattern": "/^\\p{L}[\\p{L}\\d]*(?::[+-]?\\d+)?$/u" + } }, - "language": { - "type": "string", - "description": "This is the language that will be set for the transcription.", - "enum": [ - "Multilingual", - "Arabic", - "Bengali", - "Bulgarian", - "Chinese", - "Croatian", - "Czech", - "Danish", - "Dutch", - "English", - "Estonian", - "Finnish", - "French", - "German", - "Greek", - "Hebrew", - "Hindi", - "Hungarian", - "Indonesian", - "Italian", - "Japanese", - "Korean", - "Latvian", - "Lithuanian", - "Norwegian", - "Polish", - "Portuguese", - "Romanian", - "Russian", - "Serbian", - "Slovak", - "Slovenian", - "Spanish", - "Swahili", - "Swedish", - "Thai", - "Turkish", - "Ukrainian", - "Vietnamese" - ] + "keyterm": { + "description": "Keyterm Prompting allows you improve Keyword Recall Rate (KRR) for important keyterms or phrases up to 90%.", + "type": "array", + "items": { + "type": "string" + } + }, + "endpointing": { + "type": "number", + "description": "This is the timeout after which Deepgram will send transcription on user silence. You can read in-depth documentation here: https://developers.deepgram.com/docs/endpointing.\n\nHere are the most important bits:\n- Defaults to 10. This is recommended for most use cases to optimize for latency.\n- 10 can cause some missing transcriptions since because of the shorter context. This mostly happens for one-word utterances. For those uses cases, it's recommended to try 300. It will add a bit of latency but the quality and reliability of the experience will be better.\n- If neither 10 nor 300 work, contact support@vapi.ai and we'll find another solution.\n\n@default 10", + "minimum": 10, + "maximum": 500 } }, "required": [ "provider" ] }, - "FallbackOpenAITranscriber": { + "FallbackElevenLabsTranscriber": { "type": "object", "properties": { "provider": { "type": "string", "description": "This is the transcription provider that will be used.", "enum": [ - "openai" + "11labs" ] }, "model": { - "type": "string", "description": "This is the model that will be used for the transcription.", - "enum": [ - "gpt-4o-transcribe", - "gpt-4o-mini-transcribe" - ] - }, - "language": { - "type": "string", - "description": "This is the language that will be set for the transcription.", - "enum": [ - "af", - "ar", - "hy", - "az", - "be", - "bs", - "bg", - "ca", - "zh", - "hr", - "cs", - "da", - "nl", - "en", - "et", - "fi", - "fr", - "gl", - "de", - "el", - "he", - "hi", - "hu", - "is", - "id", - "it", - "ja", - "kn", - "kk", - "ko", - "lv", - "lt", - "mk", - "ms", - "mr", - "mi", - "ne", - "no", - "fa", - "pl", - "pt", - "ro", - "ru", - "sr", - "sk", - "sl", - "es", - "sw", - "sv", - "tl", - "ta", - "th", - "tr", - "uk", - "ur", - "vi", - "cy" - ] - } - }, - "required": [ - "provider", - "model" - ] - }, - "LangfuseObservabilityPlan": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "enum": [ - "langfuse" - ] - }, - "promptName": { - "type": "string", - "description": "The name of a Langfuse prompt to link generations to. This enables tracking which prompt version was used for each generation. https://langfuse.com/docs/prompt-management/features/link-to-traces" - }, - "promptVersion": { - "type": "number", - "description": "The version number of the Langfuse prompt to link generations to. Used together with promptName to identify the exact prompt version. https://langfuse.com/docs/prompt-management/features/link-to-traces", - "minimum": 1 - }, - "traceName": { - "type": "string", - "description": "Custom name for the Langfuse trace. Supports Liquid templates.\n\nAvailable variables:\n- {{ call.id }} - Call UUID\n- {{ call.type }} - 'inboundPhoneCall', 'outboundPhoneCall', 'webCall'\n- {{ assistant.name }} - Assistant name\n- {{ assistant.id }} - Assistant ID\n\nExample: \"{{ assistant.name }} - {{ call.type }}\"\n\nDefaults to call ID if not provided." - }, - "tags": { - "description": "This is an array of tags to be added to the Langfuse trace. Tags allow you to categorize and filter traces. https://langfuse.com/docs/tracing-features/tags", - "type": "array", - "items": { - "type": "string" - } - }, - "metadata": { - "type": "object", - "description": "This is a JSON object that will be added to the Langfuse trace. Traces can be enriched with metadata to better understand your users, application, and experiments. https://langfuse.com/docs/tracing-features/metadata\nBy default it includes the call metadata, assistant metadata, and assistant overrides." - } - }, - "required": [ - "provider", - "tags" - ] - }, - "TextContent": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "text" + "oneOf": [ + { + "type": "string", + "enum": [ + "scribe_v1", + "scribe_v2", + "scribe_v2_realtime" + ] + } ] }, - "text": { - "type": "string" - }, "language": { "type": "string", + "description": "This is the language that will be used for the transcription.", "enum": [ "aa", "ab", @@ -10814,943 +11332,1639 @@ "zh", "zu" ] - } - }, - "required": [ - "type", - "text", - "language" - ] - }, - "Condition": { - "type": "object", - "properties": { - "operator": { - "type": "string", - "description": "This is the operator you want to use to compare the parameter and value.", - "enum": [ - "eq", - "neq", - "gt", - "gte", - "lt", - "lte" - ] - }, - "param": { - "type": "string", - "description": "This is the name of the parameter that you want to check.", - "maxLength": 1000 }, - "value": { - "type": "string", - "description": "This is the value you want to compare against the parameter.", - "maxLength": 1000 + "silenceThresholdSeconds": { + "type": "number", + "description": "This is the number of seconds of silence before VAD commits (0.3-3.0).", + "minimum": 0.3, + "maximum": 3, + "example": 1.5 + }, + "confidenceThreshold": { + "type": "number", + "description": "This is the VAD sensitivity (0.1-0.9, lower indicates more sensitive).", + "minimum": 0.1, + "maximum": 0.9, + "example": 0.4 + }, + "minSpeechDurationMs": { + "type": "number", + "description": "This is the minimum speech duration for VAD (50-2000ms).", + "minimum": 50, + "maximum": 2000, + "example": 100 + }, + "minSilenceDurationMs": { + "type": "number", + "description": "This is the minimum silence duration for VAD (50-2000ms).", + "minimum": 50, + "maximum": 2000, + "example": 100 } }, "required": [ - "operator", - "param", - "value" + "provider" ] }, - "ToolMessageStart": { + "GladiaVocabularyItemDTO": { "type": "object", "properties": { - "contents": { + "value": { + "type": "string", + "description": "The vocabulary word or phrase" + }, + "pronunciations": { + "description": "Alternative pronunciations for the vocabulary item", "type": "array", - "description": "This is an alternative to the `content` property. It allows to specify variants of the same content, one per language.\n\nUsage:\n- If your assistants are multilingual, you can provide content for each language.\n- If you don't provide content for a language, the first item in the array will be automatically translated to the active language at that moment.\n\nThis will override the `content` property.", "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/TextContent", - "title": "Text" - } - ] + "type": "string" } }, - "type": { - "type": "string", - "enum": [ - "request-start" - ], - "description": "This message is triggered when the tool call starts.\n\nThis message is never triggered for async tools.\n\nIf this message is not provided, one of the default filler messages \"Hold on a sec\", \"One moment\", \"Just a sec\", \"Give me a moment\" or \"This'll just take a sec\" will be used." - }, - "blocking": { - "type": "boolean", - "description": "This is an optional boolean that if true, the tool call will only trigger after the message is spoken. Default is false.\n\n@default false", - "example": false, - "default": false + "intensity": { + "type": "number", + "minimum": 0, + "maximum": 1, + "description": "Intensity for this specific vocabulary item (0.0 to 1.0)" }, - "content": { + "language": { "type": "string", - "description": "This is the content that the assistant says when this message is triggered.", - "maxLength": 1000 - }, - "conditions": { - "description": "This is an optional array of conditions that the tool call arguments must meet in order for this message to be triggered.", - "type": "array", - "items": { - "$ref": "#/components/schemas/Condition" - } + "description": "Language code for this vocabulary item (ISO 639-1)" } }, "required": [ - "type" + "value" ] }, - "ToolMessageComplete": { + "FallbackGladiaTranscriber": { "type": "object", "properties": { - "contents": { - "type": "array", - "description": "This is an alternative to the `content` property. It allows to specify variants of the same content, one per language.\n\nUsage:\n- If your assistants are multilingual, you can provide content for each language.\n- If you don't provide content for a language, the first item in the array will be automatically translated to the active language at that moment.\n\nThis will override the `content` property.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/TextContent", - "title": "Text" - } - ] - } - }, - "type": { + "provider": { "type": "string", - "description": "This message is triggered when the tool call is complete.\n\nThis message is triggered immediately without waiting for your server to respond for async tool calls.\n\nIf this message is not provided, the model will be requested to respond.\n\nIf this message is provided, only this message will be spoken and the model will not be requested to come up with a response. It's an exclusive OR.", + "description": "This is the transcription provider that will be used.", "enum": [ - "request-complete" + "gladia" ] }, - "role": { - "type": "string", - "description": "This is optional and defaults to \"assistant\".\n\nWhen role=assistant, `content` is said out loud.\n\nWhen role=system, `content` is passed to the model in a system message. Example:\n system: default one\n assistant:\n user:\n assistant:\n user:\n assistant:\n user:\n assistant: tool called\n tool: your server response\n <--- system prompt as hint\n ---> model generates response which is spoken\nThis is useful when you want to provide a hint to the model about what to say next.", - "enum": [ - "assistant", - "system" + "model": { + "description": "This is the Gladia model that will be used. Default is 'fast'", + "oneOf": [ + { + "type": "string", + "enum": [ + "fast", + "accurate", + "solaria-1" + ] + } ] }, - "endCallAfterSpokenEnabled": { - "type": "boolean", - "description": "This is an optional boolean that if true, the call will end after the message is spoken. Default is false.\n\nThis is ignored if `role` is set to `system`.\n\n@default false", - "example": false + "languageBehaviour": { + "description": "Defines how the transcription model detects the audio language. Default value is 'automatic single language'.", + "oneOf": [ + { + "type": "string", + "enum": [ + "manual", + "automatic single language", + "automatic multiple languages" + ] + } + ] }, - "content": { + "language": { "type": "string", - "description": "This is the content that the assistant says when this message is triggered.", - "maxLength": 1000 + "description": "Defines the language to use for the transcription. Required when languageBehaviour is 'manual'.", + "enum": [ + "af", + "sq", + "am", + "ar", + "hy", + "as", + "az", + "ba", + "eu", + "be", + "bn", + "bs", + "br", + "bg", + "ca", + "zh", + "hr", + "cs", + "da", + "nl", + "en", + "et", + "fo", + "fi", + "fr", + "gl", + "ka", + "de", + "el", + "gu", + "ht", + "ha", + "haw", + "he", + "hi", + "hu", + "is", + "id", + "it", + "ja", + "jv", + "kn", + "kk", + "km", + "ko", + "lo", + "la", + "lv", + "ln", + "lt", + "lb", + "mk", + "mg", + "ms", + "ml", + "mt", + "mi", + "mr", + "mn", + "my", + "ne", + "no", + "nn", + "oc", + "ps", + "fa", + "pl", + "pt", + "pa", + "ro", + "ru", + "sa", + "sr", + "sn", + "sd", + "si", + "sk", + "sl", + "so", + "es", + "su", + "sw", + "sv", + "tl", + "tg", + "ta", + "tt", + "te", + "th", + "bo", + "tr", + "tk", + "uk", + "ur", + "uz", + "vi", + "cy", + "yi", + "yo" + ] }, - "conditions": { - "description": "This is an optional array of conditions that the tool call arguments must meet in order for this message to be triggered.", - "type": "array", - "items": { - "$ref": "#/components/schemas/Condition" - } - } - }, - "required": [ - "type" - ] - }, - "ToolMessageFailed": { - "type": "object", - "properties": { - "contents": { + "languages": { "type": "array", - "description": "This is an alternative to the `content` property. It allows to specify variants of the same content, one per language.\n\nUsage:\n- If your assistants are multilingual, you can provide content for each language.\n- If you don't provide content for a language, the first item in the array will be automatically translated to the active language at that moment.\n\nThis will override the `content` property.", + "description": "Defines the languages to use for the transcription. Required when languageBehaviour is 'manual'.", "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/TextContent", - "title": "Text" - } + "type": "string", + "enum": [ + "af", + "sq", + "am", + "ar", + "hy", + "as", + "az", + "ba", + "eu", + "be", + "bn", + "bs", + "br", + "bg", + "ca", + "zh", + "hr", + "cs", + "da", + "nl", + "en", + "et", + "fo", + "fi", + "fr", + "gl", + "ka", + "de", + "el", + "gu", + "ht", + "ha", + "haw", + "he", + "hi", + "hu", + "is", + "id", + "it", + "ja", + "jv", + "kn", + "kk", + "km", + "ko", + "lo", + "la", + "lv", + "ln", + "lt", + "lb", + "mk", + "mg", + "ms", + "ml", + "mt", + "mi", + "mr", + "mn", + "my", + "ne", + "no", + "nn", + "oc", + "ps", + "fa", + "pl", + "pt", + "pa", + "ro", + "ru", + "sa", + "sr", + "sn", + "sd", + "si", + "sk", + "sl", + "so", + "es", + "su", + "sw", + "sv", + "tl", + "tg", + "ta", + "tt", + "te", + "th", + "bo", + "tr", + "tk", + "uk", + "ur", + "uz", + "vi", + "cy", + "yi", + "yo" ] } }, - "type": { + "transcriptionHint": { "type": "string", - "description": "This message is triggered when the tool call fails.\n\nThis message is never triggered for async tool calls.\n\nIf this message is not provided, the model will be requested to respond.\n\nIf this message is provided, only this message will be spoken and the model will not be requested to come up with a response. It's an exclusive OR.", - "enum": [ - "request-failed" - ] + "description": "Provides a custom vocabulary to the model to improve accuracy of transcribing context specific words, technical terms, names, etc. If empty, this argument is ignored.\n⚠️ Warning ⚠️: Please be aware that the transcription_hint field has a character limit of 600. If you provide a transcription_hint longer than 600 characters, it will be automatically truncated to meet this limit.", + "maxLength": 600, + "example": "custom vocabulary" }, - "endCallAfterSpokenEnabled": { + "prosody": { "type": "boolean", - "description": "This is an optional boolean that if true, the call will end after the message is spoken. Default is false.\n\n@default false", + "description": "If prosody is true, you will get a transcription that can contain prosodies i.e. (laugh) (giggles) (malefic laugh) (toss) (music)… Default value is false.", "example": false }, - "content": { - "type": "string", - "description": "This is the content that the assistant says when this message is triggered.", - "maxLength": 1000 - }, - "conditions": { - "description": "This is an optional array of conditions that the tool call arguments must meet in order for this message to be triggered.", - "type": "array", - "items": { - "$ref": "#/components/schemas/Condition" - } - } - }, - "required": [ - "type" - ] - }, - "ToolMessageDelayed": { - "type": "object", - "properties": { - "contents": { - "type": "array", - "description": "This is an alternative to the `content` property. It allows to specify variants of the same content, one per language.\n\nUsage:\n- If your assistants are multilingual, you can provide content for each language.\n- If you don't provide content for a language, the first item in the array will be automatically translated to the active language at that moment.\n\nThis will override the `content` property.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/TextContent", - "title": "Text" - } - ] - } - }, - "type": { - "type": "string", - "description": "This message is triggered when the tool call is delayed.\n\nThere are the two things that can trigger this message:\n1. The user talks with the assistant while your server is processing the request. Default is \"Sorry, a few more seconds.\"\n2. The server doesn't respond within `timingMilliseconds`.\n\nThis message is never triggered for async tool calls.", - "enum": [ - "request-response-delayed" - ] + "audioEnhancer": { + "type": "boolean", + "description": "If true, audio will be pre-processed to improve accuracy but latency will increase. Default value is false.", + "example": false }, - "timingMilliseconds": { + "confidenceThreshold": { "type": "number", - "minimum": 100, - "maximum": 120000, - "example": 1000, - "description": "The number of milliseconds to wait for the server response before saying this message." - }, - "content": { - "type": "string", - "description": "This is the content that the assistant says when this message is triggered.", - "maxLength": 1000 + "description": "Transcripts below this confidence threshold will be discarded.\n\n@default 0.4", + "minimum": 0, + "maximum": 1, + "example": 0.4 }, - "conditions": { - "description": "This is an optional array of conditions that the tool call arguments must meet in order for this message to be triggered.", - "type": "array", - "items": { - "$ref": "#/components/schemas/Condition" - } - } - }, - "required": [ - "type" - ] - }, - "MessageTarget": { - "type": "object", - "properties": { - "role": { - "type": "string", - "description": "This is the role of the message to target.\n\nIf not specified, will find the position in the message history ignoring role (effectively `any`).", - "example": "user", - "enum": [ - "user", - "assistant" - ] + "endpointing": { + "type": "number", + "minimum": 0.01, + "maximum": 10, + "example": 0.05, + "description": "Endpointing time in seconds - time to wait before considering speech ended" }, - "position": { + "speechThreshold": { "type": "number", - "description": "This is the position of the message to target.\n- Negative numbers: Count from end (-1 = most recent, -2 = second most recent)\n- 0: First/oldest message in history\n- Positive numbers: Specific position (0-indexed from start)\n\n@default -1 (most recent message)", - "example": -1 - } - } - }, - "RegexCondition": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "This is the type discriminator for regex condition", - "example": "regex", - "enum": [ - "regex" - ] + "minimum": 0, + "maximum": 1, + "example": 0.6, + "description": "Speech threshold - sensitivity configuration for speech detection (0.0 to 1.0)" }, - "regex": { - "type": "string", - "description": "This is the regular expression pattern to match against message content.\n\nNote:\n- This works by using the RegExp.test method in Node.JS. Eg. /hello/.test(\"hello there\") will return true.\n\nHot tips:\n- In JavaScript, escape \\ when sending the regex pattern. Eg. \"hello\\sthere\" will be sent over the wire as \"hellosthere\". Send \"hello\\\\sthere\" instead.\n- RegExp.test does substring matching, so /cat/.test(\"I love cats\") will return true. To do full string matching, use anchors: /^cat$/ will only match exactly \"cat\".\n- Word boundaries \\b are useful for matching whole words: /\\bcat\\b/ matches \"cat\" but not \"cats\" or \"category\".\n- Use inline flags for portability: (?i) for case insensitive, (?m) for multiline", - "examples": [ - "\\\\b(cancel|stop|wait)\\\\b - Matches whole words", - "^yes$ - Matches exactly yes (full string match)", - "(?i)hello - Case insensitive match" - ] + "customVocabularyEnabled": { + "type": "boolean", + "example": false, + "description": "Enable custom vocabulary for improved accuracy" }, - "target": { - "description": "This is the target for messages to check against.\nIf not specified, the condition will run on the last message (position: -1).\nIf role is not specified, it will look at the last message regardless of role.\n@default { position: -1 }", + "customVocabularyConfig": { + "description": "Custom vocabulary configuration", "allOf": [ { - "$ref": "#/components/schemas/MessageTarget" + "$ref": "#/components/schemas/GladiaCustomVocabularyConfigDTO" } ] }, - "negate": { - "type": "boolean", - "description": "This is the flag that when true, the condition matches if the pattern does NOT match.\nUseful for ensuring certain words/phrases are absent.\n\n@default false", - "example": "true - Reject if user hasn\"t said goodbye: { regex: \"\\\\b(bye|goodbye)\\\\b\", negate: true }" - } - }, - "required": [ - "type", - "regex" - ] - }, - "LiquidCondition": { - "type": "object", - "properties": { - "type": { + "region": { "type": "string", - "description": "This is the type discriminator for liquid condition", - "example": "liquid", "enum": [ - "liquid" - ] + "us-west", + "eu-west" + ], + "description": "Region for processing audio (us-west or eu-west)", + "example": "us-west" }, - "liquid": { - "type": "string", - "description": "This is the Liquid template that must return exactly \"true\" or \"false\" as a string.\nThe template is evaluated and the entire output must be either \"true\" or \"false\" - nothing else.\n\nAvailable variables:\n- `messages`: Array of recent messages in OpenAI chat completions format (ChatCompletionMessageParam[])\n Each message has properties like: role ('user', 'assistant', 'system'), content (string), etc.\n- `now`: Current timestamp in milliseconds (built-in Liquid variable)\n- Any assistant variable values (e.g., `userName`, `accountStatus`)\n\nUseful Liquid filters for messages:\n- `messages | last: 5` - Get the 5 most recent messages\n- `messages | where: 'role', 'user'` - Filter to only user messages\n- `messages | reverse` - Reverse the order of messages", - "examples": [ - "{% if messages.last.content contains goodbye %}true{% else %}false{% endif %}", - "{% assign userMessages = messages | where: role, user %}{% if userMessages.size > 3 %}true{% else %}false{% endif %}" - ] + "receivePartialTranscripts": { + "type": "boolean", + "example": false, + "description": "Enable partial transcripts for low-latency streaming transcription" } }, "required": [ - "type", - "liquid" + "provider" ] }, - "GroupCondition": { + "FallbackSonioxTranscriber": { "type": "object", "properties": { - "type": { + "provider": { "type": "string", - "description": "This is the type discriminator for group condition", - "example": "group", "enum": [ - "group" + "soniox" ] }, - "operator": { + "model": { "type": "string", - "description": "This is the logical operator for combining conditions in this group", - "examples": [ - "AND", - "OR" - ], "enum": [ - "AND", - "OR" - ] - }, - "conditions": { - "type": "array", - "description": "This is the list of nested conditions to evaluate.\nSupports recursive nesting of groups for complex logic.", - "examples": [ - "[{ type: \"regex\", regex: \"(?i)stop\", target: { role: \"user\" } }]", - "[{ type: \"group\", operator: \"AND\", conditions: [...] }]" - ], - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/RegexCondition", - "title": "RegexCondition" - }, - { - "$ref": "#/components/schemas/LiquidCondition", - "title": "LiquidCondition" - }, - { - "$ref": "#/components/schemas/GroupCondition", - "title": "GroupCondition", - "description": "This is the GroupCondition object but Swagger does not display nested schemas correctly." - } - ] - } - } - }, - "required": [ - "type", - "operator", - "conditions" - ] - }, - "ToolRejectionPlan": { - "type": "object", - "properties": { - "conditions": { - "type": "array", - "description": "This is the list of conditions that must be evaluated.\n\nUsage:\n- If all conditions match (AND logic), the tool call is rejected.\n- For OR logic at the top level, use a single 'group' condition with operator: 'OR'.\n\n@default [] - Empty array means tool always executes", - "examples": [ - "[{ type: \"regex\", regex: \"(?i)\\\\b(cancel|stop)\\\\b\", target: { role: \"user\" } }]", - "[{ type: \"group\", operator: \"OR\", conditions: [...] }]" + "stt-rt-v4", + "stt-rt-v5" ], - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/RegexCondition", - "title": "RegexCondition" - }, - { - "$ref": "#/components/schemas/LiquidCondition", - "title": "LiquidCondition" - }, - { - "$ref": "#/components/schemas/GroupCondition", - "title": "GroupCondition", - "description": "This is the GroupCondition object but Swagger does not display nested schemas correctly." - } - ] - } - } - } - }, - "CreateDtmfToolDTO": { - "type": "object", - "properties": { - "messages": { - "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ToolMessageStart", - "title": "ToolMessageStart" - }, - { - "$ref": "#/components/schemas/ToolMessageComplete", - "title": "ToolMessageComplete" - }, - { - "$ref": "#/components/schemas/ToolMessageFailed", - "title": "ToolMessageFailed" - }, - { - "$ref": "#/components/schemas/ToolMessageDelayed", - "title": "ToolMessageDelayed" - } - ] - } + "description": "The Soniox model to use for transcription." }, - "type": { + "language": { "type": "string", "enum": [ - "dtmf" + "aa", + "ab", + "ae", + "af", + "ak", + "am", + "an", + "ar", + "as", + "av", + "ay", + "az", + "ba", + "be", + "bg", + "bh", + "bi", + "bm", + "bn", + "bo", + "br", + "bs", + "ca", + "ce", + "ch", + "co", + "cr", + "cs", + "cu", + "cv", + "cy", + "da", + "de", + "dv", + "dz", + "ee", + "el", + "en", + "eo", + "es", + "et", + "eu", + "fa", + "ff", + "fi", + "fj", + "fo", + "fr", + "fy", + "ga", + "gd", + "gl", + "gn", + "gu", + "gv", + "ha", + "he", + "hi", + "ho", + "hr", + "ht", + "hu", + "hy", + "hz", + "ia", + "id", + "ie", + "ig", + "ii", + "ik", + "io", + "is", + "it", + "iu", + "ja", + "jv", + "ka", + "kg", + "ki", + "kj", + "kk", + "kl", + "km", + "kn", + "ko", + "kr", + "ks", + "ku", + "kv", + "kw", + "ky", + "la", + "lb", + "lg", + "li", + "ln", + "lo", + "lt", + "lu", + "lv", + "mg", + "mh", + "mi", + "mk", + "ml", + "mn", + "mr", + "ms", + "mt", + "my", + "na", + "nb", + "nd", + "ne", + "ng", + "nl", + "nn", + "no", + "nr", + "nv", + "ny", + "oc", + "oj", + "om", + "or", + "os", + "pa", + "pi", + "pl", + "ps", + "pt", + "qu", + "rm", + "rn", + "ro", + "ru", + "rw", + "sa", + "sc", + "sd", + "se", + "sg", + "si", + "sk", + "sl", + "sm", + "sn", + "so", + "sq", + "sr", + "ss", + "st", + "su", + "sv", + "sw", + "ta", + "te", + "tg", + "th", + "ti", + "tk", + "tl", + "tn", + "to", + "tr", + "ts", + "tt", + "tw", + "ty", + "ug", + "uk", + "ur", + "uz", + "ve", + "vi", + "vo", + "wa", + "wo", + "xh", + "yi", + "yue", + "yo", + "za", + "zh", + "zu" ], - "description": "The type of tool. \"dtmf\" for DTMF tool." + "description": "Single language for transcription as an ISO 639-1 code (e.g., `en`, `es`). For multi-language hints or to enable Soniox auto-detect, use `languages` instead — when `languages` is set (including to an empty array), this field is ignored when building the Soniox request. Defaults to `en` if neither this nor `languages` is set." }, - "sipInfoDtmfEnabled": { + "languages": { + "type": "array", + "description": "Language hints sent to Soniox as `language_hints`. Provide `[lang1, lang2, ...]` (ISO 639-1 codes) to bias recognition toward specific languages, or provide an explicit empty array `[]` to enable Soniox auto-detect across all 60+ supported languages. When set (including the empty array), this field takes precedence over the singular `language` field. When omitted, falls back to the singular `language` (which defaults to `en` if also unset). Best accuracy is achieved with a single language.", + "items": { + "type": "string", + "enum": [ + "aa", + "ab", + "ae", + "af", + "ak", + "am", + "an", + "ar", + "as", + "av", + "ay", + "az", + "ba", + "be", + "bg", + "bh", + "bi", + "bm", + "bn", + "bo", + "br", + "bs", + "ca", + "ce", + "ch", + "co", + "cr", + "cs", + "cu", + "cv", + "cy", + "da", + "de", + "dv", + "dz", + "ee", + "el", + "en", + "eo", + "es", + "et", + "eu", + "fa", + "ff", + "fi", + "fj", + "fo", + "fr", + "fy", + "ga", + "gd", + "gl", + "gn", + "gu", + "gv", + "ha", + "he", + "hi", + "ho", + "hr", + "ht", + "hu", + "hy", + "hz", + "ia", + "id", + "ie", + "ig", + "ii", + "ik", + "io", + "is", + "it", + "iu", + "ja", + "jv", + "ka", + "kg", + "ki", + "kj", + "kk", + "kl", + "km", + "kn", + "ko", + "kr", + "ks", + "ku", + "kv", + "kw", + "ky", + "la", + "lb", + "lg", + "li", + "ln", + "lo", + "lt", + "lu", + "lv", + "mg", + "mh", + "mi", + "mk", + "ml", + "mn", + "mr", + "ms", + "mt", + "my", + "na", + "nb", + "nd", + "ne", + "ng", + "nl", + "nn", + "no", + "nr", + "nv", + "ny", + "oc", + "oj", + "om", + "or", + "os", + "pa", + "pi", + "pl", + "ps", + "pt", + "qu", + "rm", + "rn", + "ro", + "ru", + "rw", + "sa", + "sc", + "sd", + "se", + "sg", + "si", + "sk", + "sl", + "sm", + "sn", + "so", + "sq", + "sr", + "ss", + "st", + "su", + "sv", + "sw", + "ta", + "te", + "tg", + "th", + "ti", + "tk", + "tl", + "tn", + "to", + "tr", + "ts", + "tt", + "tw", + "ty", + "ug", + "uk", + "ur", + "uz", + "ve", + "vi", + "vo", + "wa", + "wo", + "xh", + "yi", + "yue", + "yo", + "za", + "zh", + "zu" + ] + } + }, + "languageHintsStrict": { "type": "boolean", - "description": "This enables sending DTMF tones via SIP INFO messages instead of RFC 2833 (RTP events). When enabled, DTMF digits will be sent using the SIP INFO method, which can be more reliable in some network configurations. Only relevant when using the `vapi.sip` transport.", - "default": false + "description": "When `true`, Soniox strictly restricts transcription to the languages in `languages` (or the singular `language` if `languages` is unset). When `false`, Soniox biases toward those languages but still allows transcription in other languages. Has no effect when no language hints are sent (e.g., `languages: []` for auto-detect). Defaults to `true` (strict mode)." }, - "rejectionPlan": { - "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", - "allOf": [ + "maxEndpointDelayMs": { + "type": "number", + "minimum": 500, + "maximum": 3000, + "description": "Maximum delay in milliseconds between when the speaker stops and when the endpoint is detected. Lower values mean faster turn-taking but more false endpoints. Range: 500-3000. Default: 500." + }, + "customVocabulary": { + "description": "Custom vocabulary terms to boost recognition accuracy. Useful for brand names, product names, and domain-specific terminology. Maps to Soniox context.terms.", + "type": "array", + "items": { + "type": "string" + } + }, + "contextGeneral": { + "description": "General context key-value pairs that guide the AI model during transcription. Helps adapt vocabulary to the correct domain, improving accuracy. Recommended: 10 or fewer pairs. Maps to Soniox context.general.", + "example": [ { - "$ref": "#/components/schemas/ToolRejectionPlan" + "key": "domain", + "value": "Healthcare" + }, + { + "key": "topic", + "value": "Diabetes management consultation" } - ] + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/SonioxContextGeneralItem" + } } }, "required": [ - "type" + "provider" ] }, - "CreateEndCallToolDTO": { + "FallbackSpeechmaticsTranscriber": { "type": "object", "properties": { - "messages": { - "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ToolMessageStart", - "title": "ToolMessageStart" - }, - { - "$ref": "#/components/schemas/ToolMessageComplete", - "title": "ToolMessageComplete" - }, - { - "$ref": "#/components/schemas/ToolMessageFailed", - "title": "ToolMessageFailed" - }, - { - "$ref": "#/components/schemas/ToolMessageDelayed", - "title": "ToolMessageDelayed" - } - ] - } + "provider": { + "type": "string", + "description": "This is the transcription provider that will be used.", + "enum": [ + "speechmatics" + ] }, - "type": { + "model": { + "type": "string", + "description": "This is the model that will be used for the transcription.", + "enum": [ + "default" + ] + }, + "language": { "type": "string", "enum": [ - "endCall" + "auto", + "ar", + "ar_en", + "ba", + "eu", + "be", + "bn", + "bg", + "yue", + "ca", + "hr", + "cs", + "da", + "nl", + "en", + "eo", + "et", + "fi", + "fr", + "gl", + "de", + "el", + "he", + "hi", + "hu", + "id", + "ia", + "ga", + "it", + "ja", + "ko", + "lv", + "lt", + "ms", + "en_ms", + "mt", + "cmn", + "cmn_en", + "mr", + "mn", + "no", + "fa", + "pl", + "pt", + "ro", + "ru", + "sk", + "sl", + "es", + "en_es", + "sw", + "sv", + "tl", + "ta", + "en_ta", + "th", + "tr", + "uk", + "ur", + "ug", + "vi", + "cy" + ] + }, + "operatingPoint": { + "type": "string", + "description": "This is the operating point for the transcription. Choose between `standard` for faster turnaround with strong accuracy or `enhanced` for highest accuracy when precision is critical.\n\n@default 'enhanced'", + "example": "enhanced", + "enum": [ + "standard", + "enhanced" ], - "description": "The type of tool. \"endCall\" for End Call tool." + "default": "enhanced" }, - "rejectionPlan": { - "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", - "allOf": [ + "region": { + "type": "string", + "description": "This is the region for the Speechmatics API. Choose between EU (Europe) and US (United States) regions for lower latency and data sovereignty compliance.\n\n@default 'eu'", + "example": "us", + "enum": [ + "eu", + "us" + ], + "default": "eu" + }, + "enableDiarization": { + "type": "boolean", + "description": "This enables speaker diarization, which identifies and separates speakers in the transcription. Essential for multi-speaker conversations and conference calls.\n\n@default false", + "example": true, + "default": false + }, + "maxDelay": { + "type": "number", + "description": "This sets the maximum delay in milliseconds for partial transcripts. Balances latency and accuracy.\n\n@default 3000", + "example": 1500, + "minimum": 500, + "maximum": 10000, + "default": 3000 + }, + "customVocabulary": { + "example": [ { - "$ref": "#/components/schemas/ToolRejectionPlan" + "content": "Speechmatics", + "soundsLike": [ + "speech mattix" + ] } - ] - } - }, - "required": [ - "type" - ] - }, - "CreateVoicemailToolDTO": { - "type": "object", - "properties": { - "messages": { + ], "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ToolMessageStart", - "title": "ToolMessageStart" - }, - { - "$ref": "#/components/schemas/ToolMessageComplete", - "title": "ToolMessageComplete" - }, - { - "$ref": "#/components/schemas/ToolMessageFailed", - "title": "ToolMessageFailed" - }, - { - "$ref": "#/components/schemas/ToolMessageDelayed", - "title": "ToolMessageDelayed" - } - ] + "$ref": "#/components/schemas/SpeechmaticsCustomVocabularyItem" } }, - "type": { + "numeralStyle": { "type": "string", - "description": "The type of tool. \"voicemail\" for Voicemail tool.", + "description": "This controls how numbers, dates, currencies, and other entities are formatted in the transcription output.\n\n@default 'written'", + "example": "spoken", "enum": [ - "voicemail" - ] + "written", + "spoken" + ], + "default": "written" }, - "beepDetectionEnabled": { + "endOfTurnSensitivity": { + "type": "number", + "description": "This is the sensitivity level for end-of-turn detection, which determines when a speaker has finished talking. Higher values are more sensitive.\n\n@default 0.5", + "example": 0.8, + "minimum": 0, + "maximum": 1, + "default": 0.5 + }, + "removeDisfluencies": { "type": "boolean", - "description": "This is the flag that enables beep detection for voicemail detection and applies only for twilio based calls.\n\n@default false", - "default": false, - "example": false + "description": "This enables removal of disfluencies (um, uh) from the transcript to create cleaner, more professional output.\n\nThis is only supported for the English language transcriber.\n\n@default false", + "example": true, + "default": false }, - "rejectionPlan": { - "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", - "allOf": [ - { - "$ref": "#/components/schemas/ToolRejectionPlan" - } - ] + "minimumSpeechDuration": { + "type": "number", + "description": "This is the minimum duration in seconds for speech segments. Shorter segments will be filtered out. Helps remove noise and improve accuracy.\n\n@default 0.0", + "example": 0.2, + "minimum": 0, + "maximum": 5, + "default": 0 } }, "required": [ - "type" + "provider", + "customVocabulary" ] }, - "JsonSchema": { + "FallbackTalkscriberTranscriber": { "type": "object", "properties": { - "type": { + "provider": { "type": "string", - "description": "This is the type of output you'd like.\n\n`string`, `number`, `integer`, `boolean` are the primitive types and should be obvious.\n\n`array` and `object` are more interesting and quite powerful. They allow you to define nested structures.\n\nFor `array`, you can define the schema of the items in the array using the `items` property.\n\nFor `object`, you can define the properties of the object using the `properties` property.", + "description": "This is the transcription provider that will be used.", "enum": [ - "string", - "number", - "integer", - "boolean", - "array", - "object" + "talkscriber" ] }, - "items": { - "description": "This is required if the type is \"array\". This is the schema of the items in the array. This is a recursive reference to JsonSchema.", - "allOf": [ - { - "$ref": "#/components/schemas/JsonSchema" - } + "model": { + "type": "string", + "description": "This is the model that will be used for the transcription.", + "enum": [ + "whisper" ] }, - "properties": { - "type": "object", - "description": "This is required if the type is \"object\". This specifies the properties of the object. This is a map of property names to JsonSchema objects.", - "additionalProperties": { - "$ref": "#/components/schemas/JsonSchema" - } - }, - "description": { - "type": "string", - "description": "This is the description to help the model understand what it needs to output." - }, - "pattern": { - "type": "string", - "description": "This is the pattern of the string. This is a regex that will be used to validate the data in question. To use a common format, use the `format` property instead.\n\nOpenAI documentation: https://platform.openai.com/docs/guides/structured-outputs#supported-properties" - }, - "format": { + "language": { "type": "string", - "description": "This is the format of the string. To pass a regex, use the `pattern` property instead.\n\nOpenAI documentation: https://platform.openai.com/docs/guides/structured-outputs?api-mode=chat&type-restrictions=string-restrictions", + "description": "This is the language that will be set for the transcription. The list of languages Whisper supports can be found here: https://github.com/openai/whisper/blob/main/whisper/tokenizer.py", "enum": [ - "date-time", - "time", - "date", - "duration", - "email", - "hostname", - "ipv4", - "ipv6", - "uuid" + "en", + "zh", + "de", + "es", + "ru", + "ko", + "fr", + "ja", + "pt", + "tr", + "pl", + "ca", + "nl", + "ar", + "sv", + "it", + "id", + "hi", + "fi", + "vi", + "he", + "uk", + "el", + "ms", + "cs", + "ro", + "da", + "hu", + "ta", + "no", + "th", + "ur", + "hr", + "bg", + "lt", + "la", + "mi", + "ml", + "cy", + "sk", + "te", + "fa", + "lv", + "bn", + "sr", + "az", + "sl", + "kn", + "et", + "mk", + "br", + "eu", + "is", + "hy", + "ne", + "mn", + "bs", + "kk", + "sq", + "sw", + "gl", + "mr", + "pa", + "si", + "km", + "sn", + "yo", + "so", + "af", + "oc", + "ka", + "be", + "tg", + "sd", + "gu", + "am", + "yi", + "lo", + "uz", + "fo", + "ht", + "ps", + "tk", + "nn", + "mt", + "sa", + "lb", + "my", + "bo", + "tl", + "mg", + "as", + "tt", + "haw", + "ln", + "ha", + "ba", + "jw", + "su", + "yue" ] - }, - "required": { - "description": "This is a list of properties that are required.\n\nThis only makes sense if the type is \"object\".", - "type": "array", - "items": { - "type": "string" - } - }, - "enum": { - "description": "This array specifies the allowed values that can be used to restrict the output of the model.", - "type": "array", - "items": { - "type": "string" - } - }, - "title": { - "type": "string", - "description": "This is the title of the schema." } }, "required": [ - "type" + "provider" ] }, - "VariableExtractionAlias": { + "FallbackGoogleTranscriber": { "type": "object", "properties": { - "key": { + "provider": { "type": "string", - "description": "This is the key of the variable.\n\nThis variable will be accessible during the call as `{{key}}` and stored in `call.artifact.variableValues` after the call.\n\nRules:\n- Must start with a letter (a-z, A-Z).\n- Subsequent characters can be letters, numbers, or underscores.\n- Minimum length of 1 and maximum length of 40.", - "minLength": 1, - "maxLength": 40, - "pattern": "/^[a-zA-Z][a-zA-Z0-9_]*$/" + "description": "This is the transcription provider that will be used.", + "enum": [ + "google" + ] }, - "value": { + "model": { "type": "string", - "description": "This is the value of the variable.\n\nThis can reference existing variables, use filters, and perform transformations.\n\nExamples: \"{{name}}\", \"{{customer.email}}\", \"Hello {{name | upcase}}\"", - "maxLength": 10000 - } - }, - "required": [ - "key", - "value" - ] - }, - "VariableExtractionPlan": { - "type": "object", - "properties": { - "schema": { - "description": "This is the schema to extract.\n\nExamples:\n1. To extract object properties, you can use the following schema:\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"number\"\n }\n }\n}\n```\n\nThese will be extracted as `{{ name }}` and `{{ age }}` respectively. To emphasize, object properties are extracted as direct global variables.\n\n2. To extract nested properties, you can use the following schema:\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"object\",\n \"properties\": {\n \"first\": {\n \"type\": \"string\"\n },\n \"last\": {\n \"type\": \"string\"\n }\n }\n }\n }\n}\n```\n\nThese will be extracted as `{{ name }}`. And, `{{ name.first }}` and `{{ name.last }}` will be accessible.\n\n3. To extract array items, you can use the following schema:\n```json\n{\n \"type\": \"array\",\n \"title\": \"zipCodes\",\n \"items\": {\n \"type\": \"string\"\n }\n}\n```\n\nThis will be extracted as `{{ zipCodes }}`. To access the array items, you can use `{{ zipCodes[0] }}` and `{{ zipCodes[1] }}`.\n\n4. To extract array of objects, you can use the following schema:\n\n```json\n{\n \"type\": \"array\",\n \"name\": \"people\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"number\"\n },\n \"zipCodes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n }\n}\n```\n\nThis will be extracted as `{{ people }}`. To access the array items, you can use `{{ people[n].name }}`, `{{ people[n].age }}`, `{{ people[n].zipCodes }}`, `{{ people[n].zipCodes[0] }}` and `{{ people[n].zipCodes[1] }}`.", - "allOf": [ - { - "$ref": "#/components/schemas/JsonSchema" - } + "description": "This is the model that will be used for the transcription.", + "enum": [ + "gemini-3.5-flash", + "gemini-3.1-flash-lite", + "gemini-3-flash-preview", + "gemini-2.5-pro", + "gemini-2.5-flash", + "gemini-2.5-flash-lite", + "gemini-2.0-flash-thinking-exp", + "gemini-2.0-pro-exp-02-05", + "gemini-2.0-flash", + "gemini-2.0-flash-lite", + "gemini-2.0-flash-exp", + "gemini-2.0-flash-realtime-exp", + "gemini-1.5-flash", + "gemini-1.5-flash-002", + "gemini-1.5-pro", + "gemini-1.5-pro-002", + "gemini-1.0-pro" ] }, - "aliases": { - "description": "These are additional variables to create.\n\nThese will be accessible during the call as `{{key}}` and stored in `call.artifact.variableValues` after the call.\n\nExample:\n```json\n{\n \"aliases\": [\n {\n \"key\": \"customerName\",\n \"value\": \"{{name}}\"\n },\n {\n \"key\": \"fullName\",\n \"value\": \"{{firstName}} {{lastName}}\"\n },\n {\n \"key\": \"greeting\",\n \"value\": \"Hello {{name}}, welcome to {{company}}!\"\n },\n {\n \"key\": \"customerCity\",\n \"value\": \"{{addresses[0].city}}\"\n },\n {\n \"key\": \"something\",\n \"value\": \"{{any liquid}}\"\n }\n ]\n}\n```\n\nThis will create variables `customerName`, `fullName`, `greeting`, `customerCity`, and `something`. To access these variables, you can reference them as `{{customerName}}`, `{{fullName}}`, `{{greeting}}`, `{{customerCity}}`, and `{{something}}`.", - "type": "array", - "items": { - "$ref": "#/components/schemas/VariableExtractionAlias" - } - } - } - }, - "ToolParameter": { - "type": "object", - "properties": { - "key": { + "language": { "type": "string", - "description": "This is the key of the parameter." - }, - "value": { - "description": "The value of the parameter. Any JSON type. String values support Liquid templates.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "type": "object" - }, - { - "type": "array" - } + "description": "This is the language that will be set for the transcription.", + "enum": [ + "Multilingual", + "Arabic", + "Bengali", + "Bulgarian", + "Chinese", + "Croatian", + "Czech", + "Danish", + "Dutch", + "English", + "Estonian", + "Finnish", + "French", + "German", + "Greek", + "Hebrew", + "Hindi", + "Hungarian", + "Indonesian", + "Italian", + "Japanese", + "Korean", + "Latvian", + "Lithuanian", + "Norwegian", + "Polish", + "Portuguese", + "Romanian", + "Russian", + "Serbian", + "Slovak", + "Slovenian", + "Spanish", + "Swahili", + "Swedish", + "Thai", + "Turkish", + "Ukrainian", + "Vietnamese" ] } }, "required": [ - "key", - "value" + "provider" ] }, - "OpenAIFunctionParameters": { + "FallbackOpenAITranscriber": { "type": "object", "properties": { - "type": { + "provider": { "type": "string", - "description": "This must be set to 'object'. It instructs the model to return a JSON object containing the function call properties.", + "description": "This is the transcription provider that will be used.", "enum": [ - "object" + "openai" ] }, - "properties": { - "type": "object", - "description": "This provides a description of the properties required by the function.\nJSON Schema can be used to specify expectations for each property.\nRefer to [this doc](https://ajv.js.org/json-schema.html#json-data-type) for a comprehensive guide on JSON Schema.", - "additionalProperties": { - "$ref": "#/components/schemas/JsonSchema" - } + "model": { + "type": "string", + "description": "This is the model that will be used for the transcription.", + "enum": [ + "gpt-4o-transcribe", + "gpt-4o-mini-transcribe" + ] }, - "required": { - "description": "This specifies the properties that are required by the function.", - "type": "array", - "items": { - "type": "string" - } + "language": { + "type": "string", + "description": "This is the language that will be set for the transcription.", + "enum": [ + "af", + "ar", + "hy", + "az", + "be", + "bs", + "bg", + "ca", + "zh", + "hr", + "cs", + "da", + "nl", + "en", + "et", + "fi", + "fr", + "gl", + "de", + "el", + "he", + "hi", + "hu", + "is", + "id", + "it", + "ja", + "kn", + "kk", + "ko", + "lv", + "lt", + "mk", + "ms", + "mr", + "mi", + "ne", + "no", + "fa", + "pl", + "pt", + "ro", + "ru", + "sr", + "sk", + "sl", + "es", + "sw", + "sv", + "tl", + "ta", + "th", + "tr", + "uk", + "ur", + "vi", + "cy" + ] } }, "required": [ - "type", - "properties" + "provider", + "model" ] }, - "OpenAIFunction": { + "FallbackXaiTranscriber": { "type": "object", "properties": { - "strict": { - "type": "boolean", - "description": "This is a boolean that controls whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the parameters field. Only a subset of JSON Schema is supported when strict is true. Learn more about Structured Outputs in the [OpenAI guide](https://openai.com/index/introducing-structured-outputs-in-the-api/).\n\n@default false", - "default": false - }, - "name": { + "provider": { "type": "string", - "description": "This is the the name of the function to be called.\n\nMust be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", - "maxLength": 64, - "pattern": "/^[a-zA-Z0-9_-]{1,64}$/" + "enum": [ + "xai" + ] }, - "description": { + "model": { "type": "string", - "description": "This is the description of what the function does, used by the AI to choose when and how to call the function." + "description": "The xAI speech-to-text model to use. xAI currently exposes a single STT model — placeholder for future model selection.", + "enum": [ + "default" + ] }, - "parameters": { - "description": "These are the parameters the functions accepts, described as a JSON Schema object.\n\nSee the [OpenAI guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema) for documentation about the format.\n\nOmitting parameters defines a function with an empty parameter list.", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAIFunctionParameters" - } + "language": { + "type": "string", + "description": "Single language for transcription as an ISO 639-1 code (e.g., `en`, `es`). Defaults to `en` if not set. xAI auto-detects when omitted via the API but Vapi defaults to English for deterministic behavior.", + "enum": [ + "ar", + "cs", + "da", + "nl", + "en", + "fil", + "fr", + "de", + "hi", + "id", + "it", + "ja", + "ko", + "mk", + "ms", + "fa", + "pl", + "pt", + "ro", + "ru", + "es", + "sv", + "th", + "tr", + "vi" ] } }, "required": [ - "name" + "provider" ] }, - "CreateFunctionToolDTO": { + "LangfuseObservabilityPlan": { "type": "object", "properties": { - "messages": { - "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ToolMessageStart", - "title": "ToolMessageStart" - }, - { - "$ref": "#/components/schemas/ToolMessageComplete", - "title": "ToolMessageComplete" - }, - { - "$ref": "#/components/schemas/ToolMessageFailed", - "title": "ToolMessageFailed" - }, - { - "$ref": "#/components/schemas/ToolMessageDelayed", - "title": "ToolMessageDelayed" - } - ] - } - }, - "type": { + "provider": { "type": "string", "enum": [ - "function" - ], - "description": "The type of tool. \"function\" for Function tool." + "langfuse" + ] }, - "async": { - "type": "boolean", - "example": false, - "description": "This determines if the tool is async.\n\n If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.\n\n If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.\n\n Defaults to synchronous (`false`)." + "promptName": { + "type": "string", + "description": "The name of a Langfuse prompt to link generations to. This enables tracking which prompt version was used for each generation. https://langfuse.com/docs/prompt-management/features/link-to-traces" }, - "server": { - "description": "\n This is the server where a `tool-calls` webhook will be sent.\n\n Notes:\n - Webhook is sent to this server when a tool call is made.\n - Webhook contains the call, assistant, and phone number objects.\n - Webhook contains the variables set on the assistant.\n - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.\n - Webhook expects a response with tool call result.", - "allOf": [ - { - "$ref": "#/components/schemas/Server" - } - ] + "promptVersion": { + "type": "number", + "description": "The version number of the Langfuse prompt to link generations to. Used together with promptName to identify the exact prompt version. https://langfuse.com/docs/prompt-management/features/link-to-traces", + "minimum": 1 }, - "variableExtractionPlan": { - "description": "Plan to extract variables from the tool response", - "allOf": [ - { - "$ref": "#/components/schemas/VariableExtractionPlan" - } - ] + "traceName": { + "type": "string", + "description": "Custom name for the Langfuse trace. Supports Liquid templates.\n\nAvailable variables:\n- {{ call.id }} - Call UUID\n- {{ call.type }} - 'inboundPhoneCall', 'outboundPhoneCall', 'webCall'\n- {{ assistant.name }} - Assistant name\n- {{ assistant.id }} - Assistant ID\n\nExample: \"{{ assistant.name }} - {{ call.type }}\"\n\nDefaults to call ID if not provided." }, - "parameters": { - "description": "Static key-value pairs merged into the request body. Values support Liquid templates.", + "tags": { + "description": "This is an array of tags to be added to the Langfuse trace. Tags allow you to categorize and filter traces. https://langfuse.com/docs/tracing-features/tags", "type": "array", "items": { - "$ref": "#/components/schemas/ToolParameter" + "type": "string" } }, - "function": { - "description": "This is the function definition of the tool.", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAIFunction" - } - ] - }, - "rejectionPlan": { - "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", - "allOf": [ - { - "$ref": "#/components/schemas/ToolRejectionPlan" - } - ] + "metadata": { + "type": "object", + "description": "This is a JSON object that will be added to the Langfuse trace. Traces can be enriched with metadata to better understand your users, application, and experiments. https://langfuse.com/docs/tracing-features/metadata\nBy default it includes the call metadata, assistant metadata, and assistant overrides." } }, "required": [ - "type" + "provider", + "tags" ] }, - "GhlToolMetadata": { + "TextContent": { "type": "object", "properties": { - "workflowId": { - "type": "string" - }, - "locationId": { - "type": "string" - } - } - }, - "CreateGhlToolDTO": { - "type": "object", - "properties": { - "messages": { - "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ToolMessageStart", - "title": "ToolMessageStart" - }, - { - "$ref": "#/components/schemas/ToolMessageComplete", - "title": "ToolMessageComplete" - }, - { - "$ref": "#/components/schemas/ToolMessageFailed", - "title": "ToolMessageFailed" - }, - { - "$ref": "#/components/schemas/ToolMessageDelayed", - "title": "ToolMessageDelayed" - } - ] - } - }, "type": { "type": "string", "enum": [ - "ghl" - ], - "description": "The type of tool. \"ghl\" for GHL tool." + "text" + ] }, - "metadata": { - "$ref": "#/components/schemas/GhlToolMetadata" + "text": { + "type": "string" }, - "rejectionPlan": { - "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", - "allOf": [ - { - "$ref": "#/components/schemas/ToolRejectionPlan" - } + "language": { + "type": "string", + "enum": [ + "aa", + "ab", + "ae", + "af", + "ak", + "am", + "an", + "ar", + "as", + "av", + "ay", + "az", + "ba", + "be", + "bg", + "bh", + "bi", + "bm", + "bn", + "bo", + "br", + "bs", + "ca", + "ce", + "ch", + "co", + "cr", + "cs", + "cu", + "cv", + "cy", + "da", + "de", + "dv", + "dz", + "ee", + "el", + "en", + "eo", + "es", + "et", + "eu", + "fa", + "ff", + "fi", + "fj", + "fo", + "fr", + "fy", + "ga", + "gd", + "gl", + "gn", + "gu", + "gv", + "ha", + "he", + "hi", + "ho", + "hr", + "ht", + "hu", + "hy", + "hz", + "ia", + "id", + "ie", + "ig", + "ii", + "ik", + "io", + "is", + "it", + "iu", + "ja", + "jv", + "ka", + "kg", + "ki", + "kj", + "kk", + "kl", + "km", + "kn", + "ko", + "kr", + "ks", + "ku", + "kv", + "kw", + "ky", + "la", + "lb", + "lg", + "li", + "ln", + "lo", + "lt", + "lu", + "lv", + "mg", + "mh", + "mi", + "mk", + "ml", + "mn", + "mr", + "ms", + "mt", + "my", + "na", + "nb", + "nd", + "ne", + "ng", + "nl", + "nn", + "no", + "nr", + "nv", + "ny", + "oc", + "oj", + "om", + "or", + "os", + "pa", + "pi", + "pl", + "ps", + "pt", + "qu", + "rm", + "rn", + "ro", + "ru", + "rw", + "sa", + "sc", + "sd", + "se", + "sg", + "si", + "sk", + "sl", + "sm", + "sn", + "so", + "sq", + "sr", + "ss", + "st", + "su", + "sv", + "sw", + "ta", + "te", + "tg", + "th", + "ti", + "tk", + "tl", + "tn", + "to", + "tr", + "ts", + "tt", + "tw", + "ty", + "ug", + "uk", + "ur", + "uz", + "ve", + "vi", + "vo", + "wa", + "wo", + "xh", + "yi", + "yue", + "yo", + "za", + "zh", + "zu" ] } }, "required": [ "type", - "metadata" + "text", + "language" ] }, - "MakeToolMetadata": { + "Condition": { "type": "object", "properties": { - "scenarioId": { - "type": "number" + "operator": { + "type": "string", + "description": "This is the operator you want to use to compare the parameter and value.", + "enum": [ + "eq", + "neq", + "gt", + "gte", + "lt", + "lte" + ] }, - "triggerHookId": { - "type": "number" + "param": { + "type": "string", + "description": "This is the name of the parameter that you want to check.", + "maxLength": 1000 + }, + "value": { + "type": "string", + "description": "This is the value you want to compare against the parameter.", + "maxLength": 1000 } - } + }, + "required": [ + "operator", + "param", + "value" + ] }, - "CreateMakeToolDTO": { + "ToolMessageStart": { "type": "object", "properties": { - "messages": { + "contents": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "This is an alternative to the `content` property. It allows to specify variants of the same content, one per language.\n\nUsage:\n- If your assistants are multilingual, you can provide content for each language.\n- If you don't provide content for a language, the first item in the array will be automatically translated to the active language at that moment.\n\nThis will override the `content` property.", "items": { "oneOf": [ { - "$ref": "#/components/schemas/ToolMessageStart", - "title": "ToolMessageStart" - }, - { - "$ref": "#/components/schemas/ToolMessageComplete", - "title": "ToolMessageComplete" - }, - { - "$ref": "#/components/schemas/ToolMessageFailed", - "title": "ToolMessageFailed" - }, - { - "$ref": "#/components/schemas/ToolMessageDelayed", - "title": "ToolMessageDelayed" + "$ref": "#/components/schemas/TextContent", + "title": "Text" } ] } @@ -11758,28 +12972,34 @@ "type": { "type": "string", "enum": [ - "make" + "request-start" ], - "description": "The type of tool. \"make\" for Make tool." + "description": "This message is triggered when the tool call starts.\n\nThis message is never triggered for async tools.\n\nMultiple request-start messages are variants. One eligible variant is selected each time the tool starts.\n\nIf this message is not provided, one of the default filler messages \"Hold on a sec\", \"One moment\", \"Just a sec\", \"Give me a moment\" or \"This'll just take a sec\" will be used." }, - "metadata": { - "$ref": "#/components/schemas/MakeToolMetadata" + "blocking": { + "type": "boolean", + "description": "This is an optional boolean that if true, the tool call will only trigger after the message is spoken. Default is false.\n\n@default false", + "example": false, + "default": false }, - "rejectionPlan": { - "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", - "allOf": [ - { - "$ref": "#/components/schemas/ToolRejectionPlan" - } - ] + "content": { + "type": "string", + "description": "This is the content that the assistant says when this message is triggered.", + "maxLength": 1000 + }, + "conditions": { + "description": "This is an optional array of conditions that the tool call arguments must meet in order for this message to be triggered.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } } }, "required": [ - "type", - "metadata" + "type" ] }, - "CustomMessage": { + "ToolMessageComplete": { "type": "object", "properties": { "contents": { @@ -11796,725 +13016,770 @@ }, "type": { "type": "string", - "description": "This is a custom message.", + "description": "This message is triggered when the tool call is complete.\n\nThis message is triggered immediately without waiting for your server to respond for async tool calls.\n\nIf this message is not provided, the model will be requested to respond.\n\nIf this message is provided, only this message will be spoken and the model will not be requested to come up with a response. It's an exclusive OR.", "enum": [ - "custom-message" + "request-complete" + ] + }, + "role": { + "type": "string", + "description": "This is optional and defaults to \"assistant\".\n\nWhen role=assistant, `content` is said out loud.\n\nWhen role=system, `content` is passed to the model in a system message. Example:\n system: default one\n assistant:\n user:\n assistant:\n user:\n assistant:\n user:\n assistant: tool called\n tool: your server response\n <--- system prompt as hint\n ---> model generates response which is spoken\nThis is useful when you want to provide a hint to the model about what to say next.", + "enum": [ + "assistant", + "system" ] }, + "endCallAfterSpokenEnabled": { + "type": "boolean", + "description": "This is an optional boolean that if true, the call will end after the message is spoken. Default is false.\n\nThis is ignored if `role` is set to `system`.\n\n@default false", + "example": false + }, "content": { "type": "string", - "description": "This is the content that the assistant will say when this message is triggered.", + "description": "This is the content that the assistant says when this message is triggered.", "maxLength": 1000 + }, + "conditions": { + "description": "This is an optional array of conditions that the tool call arguments must meet in order for this message to be triggered.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } } }, "required": [ "type" ] }, - "TransferDestinationAssistant": { + "ToolMessageFailed": { "type": "object", "properties": { - "message": { - "description": "This is spoken to the customer before connecting them to the destination.\n\nUsage:\n- If this is not provided and transfer tool messages is not provided, default is \"Transferring the call now\".\n- If set to \"\", nothing is spoken. This is useful when you want to silently transfer. This is especially useful when transferring between assistants in a squad. In this scenario, you likely also want to set `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message` for the destination assistant.\n\nThis accepts a string or a ToolMessageStart class. Latter is useful if you want to specify multiple messages for different languages through the `contents` field.", - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/CustomMessage" - } - ] + "contents": { + "type": "array", + "description": "This is an alternative to the `content` property. It allows to specify variants of the same content, one per language.\n\nUsage:\n- If your assistants are multilingual, you can provide content for each language.\n- If you don't provide content for a language, the first item in the array will be automatically translated to the active language at that moment.\n\nThis will override the `content` property.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/TextContent", + "title": "Text" + } + ] + } }, "type": { "type": "string", + "description": "This message is triggered when the tool call fails.\n\nThis message is never triggered for async tool calls.\n\nIf this message is not provided, the model will be requested to respond.\n\nIf this message is provided, only this message will be spoken and the model will not be requested to come up with a response. It's an exclusive OR.", "enum": [ - "assistant" + "request-failed" ] }, - "transferMode": { + "role": { "type": "string", - "description": "This is the mode to use for the transfer. Defaults to `rolling-history`.\n\n- `rolling-history`: This is the default mode. It keeps the entire conversation history and appends the new assistant's system message on transfer.\n\n Example:\n\n Pre-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n\n Post-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n system: assistant2 system message\n assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`)\n\n- `swap-system-message-in-history`: This replaces the original system message with the new assistant's system message on transfer.\n\n Example:\n\n Pre-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n\n Post-transfer:\n system: assistant2 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`)\n\n- `delete-history`: This deletes the entire conversation history on transfer.\n\n Example:\n\n Pre-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n\n Post-transfer:\n system: assistant2 system message\n assistant: assistant2 first message\n user: Yes, please\n assistant: how can i help?\n user: i need help with my account\n\n- `swap-system-message-in-history-and-remove-transfer-tool-messages`: This replaces the original system message with the new assistant's system message on transfer and removes transfer tool messages from conversation history sent to the LLM.\n\n Example:\n\n Pre-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n transfer-tool\n transfer-tool-result\n assistant: (destination.message)\n\n Post-transfer:\n system: assistant2 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`)\n\n@default 'rolling-history'", + "description": "This is optional and defaults to \"assistant\".\n\nWhen role=assistant, `content` is said out loud when the tool call fails.\n\nWhen role=system, `content` is passed to the model as a system message\nalong with the failure result, and the model's generated response is\nspoken. Example:\n assistant: tool called\n tool: error from your server\n <--- system prompt as hint\n ---> model generates response which is spoken\nThis is useful when you want the model to generate an error-aware\nresponse instead of speaking a fixed failure message.", "enum": [ - "rolling-history", - "swap-system-message-in-history", - "swap-system-message-in-history-and-remove-transfer-tool-messages", - "delete-history" + "assistant", + "system" ] }, - "assistantName": { - "type": "string", - "description": "This is the assistant to transfer the call to." + "endCallAfterSpokenEnabled": { + "type": "boolean", + "description": "This is an optional boolean that if true, the call will end after the message is spoken. Default is false.\n\nThis is ignored if `role` is set to `system`.\n\n@default false", + "example": false }, - "description": { + "content": { "type": "string", - "description": "This is the description of the destination, used by the AI to choose when and how to transfer the call." - } - }, - "required": [ - "type", - "assistantName" - ] - }, - "TransferFallbackPlan": { - "type": "object", - "properties": { - "message": { - "description": "This is the message the assistant will deliver to the customer if the transfer fails.", - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/CustomMessage" - } - ] + "description": "This is the content that the assistant says when this message is triggered.", + "maxLength": 1000 }, - "endCallEnabled": { - "type": "boolean", - "description": "This controls what happens after delivering the failure message to the customer.\n- true: End the call after delivering the failure message (default)\n- false: Keep the assistant on the call to continue handling the customer's request\n\n@default true", - "default": true + "conditions": { + "description": "This is an optional array of conditions that the tool call arguments must meet in order for this message to be triggered.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Condition" + } } }, "required": [ - "message" + "type" ] }, - "TransferAssistantModel": { + "ToolMessageDelayed": { "type": "object", "properties": { - "provider": { + "contents": { + "type": "array", + "description": "This is an alternative to the `content` property. It allows to specify variants of the same content, one per language.\n\nUsage:\n- If your assistants are multilingual, you can provide content for each language.\n- If you don't provide content for a language, the first item in the array will be automatically translated to the active language at that moment.\n\nThis will override the `content` property.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/TextContent", + "title": "Text" + } + ] + } + }, + "type": { "type": "string", - "description": "The model provider for the transfer assistant", + "description": "This message is triggered when the tool call is delayed. Same timing means variants; different timings mean staged updates.", "enum": [ - "openai", - "anthropic", - "google", - "custom-llm" + "request-response-delayed" ] }, - "model": { - "type": "string", - "description": "The model name - must be compatible with the selected provider", - "example": "gpt-4o" + "timingMilliseconds": { + "type": "number", + "minimum": 100, + "maximum": 120000, + "example": 1000, + "description": "The number of milliseconds to wait for the server response before saying this delayed message." }, - "messages": { - "type": "array", - "description": "These are the messages used to configure the transfer assistant.\n\n@default: ```\n[\n {\n role: 'system',\n content: 'You are a transfer assistant designed to facilitate call transfers. Your core responsibility is to manage the transfer process efficiently.\\n\\n## Core Responsibility\\n- Facilitate the transfer process by using transferSuccessful or transferCancel tools appropriately\\n\\n## When to Respond\\n- Answer questions about the transfer process or provide summaries when specifically asked by the operator\\n- Respond to direct questions about the current transfer situation\\n\\n## What to Avoid\\n- Do not discuss topics unrelated to the transfer\\n- Do not engage in general conversation\\n- Keep all interactions focused on facilitating the transfer\\n\\n## Transfer Tools\\n- Use transferSuccessful when the transfer should proceed\\n- Use transferCancel when the transfer cannot be completed\\n\\nStay focused on your core responsibility of facilitating transfers.'\n }\n]```\n\n**Default Behavior:** If you don't provide any messages or don't include a system message as the first message, the default system message above will be automatically added.\n\n**Override Default:** To replace the default system message, provide your own system message as the first message in the array.\n\n**Add Context:** You can provide additional messages (user, assistant, etc.) to add context while keeping the default system message, or combine them with your custom system message." + "content": { + "type": "string", + "description": "This is the content that the assistant says when this message is triggered.", + "maxLength": 1000 }, - "tools": { + "conditions": { + "description": "This is an optional array of conditions that the tool call arguments must meet in order for this message to be triggered.", "type": "array", - "description": "Tools available to the transfer assistant during warm-transfer-experimental.\n\n**Default Behavior:** The transfer assistant will ALWAYS have both `transferSuccessful` and `transferCancel` tools automatically added, regardless of what you provide here.\n\n**Default Tools:**\n- `transferSuccessful`: \"Call this function to confirm the transfer is successful and connect the customer. Use this when you detect a human has answered and is ready to take the call.\"\n- `transferCancel`: \"Call this function to cancel the transfer when no human answers or transfer should not proceed. Use this when you detect voicemail, busy signal, or no answer.\"\n\n**Customization:** You can override the default tools by providing `transferSuccessful` and/or `transferCancel` tools with custom `function` or `messages` configurations.\n\n**Additional Tools:** You can also provide other tools, but the two transfer tools will always be present and available to the assistant." + "items": { + "$ref": "#/components/schemas/Condition" + } } }, "required": [ - "provider", - "model" + "type" ] }, - "RegexOption": { + "MessageTarget": { "type": "object", "properties": { - "type": { + "role": { "type": "string", - "description": "This is the type of the regex option. Options are:\n- `ignore-case`: Ignores the case of the text being matched. Add\n- `whole-word`: Matches whole words only.\n- `multi-line`: Matches across multiple lines.", + "description": "This is the role of the message to target.\n\nIf not specified, will find the position in the message history ignoring role (effectively `any`).", + "example": "user", "enum": [ - "ignore-case", - "whole-word", - "multi-line" + "user", + "assistant" ] }, - "enabled": { - "type": "boolean", - "description": "This is whether to enable the option.\n\n@default false" + "position": { + "type": "number", + "description": "This is the position of the message to target.\n- Negative numbers: Count from end (-1 = most recent, -2 = second most recent)\n- 0: First/oldest message in history\n- Positive numbers: Specific position (0-indexed from start)\n\n@default -1 (most recent message)", + "example": -1 } - }, - "required": [ - "type", - "enabled" - ] + } }, - "AssistantCustomEndpointingRule": { + "RegexCondition": { "type": "object", "properties": { "type": { "type": "string", - "description": "This endpointing rule is based on the last assistant message before customer started speaking.\n\nFlow:\n- Assistant speaks\n- Customer starts speaking\n- Customer transcription comes in\n- This rule is evaluated on the last assistant message\n- If a match is found based on `regex`, the endpointing timeout is set to `timeoutSeconds`\n\nUsage:\n- If you have yes/no questions in your use case like \"are you interested in a loan?\", you can set a shorter timeout.\n- If you have questions where the customer may pause to look up information like \"what's my account number?\", you can set a longer timeout.", + "description": "This is the type discriminator for regex condition", + "example": "regex", "enum": [ - "assistant" + "regex" ] }, "regex": { "type": "string", - "description": "This is the regex pattern to match.\n\nNote:\n- This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test(\"hello there\")` will return `true`.\n\nHot tip:\n- In JavaScript, escape `\\` when sending the regex pattern. Eg. `\"hello\\sthere\"` will be sent over the wire as `\"hellosthere\"`. Send `\"hello\\\\sthere\"` instead.\n- `RegExp.test` does substring matching, so `/cat/.test(\"I love cats\")` will return `true`. To do full string matching, send \"^cat$\"." - }, - "regexOptions": { - "description": "These are the options for the regex match. Defaults to all disabled.\n\n@default []", - "type": "array", - "items": { - "$ref": "#/components/schemas/RegexOption" - } + "description": "This is the regular expression pattern to match against message content.\n\nNote:\n- This works by using the RegExp.test method in Node.JS. Eg. /hello/.test(\"hello there\") will return true.\n\nHot tips:\n- In JavaScript, escape \\ when sending the regex pattern. Eg. \"hello\\sthere\" will be sent over the wire as \"hellosthere\". Send \"hello\\\\sthere\" instead.\n- RegExp.test does substring matching, so /cat/.test(\"I love cats\") will return true. To do full string matching, use anchors: /^cat$/ will only match exactly \"cat\".\n- Word boundaries \\b are useful for matching whole words: /\\bcat\\b/ matches \"cat\" but not \"cats\" or \"category\".\n- Use inline flags for portability: (?i) for case insensitive, (?m) for multiline", + "examples": [ + "\\\\b(cancel|stop|wait)\\\\b - Matches whole words", + "^yes$ - Matches exactly yes (full string match)", + "(?i)hello - Case insensitive match" + ] }, - "timeoutSeconds": { - "type": "number", - "description": "This is the endpointing timeout in seconds, if the rule is matched.", - "minimum": 0, - "maximum": 15 + "target": { + "description": "This is the target for messages to check against.\nIf not specified, the condition will run on the last message (position: -1).\nIf role is not specified, it will look at the last message regardless of role.\n@default { position: -1 }", + "allOf": [ + { + "$ref": "#/components/schemas/MessageTarget" + } + ] + }, + "negate": { + "type": "boolean", + "description": "This is the flag that when true, the condition matches if the pattern does NOT match.\nUseful for ensuring certain words/phrases are absent.\n\n@default false", + "example": "true - Reject if user hasn\"t said goodbye: { regex: \"\\\\b(bye|goodbye)\\\\b\", negate: true }" } }, "required": [ "type", - "regex", - "timeoutSeconds" + "regex" ] }, - "CustomerCustomEndpointingRule": { + "LiquidCondition": { "type": "object", "properties": { "type": { "type": "string", - "description": "This endpointing rule is based on current customer message as they are speaking.\n\nFlow:\n- Assistant speaks\n- Customer starts speaking\n- Customer transcription comes in\n- This rule is evaluated on the current customer transcription\n- If a match is found based on `regex`, the endpointing timeout is set to `timeoutSeconds`\n\nUsage:\n- If you want to wait longer while customer is speaking numbers, you can set a longer timeout.", + "description": "This is the type discriminator for liquid condition", + "example": "liquid", "enum": [ - "customer" + "liquid" ] }, - "regex": { + "liquid": { "type": "string", - "description": "This is the regex pattern to match.\n\nNote:\n- This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test(\"hello there\")` will return `true`.\n\nHot tip:\n- In JavaScript, escape `\\` when sending the regex pattern. Eg. `\"hello\\sthere\"` will be sent over the wire as `\"hellosthere\"`. Send `\"hello\\\\sthere\"` instead.\n- `RegExp.test` does substring matching, so `/cat/.test(\"I love cats\")` will return `true`. To do full string matching, send \"^cat$\"." - }, - "regexOptions": { - "description": "These are the options for the regex match. Defaults to all disabled.\n\n@default []", - "type": "array", - "items": { - "$ref": "#/components/schemas/RegexOption" - } - }, - "timeoutSeconds": { - "type": "number", - "description": "This is the endpointing timeout in seconds, if the rule is matched.", - "minimum": 0, - "maximum": 15 + "description": "This is the Liquid template that must return exactly \"true\" or \"false\" as a string.\nThe template is evaluated and the entire output must be either \"true\" or \"false\" - nothing else.\n\nAvailable variables:\n- `messages`: Array of recent messages in OpenAI chat completions format (ChatCompletionMessageParam[])\n Each message has properties like: role ('user', 'assistant', 'system'), content (string), etc.\n- `now`: Current timestamp in milliseconds (built-in Liquid variable)\n- Any assistant variable values (e.g., `userName`, `accountStatus`)\n\nUseful Liquid filters for messages:\n- `messages | last: 5` - Get the 5 most recent messages\n- `messages | where: 'role', 'user'` - Filter to only user messages\n- `messages | reverse` - Reverse the order of messages", + "examples": [ + "{% if messages.last.content contains goodbye %}true{% else %}false{% endif %}", + "{% assign userMessages = messages | where: role, user %}{% if userMessages.size > 3 %}true{% else %}false{% endif %}" + ] } }, "required": [ "type", - "regex", - "timeoutSeconds" + "liquid" ] }, - "BothCustomEndpointingRule": { + "GroupCondition": { "type": "object", "properties": { "type": { "type": "string", - "description": "This endpointing rule is based on both the last assistant message and the current customer message as they are speaking.\n\nFlow:\n- Assistant speaks\n- Customer starts speaking\n- Customer transcription comes in\n- This rule is evaluated on the last assistant message and the current customer transcription\n- If assistant message matches `assistantRegex` AND customer message matches `customerRegex`, the endpointing timeout is set to `timeoutSeconds`\n\nUsage:\n- If you want to wait longer while customer is speaking numbers, you can set a longer timeout.", + "description": "This is the type discriminator for group condition", + "example": "group", "enum": [ - "both" + "group" ] }, - "assistantRegex": { + "operator": { "type": "string", - "description": "This is the regex pattern to match the assistant's message.\n\nNote:\n- This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test(\"hello there\")` will return `true`.\n\nHot tip:\n- In JavaScript, escape `\\` when sending the regex pattern. Eg. `\"hello\\sthere\"` will be sent over the wire as `\"hellosthere\"`. Send `\"hello\\\\sthere\"` instead.\n- `RegExp.test` does substring matching, so `/cat/.test(\"I love cats\")` will return `true`. To do full string matching, send \"^cat$\"." - }, - "assistantRegexOptions": { - "description": "These are the options for the assistant's message regex match. Defaults to all disabled.\n\n@default []", - "type": "array", - "items": { - "$ref": "#/components/schemas/RegexOption" - } - }, - "customerRegex": { - "type": "string" + "description": "This is the logical operator for combining conditions in this group", + "examples": [ + "AND", + "OR" + ], + "enum": [ + "AND", + "OR" + ] }, - "customerRegexOptions": { - "description": "These are the options for the customer's message regex match. Defaults to all disabled.\n\n@default []", + "conditions": { "type": "array", + "description": "This is the list of nested conditions to evaluate.\nSupports recursive nesting of groups for complex logic.", + "examples": [ + "[{ type: \"regex\", regex: \"(?i)stop\", target: { role: \"user\" } }]", + "[{ type: \"group\", operator: \"AND\", conditions: [...] }]" + ], "items": { - "$ref": "#/components/schemas/RegexOption" + "oneOf": [ + { + "$ref": "#/components/schemas/RegexCondition", + "title": "RegexCondition" + }, + { + "$ref": "#/components/schemas/LiquidCondition", + "title": "LiquidCondition" + }, + { + "$ref": "#/components/schemas/GroupCondition", + "title": "GroupCondition", + "description": "This is the GroupCondition object but Swagger does not display nested schemas correctly." + } + ] } - }, - "timeoutSeconds": { - "type": "number", - "description": "This is the endpointing timeout in seconds, if the rule is matched.", - "minimum": 0, - "maximum": 15 } }, "required": [ "type", - "assistantRegex", - "customerRegex", - "timeoutSeconds" + "operator", + "conditions" ] }, - "VapiSmartEndpointingPlan": { + "ToolRejectionPlan": { "type": "object", "properties": { - "provider": { - "type": "string", - "description": "This is the provider for the smart endpointing plan.", - "enum": [ - "vapi", - "livekit", - "custom-endpointing-model" + "conditions": { + "type": "array", + "description": "This is the list of conditions that must be evaluated.\n\nUsage:\n- If all conditions match (AND logic), the tool call is rejected.\n- For OR logic at the top level, use a single 'group' condition with operator: 'OR'.\n\n@default [] - Empty array means tool always executes", + "examples": [ + "[{ type: \"regex\", regex: \"(?i)\\\\b(cancel|stop)\\\\b\", target: { role: \"user\" } }]", + "[{ type: \"group\", operator: \"OR\", conditions: [...] }]" ], - "example": "vapi" + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/RegexCondition", + "title": "RegexCondition" + }, + { + "$ref": "#/components/schemas/LiquidCondition", + "title": "LiquidCondition" + }, + { + "$ref": "#/components/schemas/GroupCondition", + "title": "GroupCondition", + "description": "This is the GroupCondition object but Swagger does not display nested schemas correctly." + } + ] + } } - }, - "required": [ - "provider" - ] + } }, - "LivekitSmartEndpointingPlan": { + "CreateDtmfToolDTO": { "type": "object", "properties": { - "provider": { + "messages": { + "type": "array", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" + }, + { + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" + }, + { + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" + }, + { + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] + } + }, + "type": { "type": "string", - "description": "This is the provider for the smart endpointing plan.", "enum": [ - "vapi", - "livekit", - "custom-endpointing-model" + "dtmf" ], - "example": "livekit" + "description": "The type of tool. \"dtmf\" for DTMF tool." }, - "waitFunction": { - "type": "string", - "description": "This expression describes how long the bot will wait to start speaking based on the likelihood that the user has reached an endpoint.\n\nThis is a millisecond valued function. It maps probabilities (real numbers on [0,1]) to milliseconds that the bot should wait before speaking ([0, \\infty]). Any negative values that are returned are set to zero (the bot can't start talking in the past).\n\nA probability of zero represents very high confidence that the caller has stopped speaking, and would like the bot to speak to them. A probability of one represents very high confidence that the caller is still speaking.\n\nUnder the hood, this is parsed into a mathjs expression. Whatever you use to write your expression needs to be valid with respect to mathjs\n\n@default \"20 + 500 * sqrt(x) + 2500 * x^3\"", - "examples": [ - "70 + 4000 * x", - "200 + 8000 * x", - "4000 * (1 - cos(pi * x))" + "sipInfoDtmfEnabled": { + "type": "boolean", + "description": "This enables sending DTMF tones via SIP INFO messages instead of RFC 2833 (RTP events). When enabled, DTMF digits will be sent using the SIP INFO method, which can be more reliable in some network configurations. Only relevant when using the `vapi.sip` transport.", + "default": false + }, + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/ToolRejectionPlan" + } ] } }, "required": [ - "provider" + "type" ] }, - "CustomEndpointingModelSmartEndpointingPlan": { + "CreateEndCallToolDTO": { "type": "object", "properties": { - "provider": { + "messages": { + "type": "array", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" + }, + { + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" + }, + { + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" + }, + { + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] + } + }, + "type": { "type": "string", - "description": "This is the provider for the smart endpointing plan. Use `custom-endpointing-model` for custom endpointing providers that are not natively supported.", "enum": [ - "vapi", - "livekit", - "custom-endpointing-model" + "endCall" ], - "example": "custom-endpointing-model" + "description": "The type of tool. \"endCall\" for End Call tool." }, - "server": { - "description": "This is where the endpointing request will be sent. If not provided, will be sent to `assistant.server`. If that does not exist either, will be sent to `org.server`.\n\nRequest Example:\n\nPOST https://{server.url}\nContent-Type: application/json\n\n{\n \"message\": {\n \"type\": \"call.endpointing.request\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"message\": \"Hello, how are you?\",\n \"time\": 1234567890,\n \"secondsFromStart\": 0\n }\n ],\n ...other metadata about the call...\n }\n}\n\nResponse Expected:\n{\n \"timeoutSeconds\": 0.5\n}\n\nThe timeout is the number of seconds to wait before considering the user's speech as finished. The endpointing timeout is automatically reset each time a new transcript is received (and another `call.endpointing.request` is sent).", + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", "allOf": [ { - "$ref": "#/components/schemas/Server" + "$ref": "#/components/schemas/ToolRejectionPlan" } ] } }, "required": [ - "provider" + "type" ] }, - "TranscriptionEndpointingPlan": { - "type": "object", - "properties": { - "onPunctuationSeconds": { - "type": "number", - "description": "The minimum number of seconds to wait after transcription ending with punctuation before sending a request to the model. Defaults to 0.1.\n\nThis setting exists because the transcriber punctuates the transcription when it's more confident that customer has completed a thought.\n\n@default 0.1", - "minimum": 0, - "maximum": 3, - "example": 0.1 - }, - "onNoPunctuationSeconds": { - "type": "number", - "description": "The minimum number of seconds to wait after transcription ending without punctuation before sending a request to the model. Defaults to 1.5.\n\nThis setting exists to catch the cases where the transcriber was not confident enough to punctuate the transcription, but the customer is done and has been silent for a long time.\n\n@default 1.5", - "minimum": 0, - "maximum": 3, - "example": 1.5 - }, - "onNumberSeconds": { - "type": "number", - "description": "The minimum number of seconds to wait after transcription ending with a number before sending a request to the model. Defaults to 0.4.\n\nThis setting exists because the transcriber will sometimes punctuate the transcription ending with a number, even though the customer hasn't uttered the full number. This happens commonly for long numbers when the customer reads the number in chunks.\n\n@default 0.5", - "minimum": 0, - "maximum": 3, - "example": 0.5 - } - } - }, - "StartSpeakingPlan": { + "CreateVoicemailToolDTO": { "type": "object", "properties": { - "waitSeconds": { - "type": "number", - "description": "This is how long assistant waits before speaking. Defaults to 0.4.\n\nThis is the minimum it will wait but if there is latency is the pipeline, this minimum will be exceeded. This is intended as a stopgap in case the pipeline is moving too fast.\n\nExample:\n- If model generates tokens and voice generates bytes within 100ms, the pipeline still waits 300ms before outputting speech.\n\nUsage:\n- If the customer is taking long pauses, set this to a higher value.\n- If the assistant is accidentally jumping in too much, set this to a higher value.\n\n@default 0.4", - "minimum": 0, - "maximum": 5, - "example": 0.4 - }, - "smartEndpointingEnabled": { - "example": false, - "deprecated": true, - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "string", - "enum": [ - "livekit" - ] - } - ] - }, - "smartEndpointingPlan": { - "description": "This is the plan for smart endpointing. Pick between Vapi smart endpointing, LiveKit, or custom endpointing model (or nothing). We strongly recommend using livekit endpointing when working in English. LiveKit endpointing is not supported in other languages, yet.\n\nIf this is set, it will override and take precedence over `transcriptionEndpointingPlan`.\nThis plan will still be overridden by any matching `customEndpointingRules`.\n\nIf this is not set, the system will automatically use the transcriber's built-in endpointing capabilities if available.", - "oneOf": [ - { - "$ref": "#/components/schemas/VapiSmartEndpointingPlan", - "title": "Vapi" - }, - { - "$ref": "#/components/schemas/LivekitSmartEndpointingPlan", - "title": "Livekit" - }, - { - "$ref": "#/components/schemas/CustomEndpointingModelSmartEndpointingPlan", - "title": "Custom Endpointing Model" - } - ] - }, - "customEndpointingRules": { + "messages": { "type": "array", - "description": "These are the custom endpointing rules to set an endpointing timeout based on a regex on the customer's speech or the assistant's last message.\n\nUsage:\n- If you have yes/no questions like \"are you interested in a loan?\", you can set a shorter timeout.\n- If you have questions where the customer may pause to look up information like \"what's my account number?\", you can set a longer timeout.\n- If you want to wait longer while customer is enumerating a list of numbers, you can set a longer timeout.\n\nThese rules have the highest precedence and will override both `smartEndpointingPlan` and `transcriptionEndpointingPlan` when a rule is matched.\n\nThe rules are evaluated in order and the first one that matches will be used.\n\nOrder of precedence for endpointing:\n1. customEndpointingRules (if any match)\n2. smartEndpointingPlan (if set)\n3. transcriptionEndpointingPlan\n\n@default []", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { - "$ref": "#/components/schemas/AssistantCustomEndpointingRule", - "title": "Assistant" + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" }, { - "$ref": "#/components/schemas/CustomerCustomEndpointingRule", - "title": "Customer" + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" }, { - "$ref": "#/components/schemas/BothCustomEndpointingRule", - "title": "Both" + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" + }, + { + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" } ] } }, - "transcriptionEndpointingPlan": { - "description": "This determines how a customer speech is considered done (endpointing) using the transcription of customer's speech.\n\nOnce an endpoint is triggered, the request is sent to `assistant.model`.\n\nNote: This plan is only used if `smartEndpointingPlan` is not set and transcriber does not have built-in endpointing capabilities. If both are provided, `smartEndpointingPlan` takes precedence.\nThis plan will also be overridden by any matching `customEndpointingRules`.", + "type": { + "type": "string", + "description": "The type of tool. \"voicemail\" for Voicemail tool.", + "enum": [ + "voicemail" + ] + }, + "beepDetectionEnabled": { + "type": "boolean", + "description": "This is the flag that enables beep detection for voicemail detection and applies only for twilio based calls.\n\n@default false", + "default": false, + "example": false + }, + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", "allOf": [ { - "$ref": "#/components/schemas/TranscriptionEndpointingPlan" + "$ref": "#/components/schemas/ToolRejectionPlan" } ] } - } - }, - "SmartDenoisingPlan": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Whether smart denoising using Krisp is enabled.", - "default": true - } - } + }, + "required": [ + "type" + ] }, - "FourierDenoisingPlan": { + "JsonSchema": { "type": "object", "properties": { - "enabled": { - "type": "boolean", - "description": "Whether Fourier denoising is enabled. Note that this is experimental and may not work as expected.", - "default": false - }, - "mediaDetectionEnabled": { - "type": "boolean", - "description": "Whether automatic media detection is enabled. When enabled, the filter will automatically\ndetect consistent background TV/music/radio and switch to more aggressive filtering settings.\nOnly applies when enabled is true.", - "example": true, - "default": true - }, - "staticThreshold": { - "type": "number", - "description": "Static threshold in dB used as fallback when no baseline is established.", - "example": -35, - "minimum": -80, - "maximum": 0, - "default": -35 - }, - "baselineOffsetDb": { - "type": "number", - "description": "How far below the rolling baseline to filter audio, in dB.\nLower values (e.g., -10) are more aggressive, higher values (e.g., -20) are more conservative.", - "example": -15, - "minimum": -30, - "maximum": -5, - "default": -15 - }, - "windowSizeMs": { - "type": "number", - "description": "Rolling window size in milliseconds for calculating the audio baseline.\nLarger windows adapt more slowly but are more stable.", - "example": 3000, - "minimum": 1000, - "maximum": 30000, - "default": 3000 + "type": { + "type": "string", + "description": "This is the type of output you'd like.\n\n`string`, `number`, `integer`, `boolean` are the primitive types and should be obvious.\n\n`array` and `object` are more interesting and quite powerful. They allow you to define nested structures.\n\nFor `array`, you can define the schema of the items in the array using the `items` property.\n\nFor `object`, you can define the properties of the object using the `properties` property.", + "enum": [ + "string", + "number", + "integer", + "boolean", + "array", + "object" + ] }, - "baselinePercentile": { - "type": "number", - "description": "Percentile to use for baseline calculation (1-99).\nHigher percentiles (e.g., 85) focus on louder speech, lower percentiles (e.g., 50) include quieter speech.", - "example": 85, - "minimum": 1, - "maximum": 99, - "default": 85 - } - } - }, - "BackgroundSpeechDenoisingPlan": { - "type": "object", - "properties": { - "smartDenoisingPlan": { - "description": "Whether smart denoising using Krisp is enabled.", + "items": { + "description": "This is required if the type is \"array\". This is the schema of the items in the array. This is a recursive reference to JsonSchema.", "allOf": [ { - "$ref": "#/components/schemas/SmartDenoisingPlan" + "$ref": "#/components/schemas/JsonSchema" } ] }, - "fourierDenoisingPlan": { - "description": "Whether Fourier denoising is enabled. Note that this is experimental and may not work as expected.\n\nThis can be combined with smart denoising, and will be run afterwards.", - "allOf": [ - { - "$ref": "#/components/schemas/FourierDenoisingPlan" - } + "properties": { + "type": "object", + "description": "This is required if the type is \"object\". This specifies the properties of the object. This is a map of property names to JsonSchema objects.", + "additionalProperties": { + "$ref": "#/components/schemas/JsonSchema" + } + }, + "description": { + "type": "string", + "description": "This is the description to help the model understand what it needs to output." + }, + "pattern": { + "type": "string", + "description": "This is the pattern of the string. This is a regex that will be used to validate the data in question. To use a common format, use the `format` property instead.\n\nOpenAI documentation: https://platform.openai.com/docs/guides/structured-outputs#supported-properties" + }, + "format": { + "type": "string", + "description": "This is the format of the string. To pass a regex, use the `pattern` property instead.\n\nOpenAI documentation: https://platform.openai.com/docs/guides/structured-outputs?api-mode=chat&type-restrictions=string-restrictions", + "enum": [ + "date-time", + "time", + "date", + "duration", + "email", + "hostname", + "ipv4", + "ipv6", + "uuid" ] + }, + "required": { + "description": "This is a list of properties that are required.\n\nThis only makes sense if the type is \"object\".", + "type": "array", + "items": { + "type": "string" + } + }, + "enum": { + "description": "This array specifies the allowed values that can be used to restrict the output of the model.", + "type": "array", + "items": { + "type": "string" + } + }, + "title": { + "type": "string", + "description": "This is the title of the schema." } - } + }, + "required": [ + "type" + ] }, - "TransferAssistant": { + "VariableExtractionAlias": { "type": "object", "properties": { - "name": { + "key": { "type": "string", - "description": "Optional name for the transfer assistant", - "maxLength": 100, - "default": "transfer-assistant", - "example": "Sales Transfer Assistant" - }, - "model": { - "description": "Model configuration for the transfer assistant", + "description": "This is the key of the variable.\n\nThis variable will be accessible during the call as `{{key}}` and stored in `call.artifact.variableValues` after the call.\n\nRules:\n- Must start with a letter (a-z, A-Z).\n- Subsequent characters can be letters, numbers, or underscores.\n- Minimum length of 1 and maximum length of 40.", + "minLength": 1, + "maxLength": 40, + "pattern": "/^[a-zA-Z][a-zA-Z0-9_]*$/" + }, + "value": { + "type": "string", + "description": "This is the value of the variable.\n\nThis can reference existing variables, use filters, and perform transformations.\n\nExamples: \"{{name}}\", \"{{customer.email}}\", \"Hello {{name | upcase}}\"", + "maxLength": 10000 + } + }, + "required": [ + "key", + "value" + ] + }, + "VariableExtractionPlan": { + "type": "object", + "properties": { + "schema": { + "description": "This is the schema to extract.\n\nExamples:\n1. To extract object properties, you can use the following schema:\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"number\"\n }\n }\n}\n```\n\nThese will be extracted as `{{ name }}` and `{{ age }}` respectively. To emphasize, object properties are extracted as direct global variables.\n\n2. To extract nested properties, you can use the following schema:\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"object\",\n \"properties\": {\n \"first\": {\n \"type\": \"string\"\n },\n \"last\": {\n \"type\": \"string\"\n }\n }\n }\n }\n}\n```\n\nThese will be extracted as `{{ name }}`. And, `{{ name.first }}` and `{{ name.last }}` will be accessible.\n\n3. To extract array items, you can use the following schema:\n```json\n{\n \"type\": \"array\",\n \"title\": \"zipCodes\",\n \"items\": {\n \"type\": \"string\"\n }\n}\n```\n\nThis will be extracted as `{{ zipCodes }}`. To access the array items, you can use `{{ zipCodes[0] }}` and `{{ zipCodes[1] }}`.\n\n4. To extract array of objects, you can use the following schema:\n\n```json\n{\n \"type\": \"array\",\n \"name\": \"people\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"number\"\n },\n \"zipCodes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n }\n}\n```\n\nThis will be extracted as `{{ people }}`. To access the array items, you can use `{{ people[n].name }}`, `{{ people[n].age }}`, `{{ people[n].zipCodes }}`, `{{ people[n].zipCodes[0] }}` and `{{ people[n].zipCodes[1] }}`.", "allOf": [ { - "$ref": "#/components/schemas/TransferAssistantModel" + "$ref": "#/components/schemas/JsonSchema" } ] }, - "voice": { - "description": "These are the options for the transfer assistant's voice.", + "aliases": { + "description": "These are additional variables to create.\n\nThese will be accessible during the call as `{{key}}` and stored in `call.artifact.variableValues` after the call.\n\nExample:\n```json\n{\n \"aliases\": [\n {\n \"key\": \"customerName\",\n \"value\": \"{{name}}\"\n },\n {\n \"key\": \"fullName\",\n \"value\": \"{{firstName}} {{lastName}}\"\n },\n {\n \"key\": \"greeting\",\n \"value\": \"Hello {{name}}, welcome to {{company}}!\"\n },\n {\n \"key\": \"customerCity\",\n \"value\": \"{{addresses[0].city}}\"\n },\n {\n \"key\": \"something\",\n \"value\": \"{{any liquid}}\"\n }\n ]\n}\n```\n\nThis will create variables `customerName`, `fullName`, `greeting`, `customerCity`, and `something`. To access these variables, you can reference them as `{{customerName}}`, `{{fullName}}`, `{{greeting}}`, `{{customerCity}}`, and `{{something}}`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/VariableExtractionAlias" + } + } + } + }, + "ToolParameter": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "This is the key of the parameter." + }, + "value": { + "description": "The value of the parameter. Any JSON type. String values support Liquid templates.", "oneOf": [ { - "$ref": "#/components/schemas/AzureVoice", - "title": "AzureVoice" - }, - { - "$ref": "#/components/schemas/CartesiaVoice", - "title": "CartesiaVoice" - }, - { - "$ref": "#/components/schemas/CustomVoice", - "title": "CustomVoice" - }, - { - "$ref": "#/components/schemas/DeepgramVoice", - "title": "DeepgramVoice" - }, - { - "$ref": "#/components/schemas/ElevenLabsVoice", - "title": "ElevenLabsVoice" - }, - { - "$ref": "#/components/schemas/HumeVoice", - "title": "HumeVoice" - }, - { - "$ref": "#/components/schemas/LMNTVoice", - "title": "LMNTVoice" - }, - { - "$ref": "#/components/schemas/NeuphonicVoice", - "title": "NeuphonicVoice" - }, - { - "$ref": "#/components/schemas/OpenAIVoice", - "title": "OpenAIVoice" - }, - { - "$ref": "#/components/schemas/PlayHTVoice", - "title": "PlayHTVoice" - }, - { - "$ref": "#/components/schemas/WellSaidVoice", - "title": "WellSaidVoice" - }, - { - "$ref": "#/components/schemas/RimeAIVoice", - "title": "RimeAIVoice" - }, - { - "$ref": "#/components/schemas/SmallestAIVoice", - "title": "SmallestAIVoice" - }, - { - "$ref": "#/components/schemas/TavusVoice", - "title": "TavusVoice" + "type": "string" }, { - "$ref": "#/components/schemas/VapiVoice", - "title": "VapiVoice" + "type": "number" }, { - "$ref": "#/components/schemas/SesameVoice", - "title": "SesameVoice" + "type": "boolean" }, { - "$ref": "#/components/schemas/InworldVoice", - "title": "InworldVoice" + "type": "object" }, { - "$ref": "#/components/schemas/MinimaxVoice", - "title": "MinimaxVoice" + "type": "array" } ] + } + }, + "required": [ + "key", + "value" + ] + }, + "OpenAIFunctionParameters": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This must be set to 'object'. It instructs the model to return a JSON object containing the function call properties.", + "enum": [ + "object" + ] }, - "transcriber": { - "description": "These are the options for the transfer assistant's transcriber.", - "oneOf": [ - { - "$ref": "#/components/schemas/AssemblyAITranscriber", - "title": "AssemblyAITranscriber" - }, - { - "$ref": "#/components/schemas/AzureSpeechTranscriber", - "title": "AzureSpeechTranscriber" - }, - { - "$ref": "#/components/schemas/CustomTranscriber", - "title": "CustomTranscriber" - }, - { - "$ref": "#/components/schemas/DeepgramTranscriber", - "title": "DeepgramTranscriber" - }, - { - "$ref": "#/components/schemas/ElevenLabsTranscriber", - "title": "ElevenLabsTranscriber" - }, - { - "$ref": "#/components/schemas/GladiaTranscriber", - "title": "GladiaTranscriber" - }, - { - "$ref": "#/components/schemas/GoogleTranscriber", - "title": "GoogleTranscriber" - }, - { - "$ref": "#/components/schemas/SpeechmaticsTranscriber", - "title": "SpeechmaticsTranscriber" - }, - { - "$ref": "#/components/schemas/TalkscriberTranscriber", - "title": "TalkscriberTranscriber" - }, - { - "$ref": "#/components/schemas/OpenAITranscriber", - "title": "OpenAITranscriber" - }, - { - "$ref": "#/components/schemas/CartesiaTranscriber", - "title": "CartesiaTranscriber" - }, + "properties": { + "type": "object", + "description": "This provides a description of the properties required by the function.\nJSON Schema can be used to specify expectations for each property.\nRefer to [this doc](https://ajv.js.org/json-schema.html#json-data-type) for a comprehensive guide on JSON Schema.", + "additionalProperties": { + "$ref": "#/components/schemas/JsonSchema" + } + }, + "required": { + "description": "This specifies the properties that are required by the function.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "type", + "properties" + ] + }, + "OpenAIFunction": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "This is the the name of the function to be called.\n\nMust be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", + "maxLength": 64, + "pattern": "/^[a-zA-Z0-9_-]{1,64}$/" + }, + "strict": { + "type": "boolean", + "description": "This is a boolean that controls whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the parameters field. Only a subset of JSON Schema is supported when strict is true. Learn more about Structured Outputs in the [OpenAI guide](https://openai.com/index/introducing-structured-outputs-in-the-api/).\n\n@default false", + "default": false + }, + "description": { + "type": "string", + "description": "This is the description of what the function does, used by the AI to choose when and how to call the function." + }, + "parameters": { + "description": "These are the parameters the functions accepts, described as a JSON Schema object.\n\nSee the [OpenAI guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema) for documentation about the format.\n\nOmitting parameters defines a function with an empty parameter list.", + "allOf": [ { - "$ref": "#/components/schemas/SonioxTranscriber", - "title": "SonioxTranscriber" + "$ref": "#/components/schemas/OpenAIFunctionParameters" } ] + } + }, + "required": [ + "name" + ] + }, + "CreateFunctionToolDTO": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" + }, + { + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" + }, + { + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" + }, + { + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] + } }, - "firstMessage": { + "type": { "type": "string", - "description": "This is the first message that the transfer assistant will say.\nThis can also be a URL to a custom audio file.\n\nIf unspecified, assistant will wait for user to speak and use the model to respond once they speak.", - "example": "Hello! I understand you need to be transferred. Let me connect you." + "enum": [ + "function" + ], + "description": "The type of tool. \"function\" for Function tool." }, - "backgroundSound": { - "description": "This is the background sound in the transfer assistant call. Default for phone calls is 'office' and default for web calls is 'off'.\nYou can also provide a custom sound by providing a URL to an audio file.", - "oneOf": [ - { - "type": "string", - "enum": [ - "off", - "office" - ], - "example": "office" - }, + "async": { + "type": "boolean", + "example": false, + "description": "This determines if the tool is async.\n\n If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.\n\n If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.\n\n Defaults to synchronous (`false`)." + }, + "server": { + "description": "\n This is the server where a `tool-calls` webhook will be sent.\n\n Notes:\n - Webhook is sent to this server when a tool call is made.\n - Webhook contains the call, assistant, and phone number objects.\n - Webhook contains the variables set on the assistant.\n - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.\n - Webhook expects a response with tool call result.", + "allOf": [ { - "type": "string", - "format": "uri", - "example": "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3" + "$ref": "#/components/schemas/Server" } ] }, - "startSpeakingPlan": { - "description": "This is the plan for when the transfer assistant should start talking.\n\nYou should configure this if the transfer assistant needs different endpointing behavior than the base assistant.\n\nIf this is not set, the transfer assistant will inherit the start speaking plan from the base assistant.", + "variableExtractionPlan": { + "description": "Plan to extract variables from the tool response", "allOf": [ { - "$ref": "#/components/schemas/StartSpeakingPlan" + "$ref": "#/components/schemas/VariableExtractionPlan" } ] }, - "firstMessageMode": { - "type": "string", - "description": "This is the mode for the first message. Default is 'assistant-speaks-first'.\n\nUse:\n- 'assistant-speaks-first' to have the assistant speak first.\n- 'assistant-waits-for-user' to have the assistant wait for the user to speak first.\n- 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state.\n\n@default 'assistant-speaks-first'", - "enum": [ - "assistant-speaks-first", - "assistant-speaks-first-with-model-generated-message", - "assistant-waits-for-user" - ], - "example": "assistant-speaks-first" - }, - "maxDurationSeconds": { - "type": "number", - "description": "This is the maximum duration in seconds for the transfer assistant conversation.\nAfter this time, the transfer will be cancelled automatically.\n@default 120", - "minimum": 10, - "maximum": 43200, - "example": 120 + "parameters": { + "description": "Static key-value pairs merged into the request body. Values support Liquid templates.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ToolParameter" + } }, - "backgroundSpeechDenoisingPlan": { - "description": "This enables filtering of noise and background speech while the user is talking.\n\nFeatures:\n- Smart denoising using Krisp\n- Fourier denoising\n\nSmart denoising can be combined with or used independently of Fourier denoising.\n\nOrder of precedence:\n- Smart denoising\n- Fourier denoising", + "function": { + "description": "This is the function definition of the tool.", "allOf": [ { - "$ref": "#/components/schemas/BackgroundSpeechDenoisingPlan" + "$ref": "#/components/schemas/OpenAIFunction" } ] }, - "silenceTimeoutSeconds": { - "type": "number", - "description": "This is the number of seconds of silence to wait before ending the call. Defaults to 30.\n\n@default 30", - "minimum": 10, - "maximum": 3600 + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/ToolRejectionPlan" + } + ] } }, "required": [ - "model" + "type" ] }, - "TransferCancelToolUserEditable": { + "GhlToolMetadata": { + "type": "object", + "properties": { + "workflowId": { + "type": "string" + }, + "locationId": { + "type": "string" + } + } + }, + "CreateGhlToolDTO": { "type": "object", "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -12539,9 +13804,12 @@ "type": { "type": "string", "enum": [ - "transferCancel" + "ghl" ], - "description": "The type of tool. \"transferCancel\" for Transfer Cancel tool. This tool can only be used during warm-transfer-experimental by the transfer assistant to cancel an ongoing transfer and return the call back to the original assistant when the transfer cannot be completed." + "description": "The type of tool. \"ghl\" for GHL tool." + }, + "metadata": { + "$ref": "#/components/schemas/GhlToolMetadata" }, "rejectionPlan": { "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", @@ -12553,15 +13821,27 @@ } }, "required": [ - "type" + "type", + "metadata" ] }, - "TransferSuccessfulToolUserEditable": { + "MakeToolMetadata": { + "type": "object", + "properties": { + "scenarioId": { + "type": "number" + }, + "triggerHookId": { + "type": "number" + } + } + }, + "CreateMakeToolDTO": { "type": "object", "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -12586,9 +13866,12 @@ "type": { "type": "string", "enum": [ - "transferSuccessful" + "make" ], - "description": "The type of tool. \"transferSuccessful\" for Transfer Successful tool. This tool can only be used during warm-transfer-experimental by the transfer assistant to confirm that the transfer should proceed and finalize the handoff to the destination." + "description": "The type of tool. \"make\" for Make tool." + }, + "metadata": { + "$ref": "#/components/schemas/MakeToolMetadata" }, "rejectionPlan": { "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", @@ -12600,50 +13883,47 @@ } }, "required": [ - "type" + "type", + "metadata" ] }, - "SummaryPlan": { + "CustomMessage": { "type": "object", "properties": { - "messages": { - "description": "These are the messages used to generate the summary.\n\n@default: ```\n[\n {\n \"role\": \"system\",\n \"content\": \"You are an expert note-taker. You will be given a transcript of a call. Summarize the call in 2-3 sentences. DO NOT return anything except the summary.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Here is the transcript:\\n\\n{{transcript}}\\n\\n. Here is the ended reason of the call:\\n\\n{{endedReason}}\\n\\n\"\n }\n]```\n\nYou can customize by providing any messages you want.\n\nHere are the template variables available:\n- {{transcript}}: The transcript of the call from `call.artifact.transcript` \n- {{systemPrompt}}: The system prompt of the call from `assistant.model.messages[type=system].content` \n- {{messages}}: The messages of the call from `assistant.model.messages` \n- {{endedReason}}: The ended reason of the call from `call.endedReason`", + "contents": { "type": "array", + "description": "This is an alternative to the `content` property. It allows to specify variants of the same content, one per language.\n\nUsage:\n- If your assistants are multilingual, you can provide content for each language.\n- If you don't provide content for a language, the first item in the array will be automatically translated to the active language at that moment.\n\nThis will override the `content` property.", "items": { - "type": "object" + "oneOf": [ + { + "$ref": "#/components/schemas/TextContent", + "title": "Text" + } + ] } }, - "enabled": { - "type": "boolean", - "description": "This determines whether a summary is generated and stored in `call.analysis.summary`. Defaults to true.\n\nUsage:\n- If you want to disable the summary, set this to false.\n\n@default true" + "type": { + "type": "string", + "description": "This is a custom message.", + "enum": [ + "custom-message" + ] }, - "timeoutSeconds": { - "type": "number", - "description": "This is how long the request is tried before giving up. When request times out, `call.analysis.summary` will be empty.\n\nUsage:\n- To guarantee the summary is generated, set this value high. Note, this will delay the end of call report in cases where model is slow to respond.\n\n@default 5 seconds", - "minimum": 1, - "maximum": 60 + "content": { + "type": "string", + "description": "This is the content that the assistant will say when this message is triggered.", + "maxLength": 1000 } - } + }, + "required": [ + "type" + ] }, - "TransferPlan": { + "TransferDestinationAssistant": { "type": "object", "properties": { - "mode": { - "type": "string", - "description": "This configures how transfer is executed and the experience of the destination party receiving the call.\n\nUsage:\n- `blind-transfer`: The assistant forwards the call to the destination without any message or summary.\n- `blind-transfer-add-summary-to-sip-header`: The assistant forwards the call to the destination and adds a SIP header X-Transfer-Summary to the call to include the summary.\n- `warm-transfer-say-message`: The assistant dials the destination, delivers the `message` to the destination party, connects the customer, and leaves the call.\n- `warm-transfer-say-summary`: The assistant dials the destination, provides a summary of the call to the destination party, connects the customer, and leaves the call.\n- `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`: The assistant dials the destination, waits for the operator to speak, delivers the `message` to the destination party, and then connects the customer.\n- `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary`: The assistant dials the destination, waits for the operator to speak, provides a summary of the call to the destination party, and then connects the customer.\n- `warm-transfer-twiml`: The assistant dials the destination, executes the twiml instructions on the destination call leg, connects the customer, and leaves the call.\n- `warm-transfer-experimental`: The assistant puts the customer on hold, dials the destination, and if the destination answers (and is human), delivers a message or summary before connecting the customer. If the destination is unreachable or not human (e.g., with voicemail detection), the assistant delivers the `fallbackMessage` to the customer and optionally ends the call.\n\n@default 'blind-transfer'", - "enum": [ - "blind-transfer", - "blind-transfer-add-summary-to-sip-header", - "warm-transfer-say-message", - "warm-transfer-say-summary", - "warm-transfer-twiml", - "warm-transfer-wait-for-operator-to-speak-first-and-then-say-message", - "warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary", - "warm-transfer-experimental" - ] - }, "message": { - "description": "This is the message the assistant will deliver to the destination party before connecting the customer.\n\nUsage:\n- Used only when `mode` is `blind-transfer-add-summary-to-sip-header`, `warm-transfer-say-message`, `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`, or `warm-transfer-experimental`.", + "description": "This is spoken to the customer before connecting them to the destination.\n\nUsage:\n- If this is not provided and transfer tool messages is not provided, default is \"Transferring the call now\".\n- If set to \"\", nothing is spoken. This is useful when you want to silently transfer. This is especially useful when transferring between assistants in a squad. In this scenario, you likely also want to set `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message` for the destination assistant.\n\nThis accepts a string or a ToolMessageStart class. Latter is useful if you want to specify multiple messages for different languages through the `contents` field.", "oneOf": [ { "type": "string" @@ -12653,779 +13933,712 @@ } ] }, - "timeout": { - "type": "number", - "description": "This is the timeout in seconds for the warm-transfer-wait-for-operator-to-speak-first-and-then-say-message/summary\n\n@default 60", - "minimum": 1, - "maximum": 600, - "default": 60 - }, - "sipVerb": { - "type": "object", - "description": "This specifies the SIP verb to use while transferring the call.\n- 'refer': Uses SIP REFER to transfer the call (default)\n- 'bye': Ends current call with SIP BYE\n- 'dial': Uses SIP DIAL to transfer the call", - "default": "refer", + "type": { + "type": "string", "enum": [ - "refer", - "bye", - "dial" + "assistant" ] }, - "dialTimeout": { - "type": "number", - "description": "This sets the timeout for the dial operation in seconds. This is the duration the call will ring before timing out.\n\nOnly applicable when `sipVerb='dial'`. Not applicable for SIP REFER or BYE.\n\n@default 60", - "minimum": 1, - "maximum": 600, - "default": 60 - }, - "holdAudioUrl": { + "transferMode": { "type": "string", - "description": "This is the URL to an audio file played while the customer is on hold during transfer.\n\nUsage:\n- Used only when `mode` is `warm-transfer-experimental`.\n- Used when transferring calls to play hold audio for the customer.\n- Must be a publicly accessible URL to an audio file.\n- Supported formats: MP3 and WAV.\n- If not provided, the default hold audio will be used." + "description": "This is the mode to use for the transfer. Defaults to `rolling-history`.\n\n- `rolling-history`: This is the default mode. It keeps the entire conversation history and appends the new assistant's system message on transfer.\n\n Example:\n\n Pre-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n\n Post-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n system: assistant2 system message\n assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`)\n\n- `swap-system-message-in-history`: This replaces the original system message with the new assistant's system message on transfer.\n\n Example:\n\n Pre-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n\n Post-transfer:\n system: assistant2 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`)\n\n- `delete-history`: This deletes the entire conversation history on transfer.\n\n Example:\n\n Pre-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n\n Post-transfer:\n system: assistant2 system message\n assistant: assistant2 first message\n user: Yes, please\n assistant: how can i help?\n user: i need help with my account\n\n- `swap-system-message-in-history-and-remove-transfer-tool-messages`: This replaces the original system message with the new assistant's system message on transfer and removes transfer tool messages from conversation history sent to the LLM.\n\n Example:\n\n Pre-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n transfer-tool\n transfer-tool-result\n assistant: (destination.message)\n\n Post-transfer:\n system: assistant2 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`)\n\n@default 'rolling-history'", + "enum": [ + "rolling-history", + "swap-system-message-in-history", + "swap-system-message-in-history-and-remove-transfer-tool-messages", + "delete-history" + ] }, - "transferCompleteAudioUrl": { + "assistantName": { "type": "string", - "description": "This is the URL to an audio file played after the warm transfer message or summary is delivered to the destination party.\nIt can be used to play a custom sound like 'beep' to notify that the transfer is complete.\n\nUsage:\n- Used only when `mode` is `warm-transfer-experimental`.\n- Used when transferring calls to play hold audio for the destination party.\n- Must be a publicly accessible URL to an audio file.\n- Supported formats: MP3 and WAV." + "description": "This is the assistant to transfer the call to." }, - "contextEngineeringPlan": { - "description": "This is the plan for manipulating the message context before initiating the warm transfer.\nUsage:\n- Used only when `mode` is `warm-transfer-experimental`.\n- These messages will automatically be added to the transferAssistant's system message.\n- If 'none', we will not add any transcript to the transferAssistant's system message.\n- If you want to provide your own messages, use transferAssistant.model.messages instead.\n\n@default { type: 'all' }", + "description": { + "type": "string", + "description": "This is the description of the destination, used by the AI to choose when and how to transfer the call." + } + }, + "required": [ + "type", + "assistantName" + ] + }, + "TransferFallbackPlan": { + "type": "object", + "properties": { + "message": { + "description": "This is the message the assistant will deliver to the customer if the transfer fails.", "oneOf": [ { - "$ref": "#/components/schemas/ContextEngineeringPlanLastNMessages", - "title": "Last N Messages" - }, - { - "$ref": "#/components/schemas/ContextEngineeringPlanNone", - "title": "None" + "type": "string" }, { - "$ref": "#/components/schemas/ContextEngineeringPlanAll", - "title": "All" - } - ] - }, - "twiml": { - "type": "string", - "description": "This is the TwiML instructions to execute on the destination call leg before connecting the customer.\n\nUsage:\n- Used only when `mode` is `warm-transfer-twiml`.\n- Supports only `Play`, `Say`, `Gather`, `Hangup` and `Pause` verbs.\n- Maximum length is 4096 characters.\n\nExample:\n```\nHello, transferring a customer to you.\n\nThey called about billing questions.\n```", - "maxLength": 4096 - }, - "summaryPlan": { - "description": "This is the plan for generating a summary of the call to present to the destination party.\n\nUsage:\n- Used only when `mode` is `blind-transfer-add-summary-to-sip-header` or `warm-transfer-say-summary` or `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary` or `warm-transfer-experimental`.", - "allOf": [ - { - "$ref": "#/components/schemas/SummaryPlan" + "$ref": "#/components/schemas/CustomMessage" } ] }, - "sipHeadersInReferToEnabled": { + "endCallEnabled": { "type": "boolean", - "description": "This flag includes the sipHeaders from above in the refer to sip uri as url encoded query params.\n\n@default false" - }, - "fallbackPlan": { - "description": "This configures the fallback plan when the transfer fails (destination unreachable, busy, or not human).\n\nUsage:\n- Used only when `mode` is `warm-transfer-experimental`.\n- If not provided when using `warm-transfer-experimental`, a default message will be used.", - "allOf": [ - { - "$ref": "#/components/schemas/TransferFallbackPlan" - } - ] + "description": "This controls what happens after delivering the failure message to the customer.\n- true: End the call after delivering the failure message (default)\n- false: Keep the assistant on the call to continue handling the customer's request\n\n@default true", + "default": true } }, "required": [ - "mode" + "message" ] }, - "TransferDestinationNumber": { + "TransferAssistantModel": { "type": "object", "properties": { - "message": { - "description": "This is spoken to the customer before connecting them to the destination.\n\nUsage:\n- If this is not provided and transfer tool messages is not provided, default is \"Transferring the call now\".\n- If set to \"\", nothing is spoken. This is useful when you want to silently transfer. This is especially useful when transferring between assistants in a squad. In this scenario, you likely also want to set `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message` for the destination assistant.\n\nThis accepts a string or a ToolMessageStart class. Latter is useful if you want to specify multiple messages for different languages through the `contents` field.", - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/CustomMessage" - } - ] - }, - "type": { + "provider": { "type": "string", + "description": "The model provider for the transfer assistant", "enum": [ - "number" + "openai", + "anthropic", + "google", + "custom-llm" ] }, - "numberE164CheckEnabled": { - "type": "boolean", - "description": "This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it.\n\nUse cases:\n- `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks.\n- `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.\n\nIf `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`).\n\n@default true (E164 check is enabled)", - "default": true - }, - "number": { - "type": "string", - "description": "This is the phone number to transfer the call to.", - "minLength": 3, - "maxLength": 40 - }, - "extension": { - "type": "string", - "description": "This is the extension to dial after transferring the call to the `number`.", - "minLength": 1, - "maxLength": 10 - }, - "callerId": { + "model": { "type": "string", - "description": "This is the caller ID to use when transferring the call to the `number`.\n\nUsage:\n- If not provided, the caller ID will be the number the call is coming **from**.\n Example: a customer with number +14151111111 calls in to and the assistant transfers out to +16470000000. +16470000000 will see +14151111111 as the caller.\n For inbound calls, the caller ID is the customer's number. For outbound calls, the caller ID is the phone number of the assistant.\n- To change this behavior, provide a `callerId`.\n- Set to '{{customer.number}}' to always use the customer's number as the caller ID.\n- Set to '{{phoneNumber.number}}' to always use the phone number of the assistant as the caller ID.\n- Set to any E164 number to always use that number as the caller ID. This needs to be a number that is owned or verified by your Transport provider like Twilio.\n\nFor Twilio, you can read up more here: https://www.twilio.com/docs/voice/twiml/dial#callerid", - "maxLength": 40 + "description": "The model name - must be compatible with the selected provider", + "example": "gpt-4o" }, - "transferPlan": { - "description": "This configures how transfer is executed and the experience of the destination party receiving the call. Defaults to `blind-transfer`.\n\n@default `transferPlan.mode='blind-transfer'`", - "allOf": [ - { - "$ref": "#/components/schemas/TransferPlan" - } - ] + "messages": { + "type": "array", + "description": "These are the messages used to configure the transfer assistant.\n\n@default: ```\n[\n {\n role: 'system',\n content: 'You are a transfer assistant designed to facilitate call transfers. Your core responsibility is to manage the transfer process efficiently.\\n\\n## Core Responsibility\\n- Facilitate the transfer process by using transferSuccessful or transferCancel tools appropriately\\n\\n## When to Respond\\n- Answer questions about the transfer process or provide summaries when specifically asked by the operator\\n- Respond to direct questions about the current transfer situation\\n\\n## What to Avoid\\n- Do not discuss topics unrelated to the transfer\\n- Do not engage in general conversation\\n- Keep all interactions focused on facilitating the transfer\\n\\n## Transfer Tools\\n- Use transferSuccessful when the transfer should proceed\\n- Use transferCancel when the transfer cannot be completed\\n\\nStay focused on your core responsibility of facilitating transfers.'\n }\n]```\n\n**Default Behavior:** If you don't provide any messages or don't include a system message as the first message, the default system message above will be automatically added.\n\n**Override Default:** To replace the default system message, provide your own system message as the first message in the array.\n\n**Add Context:** You can provide additional messages (user, assistant, etc.) to add context while keeping the default system message, or combine them with your custom system message." }, - "description": { - "type": "string", - "description": "This is the description of the destination, used by the AI to choose when and how to transfer the call." + "tools": { + "type": "array", + "description": "Tools available to the transfer assistant during warm-transfer-experimental.\n\n**Default Behavior:** The transfer assistant will ALWAYS have both `transferSuccessful` and `transferCancel` tools automatically added, regardless of what you provide here.\n\n**Default Tools:**\n- `transferSuccessful`: \"Call this function to confirm the transfer is successful and connect the customer. Use this when you detect a human has answered and is ready to take the call.\"\n- `transferCancel`: \"Call this function to cancel the transfer when no human answers or transfer should not proceed. Use this when you detect voicemail, busy signal, or no answer.\"\n\n**Customization:** You can override the default tools by providing `transferSuccessful` and/or `transferCancel` tools with custom `function` or `messages` configurations.\n\n**Additional Tools:** You can also provide other tools, but the two transfer tools will always be present and available to the assistant." } }, "required": [ - "type", - "number" + "provider", + "model" ] }, - "TransferDestinationSip": { + "RegexOption": { "type": "object", "properties": { - "message": { - "description": "This is spoken to the customer before connecting them to the destination.\n\nUsage:\n- If this is not provided and transfer tool messages is not provided, default is \"Transferring the call now\".\n- If set to \"\", nothing is spoken. This is useful when you want to silently transfer. This is especially useful when transferring between assistants in a squad. In this scenario, you likely also want to set `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message` for the destination assistant.\n\nThis accepts a string or a ToolMessageStart class. Latter is useful if you want to specify multiple messages for different languages through the `contents` field.", - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/CustomMessage" - } - ] - }, "type": { "type": "string", + "description": "This is the type of the regex option. Options are:\n- `ignore-case`: Ignores the case of the text being matched. Add\n- `whole-word`: Matches whole words only.\n- `multi-line`: Matches across multiple lines.", "enum": [ - "sip" - ] - }, - "sipUri": { - "type": "string", - "description": "This is the SIP URI to transfer the call to." - }, - "callerId": { - "type": "string", - "description": "This is the caller ID to use when transferring the call to the `sipUri`.\n\nUsage:\n- If not provided, the caller ID will be determined by the SIP infrastructure.\n- Set to '{{customer.number}}' to always use the customer's number as the caller ID.\n- Set to '{{phoneNumber.number}}' to always use the phone number of the assistant as the caller ID.\n- Set to any E164 number to always use that number as the caller ID.\n\nOnly applicable when `transferPlan.sipVerb='dial'`. Not applicable for SIP REFER.", - "maxLength": 40 - }, - "transferPlan": { - "description": "This configures how transfer is executed and the experience of the destination party receiving the call. Defaults to `blind-transfer`.\n\n@default `transferPlan.mode='blind-transfer'`", - "allOf": [ - { - "$ref": "#/components/schemas/TransferPlan" - } + "ignore-case", + "whole-word", + "multi-line" ] }, - "sipHeaders": { - "type": "object", - "description": "These are custom headers to be added to SIP refer during transfer call." - }, - "description": { - "type": "string", - "description": "This is the description of the destination, used by the AI to choose when and how to transfer the call." + "enabled": { + "type": "boolean", + "description": "This is whether to enable the option.\n\n@default false" } }, "required": [ "type", - "sipUri" + "enabled" ] }, - "CreateTransferCallToolDTO": { + "AssistantCustomEndpointingRule": { "type": "object", "properties": { - "messages": { - "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ToolMessageStart", - "title": "ToolMessageStart" - }, - { - "$ref": "#/components/schemas/ToolMessageComplete", - "title": "ToolMessageComplete" - }, - { - "$ref": "#/components/schemas/ToolMessageFailed", - "title": "ToolMessageFailed" - }, - { - "$ref": "#/components/schemas/ToolMessageDelayed", - "title": "ToolMessageDelayed" - } - ] - } - }, "type": { "type": "string", + "description": "This endpointing rule is based on the last assistant message before customer started speaking.\n\nFlow:\n- Assistant speaks\n- Customer starts speaking\n- Customer transcription comes in\n- This rule is evaluated on the last assistant message\n- If a match is found based on `regex`, the endpointing timeout is set to `timeoutSeconds`\n\nUsage:\n- If you have yes/no questions in your use case like \"are you interested in a loan?\", you can set a shorter timeout.\n- If you have questions where the customer may pause to look up information like \"what's my account number?\", you can set a longer timeout.", "enum": [ - "transferCall" + "assistant" ] }, - "destinations": { + "regex": { + "type": "string", + "description": "This is the regex pattern to match.\n\nNote:\n- This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test(\"hello there\")` will return `true`.\n\nHot tip:\n- In JavaScript, escape `\\` when sending the regex pattern. Eg. `\"hello\\sthere\"` will be sent over the wire as `\"hellosthere\"`. Send `\"hello\\\\sthere\"` instead.\n- `RegExp.test` does substring matching, so `/cat/.test(\"I love cats\")` will return `true`. To do full string matching, send \"^cat$\"." + }, + "regexOptions": { + "description": "These are the options for the regex match. Defaults to all disabled.\n\n@default []", "type": "array", - "description": "These are the destinations that the call can be transferred to. If no destinations are provided, server.url will be used to get the transfer destination once the tool is called.", "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/TransferDestinationAssistant", - "title": "Assistant" - }, - { - "$ref": "#/components/schemas/TransferDestinationNumber", - "title": "Number" - }, - { - "$ref": "#/components/schemas/TransferDestinationSip", - "title": "Sip" - } - ] + "$ref": "#/components/schemas/RegexOption" } }, - "rejectionPlan": { - "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", - "allOf": [ - { - "$ref": "#/components/schemas/ToolRejectionPlan" - } - ] + "timeoutSeconds": { + "type": "number", + "description": "This is the endpointing timeout in seconds, if the rule is matched.", + "minimum": 0, + "maximum": 15 } }, "required": [ - "type" + "type", + "regex", + "timeoutSeconds" ] }, - "ContextEngineeringPlanLastNMessages": { + "CustomerCustomEndpointingRule": { "type": "object", "properties": { "type": { "type": "string", + "description": "This endpointing rule is based on current customer message as they are speaking.\n\nFlow:\n- Assistant speaks\n- Customer starts speaking\n- Customer transcription comes in\n- This rule is evaluated on the current customer transcription\n- If a match is found based on `regex`, the endpointing timeout is set to `timeoutSeconds`\n\nUsage:\n- If you want to wait longer while customer is speaking numbers, you can set a longer timeout.", "enum": [ - "lastNMessages" + "customer" ] }, - "maxMessages": { + "regex": { + "type": "string", + "description": "This is the regex pattern to match.\n\nNote:\n- This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test(\"hello there\")` will return `true`.\n\nHot tip:\n- In JavaScript, escape `\\` when sending the regex pattern. Eg. `\"hello\\sthere\"` will be sent over the wire as `\"hellosthere\"`. Send `\"hello\\\\sthere\"` instead.\n- `RegExp.test` does substring matching, so `/cat/.test(\"I love cats\")` will return `true`. To do full string matching, send \"^cat$\"." + }, + "regexOptions": { + "description": "These are the options for the regex match. Defaults to all disabled.\n\n@default []", + "type": "array", + "items": { + "$ref": "#/components/schemas/RegexOption" + } + }, + "timeoutSeconds": { "type": "number", - "description": "This is the maximum number of messages to include in the context engineering plan.", - "minimum": 0 + "description": "This is the endpointing timeout in seconds, if the rule is matched.", + "minimum": 0, + "maximum": 15 } }, "required": [ "type", - "maxMessages" + "regex", + "timeoutSeconds" ] }, - "ContextEngineeringPlanNone": { + "BothCustomEndpointingRule": { "type": "object", "properties": { "type": { "type": "string", + "description": "This endpointing rule is based on both the last assistant message and the current customer message as they are speaking.\n\nFlow:\n- Assistant speaks\n- Customer starts speaking\n- Customer transcription comes in\n- This rule is evaluated on the last assistant message and the current customer transcription\n- If assistant message matches `assistantRegex` AND customer message matches `customerRegex`, the endpointing timeout is set to `timeoutSeconds`\n\nUsage:\n- If you want to wait longer while customer is speaking numbers, you can set a longer timeout.", "enum": [ - "none" + "both" ] + }, + "assistantRegex": { + "type": "string", + "description": "This is the regex pattern to match the assistant's message.\n\nNote:\n- This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test(\"hello there\")` will return `true`.\n\nHot tip:\n- In JavaScript, escape `\\` when sending the regex pattern. Eg. `\"hello\\sthere\"` will be sent over the wire as `\"hellosthere\"`. Send `\"hello\\\\sthere\"` instead.\n- `RegExp.test` does substring matching, so `/cat/.test(\"I love cats\")` will return `true`. To do full string matching, send \"^cat$\"." + }, + "assistantRegexOptions": { + "description": "These are the options for the assistant's message regex match. Defaults to all disabled.\n\n@default []", + "type": "array", + "items": { + "$ref": "#/components/schemas/RegexOption" + } + }, + "customerRegex": { + "type": "string" + }, + "customerRegexOptions": { + "description": "These are the options for the customer's message regex match. Defaults to all disabled.\n\n@default []", + "type": "array", + "items": { + "$ref": "#/components/schemas/RegexOption" + } + }, + "timeoutSeconds": { + "type": "number", + "description": "This is the endpointing timeout in seconds, if the rule is matched.", + "minimum": 0, + "maximum": 15 } }, "required": [ - "type" + "type", + "assistantRegex", + "customerRegex", + "timeoutSeconds" ] }, - "ContextEngineeringPlanAll": { + "VapiSmartEndpointingPlan": { "type": "object", "properties": { - "type": { + "provider": { "type": "string", + "description": "This is the provider for the smart endpointing plan.", "enum": [ - "all" - ] + "vapi", + "livekit", + "custom-endpointing-model" + ], + "example": "vapi" } }, "required": [ - "type" + "provider" ] }, - "ContextEngineeringPlanUserAndAssistantMessages": { + "LivekitSmartEndpointingPlan": { "type": "object", "properties": { - "type": { + "provider": { "type": "string", + "description": "This is the provider for the smart endpointing plan.", "enum": [ - "userAndAssistantMessages" + "vapi", + "livekit", + "custom-endpointing-model" + ], + "example": "livekit" + }, + "waitFunction": { + "type": "string", + "description": "This expression describes how long the bot will wait to start speaking based on the likelihood that the user has reached an endpoint.\n\nThis is a millisecond valued function. It maps probabilities (real numbers on [0,1]) to milliseconds that the bot should wait before speaking ([0, \\infty]). Any negative values that are returned are set to zero (the bot can't start talking in the past).\n\nA probability of zero represents very high confidence that the caller has stopped speaking, and would like the bot to speak to them. A probability of one represents very high confidence that the caller is still speaking.\n\nUnder the hood, this is parsed into a mathjs expression. Whatever you use to write your expression needs to be valid with respect to mathjs\n\n@default \"20 + 500 * sqrt(x) + 2500 * x^3\"", + "examples": [ + "70 + 4000 * x", + "200 + 8000 * x", + "4000 * (1 - cos(pi * x))" ] } }, "required": [ - "type" + "provider" ] }, - "HandoffDestinationAssistant": { + "CustomEndpointingModelSmartEndpointingPlan": { "type": "object", "properties": { - "type": { + "provider": { "type": "string", + "description": "This is the provider for the smart endpointing plan. Use `custom-endpointing-model` for custom endpointing providers that are not natively supported.", "enum": [ - "assistant" - ] - }, - "contextEngineeringPlan": { - "description": "This is the plan for manipulating the message context before handing off the call to the next assistant.", - "oneOf": [ - { - "$ref": "#/components/schemas/ContextEngineeringPlanLastNMessages", - "title": "Last N Messages" - }, - { - "$ref": "#/components/schemas/ContextEngineeringPlanNone", - "title": "None" - }, - { - "$ref": "#/components/schemas/ContextEngineeringPlanAll", - "title": "All" - }, - { - "$ref": "#/components/schemas/ContextEngineeringPlanUserAndAssistantMessages", - "title": "User And Assistant Messages" - } - ] - }, - "assistantName": { - "type": "string", - "description": "This is the assistant to transfer the call to. You must provide either assistantName or assistantId." - }, - "assistantId": { - "type": "string", - "description": "This is the assistant id to transfer the call to. You must provide either assistantName or assistantId." - }, - "assistant": { - "description": "This is a transient assistant to transfer the call to. You may provide a transient assistant in the response `handoff-destination-request` in a dynamic handoff.", - "allOf": [ - { - "$ref": "#/components/schemas/CreateAssistantDTO" - } - ] - }, - "variableExtractionPlan": { - "description": "This is the variable extraction plan for the handoff tool.", - "allOf": [ - { - "$ref": "#/components/schemas/VariableExtractionPlan" - } - ] + "vapi", + "livekit", + "custom-endpointing-model" + ], + "example": "custom-endpointing-model" }, - "assistantOverrides": { - "description": "These are the assistant overrides to apply to the destination assistant.", + "server": { + "description": "This is where the endpointing request will be sent. If not provided, will be sent to `assistant.server`. If that does not exist either, will be sent to `org.server`.\n\nRequest Example:\n\nPOST https://{server.url}\nContent-Type: application/json\n\n{\n \"message\": {\n \"type\": \"call.endpointing.request\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"message\": \"Hello, how are you?\",\n \"time\": 1234567890,\n \"secondsFromStart\": 0\n }\n ],\n ...other metadata about the call...\n }\n}\n\nResponse Expected:\n{\n \"timeoutSeconds\": 0.5\n}\n\nThe timeout is the number of seconds to wait before considering the user's speech as finished. The endpointing timeout is automatically reset each time a new transcript is received (and another `call.endpointing.request` is sent).", "allOf": [ { - "$ref": "#/components/schemas/AssistantOverrides" + "$ref": "#/components/schemas/Server" } ] - }, - "description": { - "type": "string", - "description": "This is the description of the destination, used by the AI to choose when and how to transfer the call." } }, "required": [ - "type" + "provider" ] }, - "HandoffDestinationDynamic": { + "TranscriptionEndpointingPlan": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "dynamic" - ] + "onPunctuationSeconds": { + "type": "number", + "description": "The minimum number of seconds to wait after transcription ending with punctuation before sending a request to the model. Defaults to 0.1.\n\nThis setting exists because the transcriber punctuates the transcription when it's more confident that customer has completed a thought.\n\n@default 0.1", + "minimum": 0, + "maximum": 3, + "example": 0.1 }, - "server": { - "description": "This is where Vapi will send the handoff-destination-request webhook in a dynamic handoff.\n\nThe order of precedence is:\n\n1. tool.server.url\n2. assistant.server.url\n3. phoneNumber.server.url\n4. org.server.url", - "allOf": [ - { - "$ref": "#/components/schemas/Server" - } - ] + "onNoPunctuationSeconds": { + "type": "number", + "description": "The minimum number of seconds to wait after transcription ending without punctuation before sending a request to the model. Defaults to 1.5.\n\nThis setting exists to catch the cases where the transcriber was not confident enough to punctuate the transcription, but the customer is done and has been silent for a long time.\n\n@default 1.5", + "minimum": 0, + "maximum": 3, + "example": 1.5 }, - "description": { - "type": "string", - "description": "This is the description of the destination, used by the AI to choose when and how to transfer the call." + "onNumberSeconds": { + "type": "number", + "description": "The minimum number of seconds to wait after transcription ending with a number before sending a request to the model. Defaults to 0.4.\n\nThis setting exists because the transcriber will sometimes punctuate the transcription ending with a number, even though the customer hasn't uttered the full number. This happens commonly for long numbers when the customer reads the number in chunks.\n\n@default 0.5", + "minimum": 0, + "maximum": 3, + "example": 0.5 } - }, - "required": [ - "type" - ] + } }, - "SquadMemberDTO": { + "StartSpeakingPlan": { "type": "object", "properties": { - "assistantDestinations": { + "waitSeconds": { + "type": "number", + "description": "This is how long assistant waits before speaking. Defaults to 0.4.\n\nThis is the minimum it will wait but if there is latency is the pipeline, this minimum will be exceeded. This is intended as a stopgap in case the pipeline is moving too fast.\n\nExample:\n- If model generates tokens and voice generates bytes within 100ms, the pipeline still waits 300ms before outputting speech.\n\nUsage:\n- If the customer is taking long pauses, set this to a higher value.\n- If the assistant is accidentally jumping in too much, set this to a higher value.\n\n@default 0.4", + "minimum": 0, + "maximum": 5, + "example": 0.4 + }, + "smartEndpointingEnabled": { + "example": false, + "deprecated": true, + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "livekit" + ] + } + ] + }, + "smartEndpointingPlan": { + "description": "This is the plan for smart endpointing. Pick between Vapi smart endpointing, LiveKit, or custom endpointing model (or nothing). We strongly recommend using livekit endpointing when working in English. LiveKit endpointing is not supported in other languages, yet.\n\nIf this is set, it will override and take precedence over `transcriptionEndpointingPlan`.\nThis plan will still be overridden by any matching `customEndpointingRules`.\n\nIf this is not set, the system will automatically use the transcriber's built-in endpointing capabilities if available.", + "oneOf": [ + { + "$ref": "#/components/schemas/VapiSmartEndpointingPlan", + "title": "Vapi" + }, + { + "$ref": "#/components/schemas/LivekitSmartEndpointingPlan", + "title": "Livekit" + }, + { + "$ref": "#/components/schemas/CustomEndpointingModelSmartEndpointingPlan", + "title": "Custom Endpointing Model" + } + ] + }, + "customEndpointingRules": { "type": "array", + "description": "These are the custom endpointing rules to set an endpointing timeout based on a regex on the customer's speech or the assistant's last message.\n\nUsage:\n- If you have yes/no questions like \"are you interested in a loan?\", you can set a shorter timeout.\n- If you have questions where the customer may pause to look up information like \"what's my account number?\", you can set a longer timeout.\n- If you want to wait longer while customer is enumerating a list of numbers, you can set a longer timeout.\n\nThese rules have the highest precedence and will override both `smartEndpointingPlan` and `transcriptionEndpointingPlan` when a rule is matched.\n\nThe rules are evaluated in order and the first one that matches will be used.\n\nOrder of precedence for endpointing:\n1. customEndpointingRules (if any match)\n2. smartEndpointingPlan (if set)\n3. transcriptionEndpointingPlan\n\n@default []", "items": { "oneOf": [ { - "$ref": "#/components/schemas/TransferDestinationAssistant", - "title": "Transfer Destination" + "$ref": "#/components/schemas/AssistantCustomEndpointingRule", + "title": "Assistant" }, { - "$ref": "#/components/schemas/HandoffDestinationAssistant", - "title": "Handoff Destination" + "$ref": "#/components/schemas/CustomerCustomEndpointingRule", + "title": "Customer" + }, + { + "$ref": "#/components/schemas/BothCustomEndpointingRule", + "title": "Both" } ] } }, - "assistantId": { - "type": "string", - "nullable": true, - "description": "This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead." - }, - "assistant": { - "description": "This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.", - "allOf": [ - { - "$ref": "#/components/schemas/CreateAssistantDTO" - } - ] - }, - "assistantOverrides": { - "description": "This can be used to override the assistant's settings and provide values for it's template variables.", + "transcriptionEndpointingPlan": { + "description": "This determines how a customer speech is considered done (endpointing) using the transcription of customer's speech.\n\nOnce an endpoint is triggered, the request is sent to `assistant.model`.\n\nNote: This plan is only used if `smartEndpointingPlan` is not set and transcriber does not have built-in endpointing capabilities. If both are provided, `smartEndpointingPlan` takes precedence.\nThis plan will also be overridden by any matching `customEndpointingRules`.", "allOf": [ { - "$ref": "#/components/schemas/AssistantOverrides" + "$ref": "#/components/schemas/TranscriptionEndpointingPlan" } ] } } }, - "CreateSquadDTO": { + "SmartDenoisingPlan": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "This is the name of the squad." - }, - "members": { - "description": "This is the list of assistants that make up the squad.\n\nThe call will start with the first assistant in the list.", - "type": "array", - "items": { - "$ref": "#/components/schemas/SquadMemberDTO" - } - }, - "membersOverrides": { - "description": "This can be used to override all the assistants' settings and provide values for their template variables.\n\nBoth `membersOverrides` and `members[n].assistantOverrides` can be used together. First, `members[n].assistantOverrides` is applied. Then, `membersOverrides` is applied as a global override.", - "allOf": [ - { - "$ref": "#/components/schemas/AssistantOverrides" - } - ] + "enabled": { + "type": "boolean", + "description": "Whether smart denoising using Krisp is enabled.", + "default": true } - }, - "required": [ - "members" - ] + } }, - "HandoffDestinationSquad": { + "FourierDenoisingPlan": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "squad" - ] + "enabled": { + "type": "boolean", + "description": "Whether Fourier denoising is enabled. Note that this is experimental and may not work as expected.", + "default": false }, - "contextEngineeringPlan": { - "description": "This is the plan for manipulating the message context before handing off the call to the squad.", - "oneOf": [ - { - "$ref": "#/components/schemas/ContextEngineeringPlanLastNMessages", - "title": "Last N Messages" - }, - { - "$ref": "#/components/schemas/ContextEngineeringPlanNone", - "title": "None" - }, - { - "$ref": "#/components/schemas/ContextEngineeringPlanAll", - "title": "All" - }, - { - "$ref": "#/components/schemas/ContextEngineeringPlanUserAndAssistantMessages", - "title": "User And Assistant Messages" - } - ] + "mediaDetectionEnabled": { + "type": "boolean", + "description": "Whether automatic media detection is enabled. When enabled, the filter will automatically\ndetect consistent background TV/music/radio and switch to more aggressive filtering settings.\nOnly applies when enabled is true.", + "example": true, + "default": true }, - "squadId": { - "type": "string", - "description": "This is the squad id to transfer the call to." + "staticThreshold": { + "type": "number", + "description": "Static threshold in dB used as fallback when no baseline is established.", + "example": -35, + "minimum": -80, + "maximum": 0, + "default": -35 }, - "squad": { - "description": "This is a transient squad to transfer the call to.", - "allOf": [ - { - "$ref": "#/components/schemas/CreateSquadDTO" - } - ] + "baselineOffsetDb": { + "type": "number", + "description": "How far below the rolling baseline to filter audio, in dB.\nLower values (e.g., -10) are more aggressive, higher values (e.g., -20) are more conservative.", + "example": -15, + "minimum": -30, + "maximum": -5, + "default": -15 }, - "entryAssistantName": { - "type": "string", - "description": "This is the name of the entry assistant to start with when handing off to the squad.\nIf not provided, the first member of the squad will be used." + "windowSizeMs": { + "type": "number", + "description": "Rolling window size in milliseconds for calculating the audio baseline.\nLarger windows adapt more slowly but are more stable.", + "example": 3000, + "minimum": 1000, + "maximum": 30000, + "default": 3000 }, - "variableExtractionPlan": { - "description": "This is the variable extraction plan for the handoff tool.", + "baselinePercentile": { + "type": "number", + "description": "Percentile to use for baseline calculation (1-99).\nHigher percentiles (e.g., 85) focus on louder speech, lower percentiles (e.g., 50) include quieter speech.", + "example": 85, + "minimum": 1, + "maximum": 99, + "default": 85 + } + } + }, + "BackgroundSpeechDenoisingPlan": { + "type": "object", + "properties": { + "smartDenoisingPlan": { + "description": "Whether smart denoising using Krisp is enabled.", "allOf": [ { - "$ref": "#/components/schemas/VariableExtractionPlan" + "$ref": "#/components/schemas/SmartDenoisingPlan" } ] }, - "squadOverrides": { - "description": "These are the overrides to apply to the squad configuration.\nMaps to squad-level membersOverrides.", + "fourierDenoisingPlan": { + "description": "Whether Fourier denoising is enabled. Note that this is experimental and may not work as expected.\n\nThis can be combined with smart denoising, and will be run afterwards.", "allOf": [ { - "$ref": "#/components/schemas/AssistantOverrides" + "$ref": "#/components/schemas/FourierDenoisingPlan" } ] - }, - "description": { - "type": "string", - "description": "This is the description of the destination, used by the AI to choose when and how to transfer the call." } - }, - "required": [ - "type" - ] + } }, - "CreateHandoffToolDTO": { + "TransferAssistant": { "type": "object", "properties": { - "messages": { - "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ToolMessageStart", - "title": "ToolMessageStart" - }, - { - "$ref": "#/components/schemas/ToolMessageComplete", - "title": "ToolMessageComplete" - }, - { - "$ref": "#/components/schemas/ToolMessageFailed", - "title": "ToolMessageFailed" - }, - { - "$ref": "#/components/schemas/ToolMessageDelayed", - "title": "ToolMessageDelayed" - } - ] - } - }, - "type": { - "type": "string", - "description": "This is the type of the tool.\nWhen you're using handoff tool, we recommend adding this to your system prompt\n---\n# System context\n\nYou are part of a multi-agent system designed to make agent coordination and execution easy. Agents uses two primary abstraction: **Agents** and **Handoffs**. An agent encompasses instructions and tools and can hand off a conversation to another agent when appropriate. Handoffs are achieved by calling a handoff function, generally named `handoff_to_`. Handoffs between agents are handled seamlessly in the background; do not mention or draw attention to these handoffs in your conversation with the user.\n\n# Agent context\n\n{put your agent system prompt here}\n---", - "enum": [ - "handoff" - ] - }, - "defaultResult": { + "name": { "type": "string", - "description": "This is the default local tool result message used when no runtime handoff result override is returned." - }, - "destinations": { - "type": "array", - "description": "These are the destinations that the call can be handed off to.\n\nUsage:\n1. Single destination\n\nUse `assistantId` to handoff the call to a saved assistant, or `assistantName` to handoff the call to an assistant in the same squad.\n\n```json\n{\n \"tools\": [\n {\n \"type\": \"handoff\",\n \"destinations\": [\n {\n \"type\": \"assistant\",\n \"assistantId\": \"assistant-123\", // or \"assistantName\": \"Assistant123\"\n \"description\": \"customer wants to be handed off to assistant-123\",\n \"contextEngineeringPlan\": {\n \"type\": \"all\"\n }\n }\n ],\n }\n ]\n}\n```\n\n2. Multiple destinations\n\n2.1. Multiple Tools, Each With One Destination (OpenAI recommended)\n\n```json\n{\n \"tools\": [\n {\n \"type\": \"handoff\",\n \"destinations\": [\n {\n \"type\": \"assistant\",\n \"assistantId\": \"assistant-123\",\n \"description\": \"customer wants to be handed off to assistant-123\",\n \"contextEngineeringPlan\": {\n \"type\": \"all\"\n }\n },\n ],\n },\n {\n \"type\": \"handoff\",\n \"destinations\": [\n {\n \"type\": \"assistant\",\n \"assistantId\": \"assistant-456\",\n \"description\": \"customer wants to be handed off to assistant-456\",\n \"contextEngineeringPlan\": {\n \"type\": \"all\"\n }\n }\n ],\n }\n ]\n}\n```\n\n2.2. One Tool, Multiple Destinations (Anthropic recommended)\n\n```json\n{\n \"tools\": [\n {\n \"type\": \"handoff\",\n \"destinations\": [\n {\n \"type\": \"assistant\",\n \"assistantId\": \"assistant-123\",\n \"description\": \"customer wants to be handed off to assistant-123\",\n \"contextEngineeringPlan\": {\n \"type\": \"all\"\n }\n },\n {\n \"type\": \"assistant\",\n \"assistantId\": \"assistant-456\",\n \"description\": \"customer wants to be handed off to assistant-456\",\n \"contextEngineeringPlan\": {\n \"type\": \"all\"\n }\n }\n ],\n }\n ]\n}\n```\n\n3. Dynamic destination\n\n3.1 To determine the destination dynamically, supply a `dynamic` handoff destination type and a `server` object.\n VAPI will send a handoff-destination-request webhook to the `server.url`.\n The response from the server will be used as the destination (if valid).\n\n```json\n{\n \"tools\": [\n {\n \"type\": \"handoff\",\n \"destinations\": [\n {\n \"type\": \"dynamic\",\n \"server\": {\n \"url\": \"https://example.com\"\n }\n }\n ],\n }\n ]\n}\n```\n\n3.2. To pass custom parameters to the server, you can use the `function` object.\n\n```json\n{\n \"tools\": [\n {\n \"type\": \"handoff\",\n \"destinations\": [\n {\n \"type\": \"dynamic\",\n \"server\": {\n \"url\": \"https://example.com\"\n },\n }\n ],\n \"function\": {\n \"name\": \"handoff\",\n \"description\": \"Call this function when the customer is ready to be handed off to the next assistant\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"destination\": {\n \"type\": \"string\",\n \"description\": \"Use dynamic when customer is ready to be handed off to the next assistant\",\n \"enum\": [\"dynamic\"]\n },\n \"customerAreaCode\": {\n \"type\": \"number\",\n \"description\": \"Area code of the customer\"\n },\n \"customerIntent\": {\n \"type\": \"string\",\n \"enum\": [\"new-customer\", \"existing-customer\"],\n \"description\": \"Use new-customer when customer is a new customer, existing-customer when customer is an existing customer\"\n },\n \"customerSentiment\": {\n \"type\": \"string\",\n \"enum\": [\"positive\", \"negative\", \"neutral\"],\n \"description\": \"Use positive when customer is happy, negative when customer is unhappy, neutral when customer is neutral\"\n }\n }\n }\n }\n }\n ]\n}\n```\n\nThe properties `customerAreaCode`, `customerIntent`, and `customerSentiment` will be passed to the server in the webhook request body.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/HandoffDestinationAssistant", - "title": "Assistant" - }, - { - "$ref": "#/components/schemas/HandoffDestinationDynamic", - "title": "Dynamic" - }, - { - "$ref": "#/components/schemas/HandoffDestinationSquad", - "title": "Squad" - } - ] - } + "description": "Optional name for the transfer assistant", + "maxLength": 100, + "default": "transfer-assistant", + "example": "Sales Transfer Assistant" }, - "function": { - "description": "This is the optional function definition that will be passed to the LLM.\nIf this is not defined, we will construct this based on the other properties.\n\nFor example, given the following tools definition:\n```json\n{\n \"tools\": [\n {\n \"type\": \"handoff\",\n \"destinations\": [\n {\n \"type\": \"assistant\",\n \"assistantId\": \"assistant-123\",\n \"description\": \"customer wants to be handed off to assistant-123\",\n \"contextEngineeringPlan\": {\n \"type\": \"all\"\n }\n },\n {\n \"type\": \"assistant\",\n \"assistantId\": \"assistant-456\",\n \"description\": \"customer wants to be handed off to assistant-456\",\n \"contextEngineeringPlan\": {\n \"type\": \"all\"\n }\n }\n ],\n }\n ]\n}\n```\n\nWe will construct the following function definition:\n```json\n{\n \"function\": {\n \"name\": \"handoff_to_assistant-123\",\n \"description\": \"\n Use this function to handoff the call to the next assistant.\n Only use it when instructions explicitly ask you to use the handoff_to_assistant function.\n DO NOT call this function unless you are instructed to do so.\n Here are the destinations you can handoff the call to:\n 1. assistant-123. When: customer wants to be handed off to assistant-123\n 2. assistant-456. When: customer wants to be handed off to assistant-456\n \",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"destination\": {\n \"type\": \"string\",\n \"description\": \"Options: assistant-123 (customer wants to be handed off to assistant-123), assistant-456 (customer wants to be handed off to assistant-456)\",\n \"enum\": [\"assistant-123\", \"assistant-456\"]\n },\n },\n \"required\": [\"destination\"]\n }\n }\n}\n```\n\nTo override this function, please provide an OpenAI function definition and refer to it in the system prompt.\nYou may override parts of the function definition (i.e. you may only want to change the function name for your prompt).\nIf you choose to override the function parameters, it must include `destination` as a required parameter, and it must evaluate to either an assistantId, assistantName, or a the string literal `dynamic`.\n\nTo pass custom parameters to the server in a dynamic handoff, you can use the function parameters, with `dynamic` as the destination.\n```json\n{\n \"function\": {\n \"name\": \"dynamic_handoff\",\n \"description\": \"\n Call this function when the customer is ready to be handed off to the next assistant\n \",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"destination\": {\n \"type\": \"string\",\n \"enum\": [\"dynamic\"]\n },\n \"customerAreaCode\": {\n \"type\": \"number\",\n \"description\": \"Area code of the customer\"\n },\n \"customerIntent\": {\n \"type\": \"string\",\n \"enum\": [\"new-customer\", \"existing-customer\"],\n \"description\": \"Use new-customer when customer is a new customer, existing-customer when customer is an existing customer\"\n },\n \"customerSentiment\": {\n \"type\": \"string\",\n \"enum\": [\"positive\", \"negative\", \"neutral\"],\n \"description\": \"Use positive when customer is happy, negative when customer is unhappy, neutral when customer is neutral\"\n }\n },\n \"required\": [\"destination\", \"customerAreaCode\", \"customerIntent\", \"customerSentiment\"]\n }\n }\n}\n```", + "model": { + "description": "Model configuration for the transfer assistant", "allOf": [ { - "$ref": "#/components/schemas/OpenAIFunction" + "$ref": "#/components/schemas/TransferAssistantModel" } ] }, - "rejectionPlan": { - "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", - "allOf": [ + "voice": { + "description": "These are the options for the transfer assistant's voice.", + "oneOf": [ { - "$ref": "#/components/schemas/ToolRejectionPlan" + "$ref": "#/components/schemas/AzureVoice", + "title": "AzureVoice" + }, + { + "$ref": "#/components/schemas/CartesiaVoice", + "title": "CartesiaVoice" + }, + { + "$ref": "#/components/schemas/CustomVoice", + "title": "CustomVoice" + }, + { + "$ref": "#/components/schemas/DeepgramVoice", + "title": "DeepgramVoice" + }, + { + "$ref": "#/components/schemas/ElevenLabsVoice", + "title": "ElevenLabsVoice" + }, + { + "$ref": "#/components/schemas/HumeVoice", + "title": "HumeVoice" + }, + { + "$ref": "#/components/schemas/LMNTVoice", + "title": "LMNTVoice" + }, + { + "$ref": "#/components/schemas/NeuphonicVoice", + "title": "NeuphonicVoice" + }, + { + "$ref": "#/components/schemas/OpenAIVoice", + "title": "OpenAIVoice" + }, + { + "$ref": "#/components/schemas/PlayHTVoice", + "title": "PlayHTVoice" + }, + { + "$ref": "#/components/schemas/WellSaidVoice", + "title": "WellSaidVoice" + }, + { + "$ref": "#/components/schemas/RimeAIVoice", + "title": "RimeAIVoice" + }, + { + "$ref": "#/components/schemas/SmallestAIVoice", + "title": "SmallestAIVoice" + }, + { + "$ref": "#/components/schemas/TavusVoice", + "title": "TavusVoice" + }, + { + "$ref": "#/components/schemas/VapiVoice", + "title": "VapiVoice" + }, + { + "$ref": "#/components/schemas/SesameVoice", + "title": "SesameVoice" + }, + { + "$ref": "#/components/schemas/InworldVoice", + "title": "InworldVoice" + }, + { + "$ref": "#/components/schemas/MinimaxVoice", + "title": "MinimaxVoice" + }, + { + "$ref": "#/components/schemas/XaiVoice", + "title": "XaiVoice" + }, + { + "$ref": "#/components/schemas/MicrosoftVoice", + "title": "MicrosoftVoice" } ] - } - }, - "required": [ - "type" - ] - }, - "CreateCustomKnowledgeBaseDTO": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "description": "This knowledge base is bring your own knowledge base implementation.", - "enum": [ - "custom-knowledge-base" - ] }, - "server": { - "description": "This is where the knowledge base request will be sent.\n\nRequest Example:\n\nPOST https://{server.url}\nContent-Type: application/json\n\n{\n \"messsage\": {\n \"type\": \"knowledge-base-request\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Why is ocean blue?\"\n }\n ],\n ...other metadata about the call...\n }\n}\n\nResponse Expected:\n```\n{\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"The ocean is blue because water absorbs everything but blue.\",\n }, // YOU CAN RETURN THE EXACT RESPONSE TO SPEAK\n \"documents\": [\n {\n \"content\": \"The ocean is blue primarily because water absorbs colors in the red part of the light spectrum and scatters the blue light, making it more visible to our eyes.\",\n \"similarity\": 1\n },\n {\n \"content\": \"Blue light is scattered more by the water molecules than other colors, enhancing the blue appearance of the ocean.\",\n \"similarity\": .5\n }\n ] // OR, YOU CAN RETURN AN ARRAY OF DOCUMENTS THAT WILL BE SENT TO THE MODEL\n}\n```", - "allOf": [ + "transcriber": { + "description": "These are the options for the transfer assistant's transcriber.", + "oneOf": [ { - "$ref": "#/components/schemas/Server" + "$ref": "#/components/schemas/AssemblyAITranscriber", + "title": "AssemblyAITranscriber" + }, + { + "$ref": "#/components/schemas/AzureSpeechTranscriber", + "title": "AzureSpeechTranscriber" + }, + { + "$ref": "#/components/schemas/CustomTranscriber", + "title": "CustomTranscriber" + }, + { + "$ref": "#/components/schemas/DeepgramTranscriber", + "title": "DeepgramTranscriber" + }, + { + "$ref": "#/components/schemas/ElevenLabsTranscriber", + "title": "ElevenLabsTranscriber" + }, + { + "$ref": "#/components/schemas/GladiaTranscriber", + "title": "GladiaTranscriber" + }, + { + "$ref": "#/components/schemas/GoogleTranscriber", + "title": "GoogleTranscriber" + }, + { + "$ref": "#/components/schemas/SpeechmaticsTranscriber", + "title": "SpeechmaticsTranscriber" + }, + { + "$ref": "#/components/schemas/TalkscriberTranscriber", + "title": "TalkscriberTranscriber" + }, + { + "$ref": "#/components/schemas/OpenAITranscriber", + "title": "OpenAITranscriber" + }, + { + "$ref": "#/components/schemas/CartesiaTranscriber", + "title": "CartesiaTranscriber" + }, + { + "$ref": "#/components/schemas/SonioxTranscriber", + "title": "SonioxTranscriber" + }, + { + "$ref": "#/components/schemas/XaiTranscriber", + "title": "XaiTranscriber" + }, + { + "$ref": "#/components/schemas/VapiTranscriber", + "title": "VapiTranscriber" } ] - } - }, - "required": [ - "provider", - "server" - ] - }, - "KnowledgeBase": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the knowledge base", - "example": "My Knowledge Base" }, - "provider": { + "firstMessage": { "type": "string", - "description": "The provider of the knowledge base", - "enum": [ - "google" - ], - "example": "google" + "description": "This is the first message that the transfer assistant will say.\nThis can also be a URL to a custom audio file.\n\nIf unspecified, assistant will wait for user to speak and use the model to respond once they speak.", + "example": "Hello! I understand you need to be transferred. Let me connect you." }, - "model": { - "type": "string", - "description": "The model to use for the knowledge base", - "enum": [ - "gemini-3-flash-preview", - "gemini-2.5-pro", - "gemini-2.5-flash", - "gemini-2.5-flash-lite", - "gemini-2.0-flash-thinking-exp", - "gemini-2.0-pro-exp-02-05", - "gemini-2.0-flash", - "gemini-2.0-flash-lite", - "gemini-2.0-flash-exp", - "gemini-2.0-flash-realtime-exp", - "gemini-1.5-flash", - "gemini-1.5-flash-002", - "gemini-1.5-pro", - "gemini-1.5-pro-002", - "gemini-1.0-pro" + "backgroundSound": { + "description": "This is the background sound in the transfer assistant call. Default for phone calls is 'office' and default for web calls is 'off'.\nYou can also provide a custom sound by providing a URL to an audio file.", + "oneOf": [ + { + "type": "string", + "enum": [ + "off", + "office" + ], + "example": "office" + }, + { + "type": "string", + "format": "uri", + "example": "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3" + } ] }, - "description": { - "type": "string", - "description": "A description of the knowledge base" - }, - "fileIds": { - "description": "The file IDs associated with this knowledge base", - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "name", - "provider", - "description", - "fileIds" - ] - }, - "CreateQueryToolDTO": { - "type": "object", - "properties": { - "messages": { - "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ToolMessageStart", - "title": "ToolMessageStart" - }, - { - "$ref": "#/components/schemas/ToolMessageComplete", - "title": "ToolMessageComplete" - }, - { - "$ref": "#/components/schemas/ToolMessageFailed", - "title": "ToolMessageFailed" - }, - { - "$ref": "#/components/schemas/ToolMessageDelayed", - "title": "ToolMessageDelayed" - } - ] - } + "startSpeakingPlan": { + "description": "This is the plan for when the transfer assistant should start talking.\n\nYou should configure this if the transfer assistant needs different endpointing behavior than the base assistant.\n\nIf this is not set, the transfer assistant will inherit the start speaking plan from the base assistant.", + "allOf": [ + { + "$ref": "#/components/schemas/StartSpeakingPlan" + } + ] }, - "type": { + "firstMessageMode": { "type": "string", + "description": "This is the mode for the first message. Default is 'assistant-speaks-first'.\n\nUse:\n- 'assistant-speaks-first' to have the assistant speak first.\n- 'assistant-waits-for-user' to have the assistant wait for the user to speak first.\n- 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state.\n\n@default 'assistant-speaks-first'", "enum": [ - "query" + "assistant-speaks-first", + "assistant-speaks-first-with-model-generated-message", + "assistant-waits-for-user" ], - "description": "The type of tool. \"query\" for Query tool." + "example": "assistant-speaks-first" }, - "knowledgeBases": { - "description": "The knowledge bases to query", - "type": "array", - "items": { - "$ref": "#/components/schemas/KnowledgeBase" - } + "maxDurationSeconds": { + "type": "number", + "description": "This is the maximum duration in seconds for the transfer assistant conversation.\nAfter this time, the transfer will be cancelled automatically.\n@default 120", + "minimum": 10, + "maximum": 43200, + "example": 120 }, - "rejectionPlan": { - "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "backgroundSpeechDenoisingPlan": { + "description": "This enables filtering of noise and background speech while the user is talking.\n\nFeatures:\n- Smart denoising using Krisp\n- Fourier denoising\n\nSmart denoising can be combined with or used independently of Fourier denoising.\n\nOrder of precedence:\n- Smart denoising\n- Fourier denoising", "allOf": [ { - "$ref": "#/components/schemas/ToolRejectionPlan" + "$ref": "#/components/schemas/BackgroundSpeechDenoisingPlan" } ] + }, + "silenceTimeoutSeconds": { + "type": "number", + "description": "This is the number of seconds of silence to wait before ending the call. Defaults to 30.\n\n@default 30", + "minimum": 5, + "maximum": 3600 } }, "required": [ - "type" + "model" ] }, - "CreateGoogleCalendarCreateEventToolDTO": { + "TransferCancelToolUserEditable": { "type": "object", "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -13450,9 +14663,9 @@ "type": { "type": "string", "enum": [ - "google.calendar.event.create" + "transferCancel" ], - "description": "The type of tool. \"google.calendar.event.create\" for Google Calendar Create Event tool." + "description": "The type of tool. \"transferCancel\" for Transfer Cancel tool. This tool can only be used during warm-transfer-experimental by the transfer assistant to cancel an ongoing transfer and return the call back to the original assistant when the transfer cannot be completed." }, "rejectionPlan": { "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", @@ -13467,12 +14680,12 @@ "type" ] }, - "CreateGoogleSheetsRowAppendToolDTO": { + "TransferSuccessfulToolUserEditable": { "type": "object", "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -13497,9 +14710,9 @@ "type": { "type": "string", "enum": [ - "google.sheets.row.append" + "transferSuccessful" ], - "description": "The type of tool. \"google.sheets.row.append\" for Google Sheets Row Append tool." + "description": "The type of tool. \"transferSuccessful\" for Transfer Successful tool. This tool can only be used during warm-transfer-experimental by the transfer assistant to confirm that the transfer should proceed and finalize the handoff to the destination." }, "rejectionPlan": { "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", @@ -13514,155 +14727,252 @@ "type" ] }, - "CreateGoogleCalendarCheckAvailabilityToolDTO": { + "SummaryPlan": { "type": "object", "properties": { "messages": { + "description": "These are the messages used to generate the summary.\n\n@default: ```\n[\n {\n \"role\": \"system\",\n \"content\": \"You are an expert note-taker. You will be given a transcript of a call. Summarize the call in 2-3 sentences. DO NOT return anything except the summary.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Here is the transcript:\\n\\n{{transcript}}\\n\\n. Here is the ended reason of the call:\\n\\n{{endedReason}}\\n\\n\"\n }\n]```\n\nYou can customize by providing any messages you want.\n\nHere are the template variables available:\n- {{transcript}}: The transcript of the call from `call.artifact.transcript` \n- {{systemPrompt}}: The system prompt of the call from `assistant.model.messages[type=system].content` \n- {{messages}}: The messages of the call from `assistant.model.messages` \n- {{endedReason}}: The ended reason of the call from `call.endedReason`", "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ToolMessageStart", - "title": "ToolMessageStart" - }, - { - "$ref": "#/components/schemas/ToolMessageComplete", - "title": "ToolMessageComplete" - }, - { - "$ref": "#/components/schemas/ToolMessageFailed", - "title": "ToolMessageFailed" - }, - { - "$ref": "#/components/schemas/ToolMessageDelayed", - "title": "ToolMessageDelayed" - } - ] + "type": "object" } }, - "type": { - "type": "string", - "enum": [ - "google.calendar.availability.check" - ], - "description": "The type of tool. \"google.calendar.availability.check\" for Google Calendar Check Availability tool." + "enabled": { + "type": "boolean", + "description": "This determines whether a summary is generated and stored in `call.analysis.summary`. Defaults to true.\n\nUsage:\n- If you want to disable the summary, set this to false.\n\n@default true" }, - "rejectionPlan": { - "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", - "allOf": [ - { - "$ref": "#/components/schemas/ToolRejectionPlan" - } - ] + "timeoutSeconds": { + "type": "number", + "description": "This is how long the request is tried before giving up. When request times out, `call.analysis.summary` will be empty.\n\nUsage:\n- To guarantee the summary is generated, set this value high. Note, this will delay the end of call report in cases where model is slow to respond.\n\n@default 5 seconds", + "minimum": 1, + "maximum": 60 } - }, - "required": [ - "type" - ] + } }, - "CreateSlackSendMessageToolDTO": { + "TransferPlan": { "type": "object", "properties": { - "messages": { - "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ToolMessageStart", - "title": "ToolMessageStart" - }, - { - "$ref": "#/components/schemas/ToolMessageComplete", - "title": "ToolMessageComplete" - }, - { - "$ref": "#/components/schemas/ToolMessageFailed", - "title": "ToolMessageFailed" - }, - { - "$ref": "#/components/schemas/ToolMessageDelayed", - "title": "ToolMessageDelayed" - } - ] - } - }, - "type": { + "mode": { "type": "string", + "description": "This configures how transfer is executed and the experience of the destination party receiving the call.\n\nUsage:\n- `blind-transfer`: The assistant forwards the call to the destination without any message or summary.\n- `blind-transfer-add-summary-to-sip-header`: The assistant forwards the call to the destination and adds a SIP header X-Transfer-Summary to the call to include the summary.\n- `warm-transfer-say-message`: The assistant dials the destination, delivers the `message` to the destination party, connects the customer, and leaves the call.\n- `warm-transfer-say-summary`: The assistant dials the destination, provides a summary of the call to the destination party, connects the customer, and leaves the call.\n- `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`: The assistant dials the destination, waits for the operator to speak, delivers the `message` to the destination party, and then connects the customer.\n- `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary`: The assistant dials the destination, waits for the operator to speak, provides a summary of the call to the destination party, and then connects the customer.\n- `warm-transfer-twiml`: The assistant dials the destination, executes the twiml instructions on the destination call leg, connects the customer, and leaves the call.\n- `warm-transfer-experimental`: The assistant puts the customer on hold, dials the destination, and if the destination answers (and is human), delivers a message or summary before connecting the customer. If the destination is unreachable or not human (e.g., with voicemail detection), the assistant delivers the `fallbackMessage` to the customer and optionally ends the call.\n\n@default 'blind-transfer'", "enum": [ - "slack.message.send" - ], - "description": "The type of tool. \"slack.message.send\" for Slack Send Message tool." + "blind-transfer", + "blind-transfer-add-summary-to-sip-header", + "warm-transfer-say-message", + "warm-transfer-say-summary", + "warm-transfer-twiml", + "warm-transfer-wait-for-operator-to-speak-first-and-then-say-message", + "warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary", + "warm-transfer-experimental" + ] }, - "rejectionPlan": { - "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "message": { + "description": "This is the message the assistant will deliver to the destination party before connecting the customer.\n\nUsage:\n- Used only when `mode` is `blind-transfer-add-summary-to-sip-header`, `warm-transfer-say-message`, `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`, or `warm-transfer-experimental`.", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/CustomMessage" + } + ] + }, + "timeout": { + "type": "number", + "description": "This is the timeout in seconds for the warm-transfer-wait-for-operator-to-speak-first-and-then-say-message/summary\n\n@default 60", + "minimum": 1, + "maximum": 600, + "default": 60 + }, + "sipVerb": { + "type": "object", + "description": "This specifies the SIP verb to use while transferring the call.\n- 'refer': Uses SIP REFER to transfer the call (default)\n- 'bye': Ends current call with SIP BYE\n- 'dial': Uses SIP DIAL to transfer the call", + "default": "refer", + "enum": [ + "refer", + "bye", + "dial" + ] + }, + "dialTimeout": { + "type": "number", + "description": "This sets the timeout for the dial operation in seconds. This is the duration the call will ring before timing out.\n\nOnly applicable when `sipVerb='dial'`. Not applicable for SIP REFER or BYE.\n\n@default 60", + "minimum": 1, + "maximum": 600, + "default": 60 + }, + "holdAudioUrl": { + "type": "string", + "description": "This is the URL to an audio file played while the customer is on hold during transfer.\n\nUsage:\n- Used only when `mode` is `warm-transfer-experimental`.\n- Used when transferring calls to play hold audio for the customer.\n- Must be a publicly accessible URL to an audio file.\n- Supported formats: MP3 and WAV.\n- If not provided, the default hold audio will be used." + }, + "transferCompleteAudioUrl": { + "type": "string", + "description": "This is the URL to an audio file played after the warm transfer message or summary is delivered to the destination party.\nIt can be used to play a custom sound like 'beep' to notify that the transfer is complete.\n\nUsage:\n- Used only when `mode` is `warm-transfer-experimental`.\n- Used when transferring calls to play hold audio for the destination party.\n- Must be a publicly accessible URL to an audio file.\n- Supported formats: MP3 and WAV." + }, + "contextEngineeringPlan": { + "description": "This is the plan for manipulating the message context before initiating the warm transfer.\nUsage:\n- Used only when `mode` is `warm-transfer-experimental`.\n- These messages will automatically be added to the transferAssistant's system message.\n- If 'none', we will not add any transcript to the transferAssistant's system message.\n- If you want to provide your own messages, use transferAssistant.model.messages instead.\n\n@default { type: 'all' }", + "oneOf": [ + { + "$ref": "#/components/schemas/ContextEngineeringPlanLastNMessages", + "title": "Last N Messages" + }, + { + "$ref": "#/components/schemas/ContextEngineeringPlanNone", + "title": "None" + }, + { + "$ref": "#/components/schemas/ContextEngineeringPlanAll", + "title": "All" + } + ] + }, + "twiml": { + "type": "string", + "description": "This is the TwiML instructions to execute on the destination call leg before connecting the customer.\n\nUsage:\n- Used only when `mode` is `warm-transfer-twiml`.\n- Supports only `Play`, `Say`, `Gather`, `Hangup` and `Pause` verbs.\n- Maximum length is 4096 characters.\n\nExample:\n```\nHello, transferring a customer to you.\n\nThey called about billing questions.\n```", + "maxLength": 4096 + }, + "summaryPlan": { + "description": "This is the plan for generating a summary of the call to present to the destination party.\n\nUsage:\n- Used only when `mode` is `blind-transfer-add-summary-to-sip-header` or `warm-transfer-say-summary` or `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary` or `warm-transfer-experimental`.", "allOf": [ { - "$ref": "#/components/schemas/ToolRejectionPlan" + "$ref": "#/components/schemas/SummaryPlan" + } + ] + }, + "sipHeadersInReferToEnabled": { + "type": "boolean", + "description": "This flag includes the sipHeaders from above in the refer to sip uri as url encoded query params.\n\n@default false" + }, + "fallbackPlan": { + "description": "This configures the fallback plan when the transfer fails (destination unreachable, busy, or not human).\n\nUsage:\n- Used only when `mode` is `warm-transfer-experimental`.\n- If not provided when using `warm-transfer-experimental`, a default message will be used.", + "allOf": [ + { + "$ref": "#/components/schemas/TransferFallbackPlan" } ] } }, "required": [ - "type" + "mode" ] }, - "McpToolMessages": { + "TransferDestinationNumber": { "type": "object", "properties": { - "name": { + "message": { + "description": "This is spoken to the customer before connecting them to the destination.\n\nUsage:\n- If this is not provided and transfer tool messages is not provided, default is \"Transferring the call now\".\n- If set to \"\", nothing is spoken. This is useful when you want to silently transfer. This is especially useful when transferring between assistants in a squad. In this scenario, you likely also want to set `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message` for the destination assistant.\n\nThis accepts a string or a ToolMessageStart class. Latter is useful if you want to specify multiple messages for different languages through the `contents` field.", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/CustomMessage" + } + ] + }, + "type": { "type": "string", - "description": "The name of the tool from the MCP server." + "enum": [ + "number" + ] }, - "messages": { - "type": "array", - "description": "Custom messages for this specific tool. Set to an empty array to suppress all messages for this tool. If not provided, the tool will use the default messages from the parent MCP tool configuration.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ToolMessageStart", - "title": "ToolMessageStart" - }, - { - "$ref": "#/components/schemas/ToolMessageComplete", - "title": "ToolMessageComplete" - }, - { - "$ref": "#/components/schemas/ToolMessageFailed", - "title": "ToolMessageFailed" - }, - { - "$ref": "#/components/schemas/ToolMessageDelayed", - "title": "ToolMessageDelayed" - } - ] - } + "numberE164CheckEnabled": { + "type": "boolean", + "description": "This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it.\n\nUse cases:\n- `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks.\n- `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.\n\nIf `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`).\n\n@default true (E164 check is enabled)", + "default": true + }, + "number": { + "type": "string", + "description": "This is the phone number to transfer the call to.", + "minLength": 3, + "maxLength": 40 + }, + "extension": { + "type": "string", + "description": "This is the extension to dial after transferring the call to the `number`.", + "minLength": 1, + "maxLength": 10 + }, + "callerId": { + "type": "string", + "description": "This is the caller ID to use when transferring the call to the `number`.\n\nUsage:\n- If not provided, the caller ID will be the number the call is coming **from**.\n Example: a customer with number +14151111111 calls in to and the assistant transfers out to +16470000000. +16470000000 will see +14151111111 as the caller.\n For inbound calls, the caller ID is the customer's number. For outbound calls, the caller ID is the phone number of the assistant.\n- To change this behavior, provide a `callerId`.\n- Set to '{{customer.number}}' to always use the customer's number as the caller ID.\n- Set to '{{phoneNumber.number}}' to always use the phone number of the assistant as the caller ID.\n- Set to any E164 number to always use that number as the caller ID. This needs to be a number that is owned or verified by your Transport provider like Twilio.\n\nFor Twilio, you can read up more here: https://www.twilio.com/docs/voice/twiml/dial#callerid", + "maxLength": 40 + }, + "transferPlan": { + "description": "This configures how transfer is executed and the experience of the destination party receiving the call. Defaults to `blind-transfer`.\n\n@default `transferPlan.mode='blind-transfer'`", + "allOf": [ + { + "$ref": "#/components/schemas/TransferPlan" + } + ] + }, + "description": { + "type": "string", + "description": "This is the description of the destination, used by the AI to choose when and how to transfer the call." } }, "required": [ - "name" + "type", + "number" ] }, - "McpToolMetadata": { + "TransferDestinationSip": { "type": "object", "properties": { - "protocol": { + "message": { + "description": "This is spoken to the customer before connecting them to the destination.\n\nUsage:\n- If this is not provided and transfer tool messages is not provided, default is \"Transferring the call now\".\n- If set to \"\", nothing is spoken. This is useful when you want to silently transfer. This is especially useful when transferring between assistants in a squad. In this scenario, you likely also want to set `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message` for the destination assistant.\n\nThis accepts a string or a ToolMessageStart class. Latter is useful if you want to specify multiple messages for different languages through the `contents` field.", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/CustomMessage" + } + ] + }, + "type": { "type": "string", "enum": [ - "sse", - "shttp" - ], - "description": "This is the protocol used for MCP communication. Defaults to Streamable HTTP." + "sip" + ] + }, + "sipUri": { + "type": "string", + "description": "This is the SIP URI to transfer the call to." + }, + "callerId": { + "type": "string", + "description": "This is the caller ID to use when transferring the call to the `sipUri`.\n\nUsage:\n- If not provided, the caller ID will be determined by the SIP infrastructure.\n- Set to '{{customer.number}}' to always use the customer's number as the caller ID.\n- Set to '{{phoneNumber.number}}' to always use the phone number of the assistant as the caller ID.\n- Set to any E164 number to always use that number as the caller ID.\n\nOnly applicable when `transferPlan.sipVerb='dial'`. Not applicable for SIP REFER.", + "maxLength": 40 + }, + "transferPlan": { + "description": "This configures how transfer is executed and the experience of the destination party receiving the call. Defaults to `blind-transfer`.\n\n@default `transferPlan.mode='blind-transfer'`", + "allOf": [ + { + "$ref": "#/components/schemas/TransferPlan" + } + ] + }, + "sipHeaders": { + "type": "object", + "description": "These are custom headers to be added to SIP refer during transfer call." + }, + "description": { + "type": "string", + "description": "This is the description of the destination, used by the AI to choose when and how to transfer the call." } - } + }, + "required": [ + "type", + "sipUri" + ] }, - "CreateMcpToolDTO": { + "CreateTransferCallToolDTO": { "type": "object", "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -13687,28 +14997,29 @@ "type": { "type": "string", "enum": [ - "mcp" - ], - "description": "The type of tool. \"mcp\" for MCP tool." - }, - "server": { - "description": "\n This is the server where a `tool-calls` webhook will be sent.\n\n Notes:\n - Webhook is sent to this server when a tool call is made.\n - Webhook contains the call, assistant, and phone number objects.\n - Webhook contains the variables set on the assistant.\n - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.\n - Webhook expects a response with tool call result.", - "allOf": [ - { - "$ref": "#/components/schemas/Server" - } + "transferCall" ] }, - "toolMessages": { - "description": "Per-tool message overrides for individual tools loaded from the MCP server. Set messages to an empty array to suppress messages for a specific tool. Tools not listed here will use the default messages from the parent tool.", + "destinations": { "type": "array", + "description": "These are the destinations that the call can be transferred to. If no destinations are provided, server.url will be used to get the transfer destination once the tool is called.", "items": { - "$ref": "#/components/schemas/McpToolMessages" + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationAssistant", + "title": "Assistant" + }, + { + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "Number" + }, + { + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "Sip" + } + ] } }, - "metadata": { - "$ref": "#/components/schemas/McpToolMetadata" - }, "rejectionPlan": { "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", "allOf": [ @@ -13722,93 +15033,33 @@ "type" ] }, - "CreateGoHighLevelCalendarAvailabilityToolDTO": { + "ContextEngineeringPlanLastNMessages": { "type": "object", "properties": { - "messages": { - "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ToolMessageStart", - "title": "ToolMessageStart" - }, - { - "$ref": "#/components/schemas/ToolMessageComplete", - "title": "ToolMessageComplete" - }, - { - "$ref": "#/components/schemas/ToolMessageFailed", - "title": "ToolMessageFailed" - }, - { - "$ref": "#/components/schemas/ToolMessageDelayed", - "title": "ToolMessageDelayed" - } - ] - } - }, "type": { "type": "string", "enum": [ - "gohighlevel.calendar.availability.check" - ], - "description": "The type of tool. \"gohighlevel.calendar.availability.check\" for GoHighLevel Calendar Availability Check tool." - }, - "rejectionPlan": { - "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", - "allOf": [ - { - "$ref": "#/components/schemas/ToolRejectionPlan" - } + "lastNMessages" ] + }, + "maxMessages": { + "type": "number", + "description": "This is the maximum number of messages to include in the context engineering plan.", + "minimum": 0 } }, "required": [ - "type" + "type", + "maxMessages" ] }, - "CreateGoHighLevelCalendarEventCreateToolDTO": { + "ContextEngineeringPlanNone": { "type": "object", "properties": { - "messages": { - "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ToolMessageStart", - "title": "ToolMessageStart" - }, - { - "$ref": "#/components/schemas/ToolMessageComplete", - "title": "ToolMessageComplete" - }, - { - "$ref": "#/components/schemas/ToolMessageFailed", - "title": "ToolMessageFailed" - }, - { - "$ref": "#/components/schemas/ToolMessageDelayed", - "title": "ToolMessageDelayed" - } - ] - } - }, "type": { "type": "string", "enum": [ - "gohighlevel.calendar.event.create" - ], - "description": "The type of tool. \"gohighlevel.calendar.event.create\" for GoHighLevel Calendar Event Create tool." - }, - "rejectionPlan": { - "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", - "allOf": [ - { - "$ref": "#/components/schemas/ToolRejectionPlan" - } + "none" ] } }, @@ -13816,46 +15067,13 @@ "type" ] }, - "CreateGoHighLevelContactCreateToolDTO": { + "ContextEngineeringPlanAll": { "type": "object", "properties": { - "messages": { - "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ToolMessageStart", - "title": "ToolMessageStart" - }, - { - "$ref": "#/components/schemas/ToolMessageComplete", - "title": "ToolMessageComplete" - }, - { - "$ref": "#/components/schemas/ToolMessageFailed", - "title": "ToolMessageFailed" - }, - { - "$ref": "#/components/schemas/ToolMessageDelayed", - "title": "ToolMessageDelayed" - } - ] - } - }, "type": { "type": "string", "enum": [ - "gohighlevel.contact.create" - ], - "description": "The type of tool. \"gohighlevel.contact.create\" for GoHighLevel Contact Create tool." - }, - "rejectionPlan": { - "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", - "allOf": [ - { - "$ref": "#/components/schemas/ToolRejectionPlan" - } + "all" ] } }, @@ -13863,46 +15081,13 @@ "type" ] }, - "CreateGoHighLevelContactGetToolDTO": { + "ContextEngineeringPlanUserAndAssistantMessages": { "type": "object", "properties": { - "messages": { - "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ToolMessageStart", - "title": "ToolMessageStart" - }, - { - "$ref": "#/components/schemas/ToolMessageComplete", - "title": "ToolMessageComplete" - }, - { - "$ref": "#/components/schemas/ToolMessageFailed", - "title": "ToolMessageFailed" - }, - { - "$ref": "#/components/schemas/ToolMessageDelayed", - "title": "ToolMessageDelayed" - } - ] - } - }, "type": { "type": "string", "enum": [ - "gohighlevel.contact.get" - ], - "description": "The type of tool. \"gohighlevel.contact.get\" for GoHighLevel Contact Get tool." - }, - "rejectionPlan": { - "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", - "allOf": [ - { - "$ref": "#/components/schemas/ToolRejectionPlan" - } + "userAndAssistantMessages" ] } }, @@ -13910,956 +15095,994 @@ "type" ] }, - "OpenAIMessage": { + "ContextEngineeringPlanPreviousAssistantMessages": { "type": "object", "properties": { - "content": { - "type": "string", - "nullable": true, - "maxLength": 100000000 - }, - "role": { + "type": { "type": "string", "enum": [ - "assistant", - "function", - "user", - "system", - "tool" + "previousAssistantMessages" ] } }, "required": [ - "content", - "role" + "type" ] }, - "AnyscaleModel": { + "HandoffDestinationAssistant": { "type": "object", "properties": { - "messages": { - "description": "This is the starting state for the conversation.", - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIMessage" - } + "type": { + "type": "string", + "enum": [ + "assistant" + ] }, - "tools": { - "type": "array", - "description": "These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.\n\nBoth `tools` and `toolIds` can be used together.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/CreateApiRequestToolDTO", - "title": "ApiRequestTool" - }, - { - "$ref": "#/components/schemas/CreateBashToolDTO", - "title": "BashTool" - }, - { - "$ref": "#/components/schemas/CreateCodeToolDTO", - "title": "CodeTool" - }, - { - "$ref": "#/components/schemas/CreateComputerToolDTO", - "title": "ComputerTool" - }, - { - "$ref": "#/components/schemas/CreateDtmfToolDTO", - "title": "DtmfTool" - }, - { - "$ref": "#/components/schemas/CreateEndCallToolDTO", - "title": "EndCallTool" - }, - { - "$ref": "#/components/schemas/CreateFunctionToolDTO", - "title": "FunctionTool" - }, - { - "$ref": "#/components/schemas/CreateGoHighLevelCalendarAvailabilityToolDTO", - "title": "GoHighLevelCalendarAvailabilityTool" - }, - { - "$ref": "#/components/schemas/CreateGoHighLevelCalendarEventCreateToolDTO", - "title": "GoHighLevelCalendarEventCreateTool" - }, - { - "$ref": "#/components/schemas/CreateGoHighLevelContactCreateToolDTO", - "title": "GoHighLevelContactCreateTool" - }, - { - "$ref": "#/components/schemas/CreateGoHighLevelContactGetToolDTO", - "title": "GoHighLevelContactGetTool" - }, - { - "$ref": "#/components/schemas/CreateGoogleCalendarCheckAvailabilityToolDTO", - "title": "GoogleCalendarCheckAvailabilityTool" - }, - { - "$ref": "#/components/schemas/CreateGoogleCalendarCreateEventToolDTO", - "title": "GoogleCalendarCreateEventTool" - }, - { - "$ref": "#/components/schemas/CreateGoogleSheetsRowAppendToolDTO", - "title": "GoogleSheetsRowAppendTool" - }, - { - "$ref": "#/components/schemas/CreateHandoffToolDTO", - "title": "HandoffTool" - }, - { - "$ref": "#/components/schemas/CreateMcpToolDTO", - "title": "McpTool" - }, - { - "$ref": "#/components/schemas/CreateQueryToolDTO", - "title": "QueryTool" - }, - { - "$ref": "#/components/schemas/CreateSlackSendMessageToolDTO", - "title": "SlackSendMessageTool" - }, - { - "$ref": "#/components/schemas/CreateSmsToolDTO", - "title": "SmsTool" - }, - { - "$ref": "#/components/schemas/CreateTextEditorToolDTO", - "title": "TextEditorTool" - }, - { - "$ref": "#/components/schemas/CreateTransferCallToolDTO", - "title": "TransferCallTool" - }, - { - "$ref": "#/components/schemas/CreateSipRequestToolDTO", - "title": "SipRequestTool" - }, - { - "$ref": "#/components/schemas/CreateVoicemailToolDTO", - "title": "VoicemailTool" - } - ] - } - }, - "toolIds": { - "description": "These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", - "type": "array", - "items": { - "type": "string" - } - }, - "knowledgeBase": { - "description": "These are the options for the knowledge base.", + "contextEngineeringPlan": { + "description": "This is the plan for manipulating the message context before handing off the call to the next assistant.", "oneOf": [ { - "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", - "title": "Custom" + "$ref": "#/components/schemas/ContextEngineeringPlanLastNMessages", + "title": "Last N Messages" + }, + { + "$ref": "#/components/schemas/ContextEngineeringPlanNone", + "title": "None" + }, + { + "$ref": "#/components/schemas/ContextEngineeringPlanAll", + "title": "All" + }, + { + "$ref": "#/components/schemas/ContextEngineeringPlanUserAndAssistantMessages", + "title": "User And Assistant Messages" + }, + { + "$ref": "#/components/schemas/ContextEngineeringPlanPreviousAssistantMessages", + "title": "Previous Assistant Messages" } ] }, - "provider": { + "assistantName": { "type": "string", - "enum": [ - "anyscale" - ] + "description": "This is the assistant to transfer the call to. You must provide either assistantName or assistantId." }, - "model": { + "assistantId": { "type": "string", - "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b" + "description": "This is the assistant id to transfer the call to. You must provide either assistantName or assistantId." }, - "temperature": { - "type": "number", - "description": "This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.", - "minimum": 0, - "maximum": 2 + "assistant": { + "description": "This is a transient assistant to transfer the call to. You may provide a transient assistant in the response `handoff-destination-request` in a dynamic handoff.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateAssistantDTO" + } + ] }, - "maxTokens": { - "type": "number", - "description": "This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", - "minimum": 50, - "maximum": 10000 + "variableExtractionPlan": { + "description": "This is the variable extraction plan for the handoff tool.", + "allOf": [ + { + "$ref": "#/components/schemas/VariableExtractionPlan" + } + ] }, - "emotionRecognitionEnabled": { - "type": "boolean", - "description": "This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false" + "assistantOverrides": { + "description": "These are the assistant overrides to apply to the destination assistant.", + "allOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides" + } + ] }, - "numFastTurns": { - "type": "number", - "description": "This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", - "minimum": 0 + "description": { + "type": "string", + "description": "This is the description of the destination, used by the AI to choose when and how to transfer the call." } }, "required": [ - "provider", - "model" + "type" ] }, - "AnthropicThinkingConfig": { + "HandoffDestinationDynamic": { "type": "object", "properties": { "type": { "type": "string", "enum": [ - "enabled" + "dynamic" ] }, - "budgetTokens": { - "type": "number", - "description": "The maximum number of tokens to allocate for thinking.\nMust be between 1024 and 100000 tokens.", - "minimum": 1024, - "maximum": 100000 + "server": { + "description": "This is where Vapi will send the handoff-destination-request webhook in a dynamic handoff.\n\nThe order of precedence is:\n\n1. tool.server.url\n2. assistant.server.url\n3. phoneNumber.server.url\n4. org.server.url", + "allOf": [ + { + "$ref": "#/components/schemas/Server" + } + ] + }, + "description": { + "type": "string", + "description": "This is the description of the destination, used by the AI to choose when and how to transfer the call." } }, "required": [ - "type", - "budgetTokens" + "type" ] }, - "AnthropicModel": { + "SquadMemberDTO": { "type": "object", "properties": { - "messages": { - "description": "This is the starting state for the conversation.", - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIMessage" - } - }, - "tools": { + "assistantDestinations": { "type": "array", - "description": "These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.\n\nBoth `tools` and `toolIds` can be used together.", "items": { "oneOf": [ { - "$ref": "#/components/schemas/CreateApiRequestToolDTO", - "title": "ApiRequestTool" - }, - { - "$ref": "#/components/schemas/CreateBashToolDTO", - "title": "BashTool" - }, - { - "$ref": "#/components/schemas/CreateCodeToolDTO", - "title": "CodeTool" - }, - { - "$ref": "#/components/schemas/CreateComputerToolDTO", - "title": "ComputerTool" - }, - { - "$ref": "#/components/schemas/CreateDtmfToolDTO", - "title": "DtmfTool" - }, - { - "$ref": "#/components/schemas/CreateEndCallToolDTO", - "title": "EndCallTool" - }, - { - "$ref": "#/components/schemas/CreateFunctionToolDTO", - "title": "FunctionTool" - }, - { - "$ref": "#/components/schemas/CreateGoHighLevelCalendarAvailabilityToolDTO", - "title": "GoHighLevelCalendarAvailabilityTool" - }, - { - "$ref": "#/components/schemas/CreateGoHighLevelCalendarEventCreateToolDTO", - "title": "GoHighLevelCalendarEventCreateTool" - }, - { - "$ref": "#/components/schemas/CreateGoHighLevelContactCreateToolDTO", - "title": "GoHighLevelContactCreateTool" - }, - { - "$ref": "#/components/schemas/CreateGoHighLevelContactGetToolDTO", - "title": "GoHighLevelContactGetTool" - }, - { - "$ref": "#/components/schemas/CreateGoogleCalendarCheckAvailabilityToolDTO", - "title": "GoogleCalendarCheckAvailabilityTool" - }, - { - "$ref": "#/components/schemas/CreateGoogleCalendarCreateEventToolDTO", - "title": "GoogleCalendarCreateEventTool" - }, - { - "$ref": "#/components/schemas/CreateGoogleSheetsRowAppendToolDTO", - "title": "GoogleSheetsRowAppendTool" - }, - { - "$ref": "#/components/schemas/CreateHandoffToolDTO", - "title": "HandoffTool" - }, - { - "$ref": "#/components/schemas/CreateMcpToolDTO", - "title": "McpTool" - }, - { - "$ref": "#/components/schemas/CreateQueryToolDTO", - "title": "QueryTool" - }, - { - "$ref": "#/components/schemas/CreateSlackSendMessageToolDTO", - "title": "SlackSendMessageTool" - }, - { - "$ref": "#/components/schemas/CreateSmsToolDTO", - "title": "SmsTool" - }, - { - "$ref": "#/components/schemas/CreateTextEditorToolDTO", - "title": "TextEditorTool" - }, - { - "$ref": "#/components/schemas/CreateTransferCallToolDTO", - "title": "TransferCallTool" - }, - { - "$ref": "#/components/schemas/CreateSipRequestToolDTO", - "title": "SipRequestTool" + "$ref": "#/components/schemas/TransferDestinationAssistant", + "title": "Transfer Destination" }, { - "$ref": "#/components/schemas/CreateVoicemailToolDTO", - "title": "VoicemailTool" + "$ref": "#/components/schemas/HandoffDestinationAssistant", + "title": "Handoff Destination" } ] } }, - "toolIds": { - "description": "These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + "assistantId": { + "type": "string", + "nullable": true, + "description": "This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead." + }, + "assistant": { + "description": "This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateAssistantDTO" + } + ] + }, + "assistantOverrides": { + "description": "This can be used to override the assistant's settings and provide values for it's template variables.", + "allOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides" + } + ] + } + } + }, + "CreateSquadDTO": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "This is the name of the squad." + }, + "members": { + "description": "This is the list of assistants that make up the squad.\n\nThe call will start with the first assistant in the list.", "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/SquadMemberDTO" } }, - "knowledgeBase": { - "description": "These are the options for the knowledge base.", - "oneOf": [ + "membersOverrides": { + "description": "This can be used to override all the assistants' settings and provide values for their template variables.\n\nBoth `membersOverrides` and `members[n].assistantOverrides` can be used together. First, `members[n].assistantOverrides` is applied. Then, `membersOverrides` is applied as a global override.", + "allOf": [ { - "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", - "title": "Custom" + "$ref": "#/components/schemas/AssistantOverrides" } ] - }, - "model": { + } + }, + "required": [ + "members" + ] + }, + "HandoffDestinationSquad": { + "type": "object", + "properties": { + "type": { "type": "string", - "description": "The specific Anthropic/Claude model that will be used.", "enum": [ - "claude-3-opus-20240229", - "claude-3-sonnet-20240229", - "claude-3-haiku-20240307", - "claude-3-5-sonnet-20240620", - "claude-3-5-sonnet-20241022", - "claude-3-5-haiku-20241022", - "claude-3-7-sonnet-20250219", - "claude-opus-4-20250514", - "claude-opus-4-5-20251101", - "claude-opus-4-6", - "claude-sonnet-4-20250514", - "claude-sonnet-4-5-20250929", - "claude-sonnet-4-6", - "claude-haiku-4-5-20251001" + "squad" ] }, - "provider": { - "type": "string", - "description": "The provider identifier for Anthropic.", - "enum": [ - "anthropic" + "contextEngineeringPlan": { + "description": "This is the plan for manipulating the message context before handing off the call to the squad.", + "oneOf": [ + { + "$ref": "#/components/schemas/ContextEngineeringPlanLastNMessages", + "title": "Last N Messages" + }, + { + "$ref": "#/components/schemas/ContextEngineeringPlanNone", + "title": "None" + }, + { + "$ref": "#/components/schemas/ContextEngineeringPlanAll", + "title": "All" + }, + { + "$ref": "#/components/schemas/ContextEngineeringPlanUserAndAssistantMessages", + "title": "User And Assistant Messages" + }, + { + "$ref": "#/components/schemas/ContextEngineeringPlanPreviousAssistantMessages", + "title": "Previous Assistant Messages" + } ] }, - "thinking": { - "description": "Optional configuration for Anthropic's thinking feature.\nOnly applicable for claude-3-7-sonnet-20250219 model.\nIf provided, maxTokens must be greater than thinking.budgetTokens.", + "squadId": { + "type": "string", + "description": "This is the squad id to transfer the call to." + }, + "squad": { + "description": "This is a transient squad to transfer the call to.", "allOf": [ { - "$ref": "#/components/schemas/AnthropicThinkingConfig" + "$ref": "#/components/schemas/CreateSquadDTO" } ] }, - "temperature": { - "type": "number", - "description": "This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.", - "minimum": 0, - "maximum": 2 + "entryAssistantName": { + "type": "string", + "description": "This is the name of the entry assistant to start with when handing off to the squad.\nIf not provided, the first member of the squad will be used." }, - "maxTokens": { - "type": "number", - "description": "This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", - "minimum": 50, - "maximum": 10000 + "variableExtractionPlan": { + "description": "This is the variable extraction plan for the handoff tool.", + "allOf": [ + { + "$ref": "#/components/schemas/VariableExtractionPlan" + } + ] }, - "emotionRecognitionEnabled": { - "type": "boolean", - "description": "This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false" + "squadOverrides": { + "description": "These are the overrides to apply to the squad configuration.\nMaps to squad-level membersOverrides.", + "allOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides" + } + ] }, - "numFastTurns": { - "type": "number", - "description": "This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", - "minimum": 0 + "description": { + "type": "string", + "description": "This is the description of the destination, used by the AI to choose when and how to transfer the call." } }, "required": [ - "model", - "provider" + "type" ] }, - "AnthropicBedrockModel": { + "CreateHandoffToolDTO": { "type": "object", "properties": { "messages": { - "description": "This is the starting state for the conversation.", - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIMessage" - } - }, - "tools": { "type": "array", - "description": "These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.\n\nBoth `tools` and `toolIds` can be used together.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { - "$ref": "#/components/schemas/CreateApiRequestToolDTO", - "title": "ApiRequestTool" - }, - { - "$ref": "#/components/schemas/CreateBashToolDTO", - "title": "BashTool" - }, - { - "$ref": "#/components/schemas/CreateCodeToolDTO", - "title": "CodeTool" - }, - { - "$ref": "#/components/schemas/CreateComputerToolDTO", - "title": "ComputerTool" - }, - { - "$ref": "#/components/schemas/CreateDtmfToolDTO", - "title": "DtmfTool" - }, - { - "$ref": "#/components/schemas/CreateEndCallToolDTO", - "title": "EndCallTool" - }, - { - "$ref": "#/components/schemas/CreateFunctionToolDTO", - "title": "FunctionTool" - }, - { - "$ref": "#/components/schemas/CreateGoHighLevelCalendarAvailabilityToolDTO", - "title": "GoHighLevelCalendarAvailabilityTool" - }, - { - "$ref": "#/components/schemas/CreateGoHighLevelCalendarEventCreateToolDTO", - "title": "GoHighLevelCalendarEventCreateTool" - }, - { - "$ref": "#/components/schemas/CreateGoHighLevelContactCreateToolDTO", - "title": "GoHighLevelContactCreateTool" - }, - { - "$ref": "#/components/schemas/CreateGoHighLevelContactGetToolDTO", - "title": "GoHighLevelContactGetTool" + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" }, { - "$ref": "#/components/schemas/CreateGoogleCalendarCheckAvailabilityToolDTO", - "title": "GoogleCalendarCheckAvailabilityTool" + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" }, { - "$ref": "#/components/schemas/CreateGoogleCalendarCreateEventToolDTO", - "title": "GoogleCalendarCreateEventTool" + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" }, { - "$ref": "#/components/schemas/CreateGoogleSheetsRowAppendToolDTO", - "title": "GoogleSheetsRowAppendTool" - }, + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] + } + }, + "type": { + "type": "string", + "description": "This is the type of the tool.\nWhen you're using handoff tool, we recommend adding this to your system prompt\n---\n# System context\n\nYou are part of a multi-agent system designed to make agent coordination and execution easy. Agents uses two primary abstraction: **Agents** and **Handoffs**. An agent encompasses instructions and tools and can hand off a conversation to another agent when appropriate. Handoffs are achieved by calling a handoff function, generally named `handoff_to_`. Handoffs between agents are handled seamlessly in the background; do not mention or draw attention to these handoffs in your conversation with the user.\n\n# Agent context\n\n{put your agent system prompt here}\n---", + "enum": [ + "handoff" + ] + }, + "defaultResult": { + "type": "string", + "description": "This is the default local tool result message used when no runtime handoff result override is returned." + }, + "destinations": { + "type": "array", + "description": "These are the destinations that the call can be handed off to.\n\nUsage:\n1. Single destination\n\nUse `assistantId` to handoff the call to a saved assistant, or `assistantName` to handoff the call to an assistant in the same squad.\n\n```json\n{\n \"tools\": [\n {\n \"type\": \"handoff\",\n \"destinations\": [\n {\n \"type\": \"assistant\",\n \"assistantId\": \"assistant-123\", // or \"assistantName\": \"Assistant123\"\n \"description\": \"customer wants to be handed off to assistant-123\",\n \"contextEngineeringPlan\": {\n \"type\": \"all\"\n }\n }\n ],\n }\n ]\n}\n```\n\n2. Multiple destinations\n\n2.1. Multiple Tools, Each With One Destination (OpenAI recommended)\n\n```json\n{\n \"tools\": [\n {\n \"type\": \"handoff\",\n \"destinations\": [\n {\n \"type\": \"assistant\",\n \"assistantId\": \"assistant-123\",\n \"description\": \"customer wants to be handed off to assistant-123\",\n \"contextEngineeringPlan\": {\n \"type\": \"all\"\n }\n },\n ],\n },\n {\n \"type\": \"handoff\",\n \"destinations\": [\n {\n \"type\": \"assistant\",\n \"assistantId\": \"assistant-456\",\n \"description\": \"customer wants to be handed off to assistant-456\",\n \"contextEngineeringPlan\": {\n \"type\": \"all\"\n }\n }\n ],\n }\n ]\n}\n```\n\n2.2. One Tool, Multiple Destinations (Anthropic recommended)\n\n```json\n{\n \"tools\": [\n {\n \"type\": \"handoff\",\n \"destinations\": [\n {\n \"type\": \"assistant\",\n \"assistantId\": \"assistant-123\",\n \"description\": \"customer wants to be handed off to assistant-123\",\n \"contextEngineeringPlan\": {\n \"type\": \"all\"\n }\n },\n {\n \"type\": \"assistant\",\n \"assistantId\": \"assistant-456\",\n \"description\": \"customer wants to be handed off to assistant-456\",\n \"contextEngineeringPlan\": {\n \"type\": \"all\"\n }\n }\n ],\n }\n ]\n}\n```\n\n3. Dynamic destination\n\n3.1 To determine the destination dynamically, supply a `dynamic` handoff destination type and a `server` object.\n VAPI will send a handoff-destination-request webhook to the `server.url`.\n The response from the server will be used as the destination (if valid).\n\n```json\n{\n \"tools\": [\n {\n \"type\": \"handoff\",\n \"destinations\": [\n {\n \"type\": \"dynamic\",\n \"server\": {\n \"url\": \"https://example.com\"\n }\n }\n ],\n }\n ]\n}\n```\n\n3.2. To pass custom parameters to the server, you can use the `function` object.\n\n```json\n{\n \"tools\": [\n {\n \"type\": \"handoff\",\n \"destinations\": [\n {\n \"type\": \"dynamic\",\n \"server\": {\n \"url\": \"https://example.com\"\n },\n }\n ],\n \"function\": {\n \"name\": \"handoff\",\n \"description\": \"Call this function when the customer is ready to be handed off to the next assistant\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"destination\": {\n \"type\": \"string\",\n \"description\": \"Use dynamic when customer is ready to be handed off to the next assistant\",\n \"enum\": [\"dynamic\"]\n },\n \"customerAreaCode\": {\n \"type\": \"number\",\n \"description\": \"Area code of the customer\"\n },\n \"customerIntent\": {\n \"type\": \"string\",\n \"enum\": [\"new-customer\", \"existing-customer\"],\n \"description\": \"Use new-customer when customer is a new customer, existing-customer when customer is an existing customer\"\n },\n \"customerSentiment\": {\n \"type\": \"string\",\n \"enum\": [\"positive\", \"negative\", \"neutral\"],\n \"description\": \"Use positive when customer is happy, negative when customer is unhappy, neutral when customer is neutral\"\n }\n }\n }\n }\n }\n ]\n}\n```\n\nThe properties `customerAreaCode`, `customerIntent`, and `customerSentiment` will be passed to the server in the webhook request body.", + "items": { + "oneOf": [ { - "$ref": "#/components/schemas/CreateHandoffToolDTO", - "title": "HandoffTool" + "$ref": "#/components/schemas/HandoffDestinationAssistant", + "title": "Assistant" }, { - "$ref": "#/components/schemas/CreateMcpToolDTO", - "title": "McpTool" + "$ref": "#/components/schemas/HandoffDestinationDynamic", + "title": "Dynamic" }, { - "$ref": "#/components/schemas/CreateQueryToolDTO", - "title": "QueryTool" - }, - { - "$ref": "#/components/schemas/CreateSlackSendMessageToolDTO", - "title": "SlackSendMessageTool" - }, - { - "$ref": "#/components/schemas/CreateSmsToolDTO", - "title": "SmsTool" - }, - { - "$ref": "#/components/schemas/CreateTextEditorToolDTO", - "title": "TextEditorTool" - }, - { - "$ref": "#/components/schemas/CreateTransferCallToolDTO", - "title": "TransferCallTool" - }, - { - "$ref": "#/components/schemas/CreateSipRequestToolDTO", - "title": "SipRequestTool" - }, - { - "$ref": "#/components/schemas/CreateVoicemailToolDTO", - "title": "VoicemailTool" + "$ref": "#/components/schemas/HandoffDestinationSquad", + "title": "Squad" } ] } }, - "toolIds": { - "description": "These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", - "type": "array", - "items": { - "type": "string" - } - }, - "knowledgeBase": { - "description": "These are the options for the knowledge base.", - "oneOf": [ + "function": { + "description": "This is the optional function definition that will be passed to the LLM.\nIf this is not defined, we will construct this based on the other properties.\n\nFor example, given the following tools definition:\n```json\n{\n \"tools\": [\n {\n \"type\": \"handoff\",\n \"destinations\": [\n {\n \"type\": \"assistant\",\n \"assistantId\": \"assistant-123\",\n \"description\": \"customer wants to be handed off to assistant-123\",\n \"contextEngineeringPlan\": {\n \"type\": \"all\"\n }\n },\n {\n \"type\": \"assistant\",\n \"assistantId\": \"assistant-456\",\n \"description\": \"customer wants to be handed off to assistant-456\",\n \"contextEngineeringPlan\": {\n \"type\": \"all\"\n }\n }\n ],\n }\n ]\n}\n```\n\nWe will construct the following function definition:\n```json\n{\n \"function\": {\n \"name\": \"handoff_to_assistant-123\",\n \"description\": \"\n Use this function to handoff the call to the next assistant.\n Only use it when instructions explicitly ask you to use the handoff_to_assistant function.\n DO NOT call this function unless you are instructed to do so.\n Here are the destinations you can handoff the call to:\n 1. assistant-123. When: customer wants to be handed off to assistant-123\n 2. assistant-456. When: customer wants to be handed off to assistant-456\n \",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"destination\": {\n \"type\": \"string\",\n \"description\": \"Options: assistant-123 (customer wants to be handed off to assistant-123), assistant-456 (customer wants to be handed off to assistant-456)\",\n \"enum\": [\"assistant-123\", \"assistant-456\"]\n },\n },\n \"required\": [\"destination\"]\n }\n }\n}\n```\n\nTo override this function, please provide an OpenAI function definition and refer to it in the system prompt.\nYou may override parts of the function definition (i.e. you may only want to change the function name for your prompt).\nIf you choose to override the function parameters, it must include `destination` as a required parameter, and it must evaluate to either an assistantId, assistantName, or a the string literal `dynamic`.\n\nTo pass custom parameters to the server in a dynamic handoff, you can use the function parameters, with `dynamic` as the destination.\n```json\n{\n \"function\": {\n \"name\": \"dynamic_handoff\",\n \"description\": \"\n Call this function when the customer is ready to be handed off to the next assistant\n \",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"destination\": {\n \"type\": \"string\",\n \"enum\": [\"dynamic\"]\n },\n \"customerAreaCode\": {\n \"type\": \"number\",\n \"description\": \"Area code of the customer\"\n },\n \"customerIntent\": {\n \"type\": \"string\",\n \"enum\": [\"new-customer\", \"existing-customer\"],\n \"description\": \"Use new-customer when customer is a new customer, existing-customer when customer is an existing customer\"\n },\n \"customerSentiment\": {\n \"type\": \"string\",\n \"enum\": [\"positive\", \"negative\", \"neutral\"],\n \"description\": \"Use positive when customer is happy, negative when customer is unhappy, neutral when customer is neutral\"\n }\n },\n \"required\": [\"destination\", \"customerAreaCode\", \"customerIntent\", \"customerSentiment\"]\n }\n }\n}\n```", + "allOf": [ { - "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", - "title": "Custom" + "$ref": "#/components/schemas/OpenAIFunction" } ] }, - "provider": { - "type": "string", - "description": "The provider identifier for Anthropic via AWS Bedrock.", - "enum": [ - "anthropic-bedrock" + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/ToolRejectionPlan" + } ] - }, - "model": { + } + }, + "required": [ + "type" + ] + }, + "CreateCustomKnowledgeBaseDTO": { + "type": "object", + "properties": { + "provider": { "type": "string", - "description": "The specific Anthropic/Claude model that will be used via Bedrock.", + "description": "This knowledge base is bring your own knowledge base implementation.", "enum": [ - "claude-3-opus-20240229", - "claude-3-sonnet-20240229", - "claude-3-haiku-20240307", - "claude-3-5-sonnet-20240620", - "claude-3-5-sonnet-20241022", - "claude-3-5-haiku-20241022", - "claude-3-7-sonnet-20250219", - "claude-opus-4-20250514", - "claude-opus-4-5-20251101", - "claude-opus-4-6", - "claude-sonnet-4-20250514", - "claude-sonnet-4-5-20250929", - "claude-sonnet-4-6", - "claude-haiku-4-5-20251001" + "custom-knowledge-base" ] }, - "thinking": { - "description": "Optional configuration for Anthropic's thinking feature.\nOnly applicable for claude-3-7-sonnet-20250219 model.\nIf provided, maxTokens must be greater than thinking.budgetTokens.", + "server": { + "description": "This is where the knowledge base request will be sent.\n\nRequest Example:\n\nPOST https://{server.url}\nContent-Type: application/json\n\n{\n \"messsage\": {\n \"type\": \"knowledge-base-request\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Why is ocean blue?\"\n }\n ],\n ...other metadata about the call...\n }\n}\n\nResponse Expected:\n```\n{\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"The ocean is blue because water absorbs everything but blue.\",\n }, // YOU CAN RETURN THE EXACT RESPONSE TO SPEAK\n \"documents\": [\n {\n \"content\": \"The ocean is blue primarily because water absorbs colors in the red part of the light spectrum and scatters the blue light, making it more visible to our eyes.\",\n \"similarity\": 1\n },\n {\n \"content\": \"Blue light is scattered more by the water molecules than other colors, enhancing the blue appearance of the ocean.\",\n \"similarity\": .5\n }\n ] // OR, YOU CAN RETURN AN ARRAY OF DOCUMENTS THAT WILL BE SENT TO THE MODEL\n}\n```", "allOf": [ { - "$ref": "#/components/schemas/AnthropicThinkingConfig" + "$ref": "#/components/schemas/Server" } ] + } + }, + "required": [ + "provider", + "server" + ] + }, + "KnowledgeBase": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the knowledge base", + "example": "My Knowledge Base" }, - "temperature": { - "type": "number", - "description": "This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.", - "minimum": 0, - "maximum": 2 + "provider": { + "type": "string", + "description": "The provider of the knowledge base", + "enum": [ + "google" + ], + "example": "google" }, - "maxTokens": { - "type": "number", - "description": "This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", - "minimum": 50, - "maximum": 10000 + "model": { + "type": "string", + "description": "The model to use for the knowledge base", + "enum": [ + "gemini-3.5-flash", + "gemini-3.1-flash-lite", + "gemini-3-flash-preview", + "gemini-2.5-pro", + "gemini-2.5-flash", + "gemini-2.5-flash-lite", + "gemini-2.0-flash-thinking-exp", + "gemini-2.0-pro-exp-02-05", + "gemini-2.0-flash", + "gemini-2.0-flash-lite", + "gemini-2.0-flash-exp", + "gemini-2.0-flash-realtime-exp", + "gemini-1.5-flash", + "gemini-1.5-flash-002", + "gemini-1.5-pro", + "gemini-1.5-pro-002", + "gemini-1.0-pro" + ] }, - "emotionRecognitionEnabled": { - "type": "boolean", - "description": "This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false" + "description": { + "type": "string", + "description": "A description of the knowledge base" }, - "numFastTurns": { - "type": "number", - "description": "This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", - "minimum": 0 + "fileIds": { + "description": "The file IDs associated with this knowledge base", + "type": "array", + "items": { + "type": "string" + } } }, "required": [ + "name", "provider", - "model" + "description", + "fileIds" ] }, - "CerebrasModel": { + "CreateQueryToolDTO": { "type": "object", "properties": { "messages": { - "description": "This is the starting state for the conversation.", "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIMessage" - } - }, - "tools": { - "type": "array", - "description": "These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.\n\nBoth `tools` and `toolIds` can be used together.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { - "$ref": "#/components/schemas/CreateApiRequestToolDTO", - "title": "ApiRequestTool" - }, - { - "$ref": "#/components/schemas/CreateBashToolDTO", - "title": "BashTool" - }, - { - "$ref": "#/components/schemas/CreateCodeToolDTO", - "title": "CodeTool" - }, - { - "$ref": "#/components/schemas/CreateComputerToolDTO", - "title": "ComputerTool" + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" }, { - "$ref": "#/components/schemas/CreateDtmfToolDTO", - "title": "DtmfTool" + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" }, { - "$ref": "#/components/schemas/CreateEndCallToolDTO", - "title": "EndCallTool" + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" }, { - "$ref": "#/components/schemas/CreateFunctionToolDTO", - "title": "FunctionTool" - }, + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] + } + }, + "type": { + "type": "string", + "enum": [ + "query" + ], + "description": "The type of tool. \"query\" for Query tool." + }, + "knowledgeBases": { + "description": "The knowledge bases to query", + "type": "array", + "items": { + "$ref": "#/components/schemas/KnowledgeBase" + } + }, + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/ToolRejectionPlan" + } + ] + } + }, + "required": [ + "type" + ] + }, + "CreateGoogleCalendarCreateEventToolDTO": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", + "items": { + "oneOf": [ { - "$ref": "#/components/schemas/CreateGoHighLevelCalendarAvailabilityToolDTO", - "title": "GoHighLevelCalendarAvailabilityTool" + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" }, { - "$ref": "#/components/schemas/CreateGoHighLevelCalendarEventCreateToolDTO", - "title": "GoHighLevelCalendarEventCreateTool" + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" }, { - "$ref": "#/components/schemas/CreateGoHighLevelContactCreateToolDTO", - "title": "GoHighLevelContactCreateTool" + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" }, { - "$ref": "#/components/schemas/CreateGoHighLevelContactGetToolDTO", - "title": "GoHighLevelContactGetTool" - }, + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] + } + }, + "type": { + "type": "string", + "enum": [ + "google.calendar.event.create" + ], + "description": "The type of tool. \"google.calendar.event.create\" for Google Calendar Create Event tool." + }, + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/ToolRejectionPlan" + } + ] + } + }, + "required": [ + "type" + ] + }, + "CreateGoogleSheetsRowAppendToolDTO": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", + "items": { + "oneOf": [ { - "$ref": "#/components/schemas/CreateGoogleCalendarCheckAvailabilityToolDTO", - "title": "GoogleCalendarCheckAvailabilityTool" + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" }, { - "$ref": "#/components/schemas/CreateGoogleCalendarCreateEventToolDTO", - "title": "GoogleCalendarCreateEventTool" + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" }, { - "$ref": "#/components/schemas/CreateGoogleSheetsRowAppendToolDTO", - "title": "GoogleSheetsRowAppendTool" + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" }, { - "$ref": "#/components/schemas/CreateHandoffToolDTO", - "title": "HandoffTool" - }, + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] + } + }, + "type": { + "type": "string", + "enum": [ + "google.sheets.row.append" + ], + "description": "The type of tool. \"google.sheets.row.append\" for Google Sheets Row Append tool." + }, + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/ToolRejectionPlan" + } + ] + } + }, + "required": [ + "type" + ] + }, + "CreateGoogleCalendarCheckAvailabilityToolDTO": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", + "items": { + "oneOf": [ { - "$ref": "#/components/schemas/CreateMcpToolDTO", - "title": "McpTool" + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" }, { - "$ref": "#/components/schemas/CreateQueryToolDTO", - "title": "QueryTool" + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" }, { - "$ref": "#/components/schemas/CreateSlackSendMessageToolDTO", - "title": "SlackSendMessageTool" + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" }, { - "$ref": "#/components/schemas/CreateSmsToolDTO", - "title": "SmsTool" - }, + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] + } + }, + "type": { + "type": "string", + "enum": [ + "google.calendar.availability.check" + ], + "description": "The type of tool. \"google.calendar.availability.check\" for Google Calendar Check Availability tool." + }, + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/ToolRejectionPlan" + } + ] + } + }, + "required": [ + "type" + ] + }, + "CreateSlackSendMessageToolDTO": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", + "items": { + "oneOf": [ { - "$ref": "#/components/schemas/CreateTextEditorToolDTO", - "title": "TextEditorTool" + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" }, { - "$ref": "#/components/schemas/CreateTransferCallToolDTO", - "title": "TransferCallTool" + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" }, { - "$ref": "#/components/schemas/CreateSipRequestToolDTO", - "title": "SipRequestTool" + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" }, { - "$ref": "#/components/schemas/CreateVoicemailToolDTO", - "title": "VoicemailTool" + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" } ] } }, - "toolIds": { - "description": "These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", - "type": "array", - "items": { - "type": "string" - } - }, - "knowledgeBase": { - "description": "These are the options for the knowledge base.", - "oneOf": [ - { - "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", - "title": "Custom" - } - ] - }, - "model": { + "type": { "type": "string", - "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b", "enum": [ - "llama3.1-8b", - "llama-3.3-70b" - ] + "slack.message.send" + ], + "description": "The type of tool. \"slack.message.send\" for Slack Send Message tool." }, - "provider": { - "type": "string", - "enum": [ - "cerebras" + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/ToolRejectionPlan" + } ] - }, - "temperature": { - "type": "number", - "description": "This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.", - "minimum": 0, - "maximum": 2 - }, - "maxTokens": { - "type": "number", - "description": "This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", - "minimum": 50, - "maximum": 10000 - }, - "emotionRecognitionEnabled": { - "type": "boolean", - "description": "This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false" - }, - "numFastTurns": { - "type": "number", - "description": "This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", - "minimum": 0 } }, "required": [ - "model", - "provider" + "type" ] }, - "CustomLLMModel": { + "McpToolMessages": { "type": "object", "properties": { - "messages": { - "description": "This is the starting state for the conversation.", - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIMessage" - } + "name": { + "type": "string", + "description": "The name of the tool from the MCP server." }, - "tools": { + "messages": { "type": "array", - "description": "These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.\n\nBoth `tools` and `toolIds` can be used together.", + "description": "Custom messages for this specific tool. Set to an empty array to suppress all messages for this tool. If not provided, the tool will use the default messages from the parent MCP tool configuration. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { - "$ref": "#/components/schemas/CreateApiRequestToolDTO", - "title": "ApiRequestTool" + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" }, { - "$ref": "#/components/schemas/CreateBashToolDTO", - "title": "BashTool" + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" }, { - "$ref": "#/components/schemas/CreateCodeToolDTO", - "title": "CodeTool" + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" }, { - "$ref": "#/components/schemas/CreateComputerToolDTO", - "title": "ComputerTool" - }, + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] + } + } + }, + "required": [ + "name" + ] + }, + "McpToolMetadata": { + "type": "object", + "properties": { + "protocol": { + "type": "string", + "enum": [ + "sse", + "shttp" + ], + "description": "This is the protocol used for MCP communication. Defaults to Streamable HTTP." + } + } + }, + "CreateMcpToolDTO": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", + "items": { + "oneOf": [ { - "$ref": "#/components/schemas/CreateDtmfToolDTO", - "title": "DtmfTool" + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" }, { - "$ref": "#/components/schemas/CreateEndCallToolDTO", - "title": "EndCallTool" + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" }, { - "$ref": "#/components/schemas/CreateFunctionToolDTO", - "title": "FunctionTool" + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" }, { - "$ref": "#/components/schemas/CreateGoHighLevelCalendarAvailabilityToolDTO", - "title": "GoHighLevelCalendarAvailabilityTool" - }, + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] + } + }, + "type": { + "type": "string", + "enum": [ + "mcp" + ], + "description": "The type of tool. \"mcp\" for MCP tool." + }, + "server": { + "description": "\n This is the server where a `tool-calls` webhook will be sent.\n\n Notes:\n - Webhook is sent to this server when a tool call is made.\n - Webhook contains the call, assistant, and phone number objects.\n - Webhook contains the variables set on the assistant.\n - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.\n - Webhook expects a response with tool call result.", + "allOf": [ + { + "$ref": "#/components/schemas/Server" + } + ] + }, + "toolMessages": { + "description": "Per-tool message overrides for individual tools loaded from the MCP server. Set messages to an empty array to suppress messages for a specific tool. Tools not listed here will use the default messages from the parent tool.", + "type": "array", + "items": { + "$ref": "#/components/schemas/McpToolMessages" + } + }, + "metadata": { + "$ref": "#/components/schemas/McpToolMetadata" + }, + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/ToolRejectionPlan" + } + ] + } + }, + "required": [ + "type" + ] + }, + "CreateGoHighLevelCalendarAvailabilityToolDTO": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", + "items": { + "oneOf": [ { - "$ref": "#/components/schemas/CreateGoHighLevelCalendarEventCreateToolDTO", - "title": "GoHighLevelCalendarEventCreateTool" + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" }, { - "$ref": "#/components/schemas/CreateGoHighLevelContactCreateToolDTO", - "title": "GoHighLevelContactCreateTool" + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" }, { - "$ref": "#/components/schemas/CreateGoHighLevelContactGetToolDTO", - "title": "GoHighLevelContactGetTool" + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" }, { - "$ref": "#/components/schemas/CreateGoogleCalendarCheckAvailabilityToolDTO", - "title": "GoogleCalendarCheckAvailabilityTool" - }, + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] + } + }, + "type": { + "type": "string", + "enum": [ + "gohighlevel.calendar.availability.check" + ], + "description": "The type of tool. \"gohighlevel.calendar.availability.check\" for GoHighLevel Calendar Availability Check tool." + }, + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/ToolRejectionPlan" + } + ] + } + }, + "required": [ + "type" + ] + }, + "CreateGoHighLevelCalendarEventCreateToolDTO": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", + "items": { + "oneOf": [ { - "$ref": "#/components/schemas/CreateGoogleCalendarCreateEventToolDTO", - "title": "GoogleCalendarCreateEventTool" + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" }, { - "$ref": "#/components/schemas/CreateGoogleSheetsRowAppendToolDTO", - "title": "GoogleSheetsRowAppendTool" + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" }, { - "$ref": "#/components/schemas/CreateHandoffToolDTO", - "title": "HandoffTool" + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" }, { - "$ref": "#/components/schemas/CreateMcpToolDTO", - "title": "McpTool" - }, + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] + } + }, + "type": { + "type": "string", + "enum": [ + "gohighlevel.calendar.event.create" + ], + "description": "The type of tool. \"gohighlevel.calendar.event.create\" for GoHighLevel Calendar Event Create tool." + }, + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/ToolRejectionPlan" + } + ] + } + }, + "required": [ + "type" + ] + }, + "CreateGoHighLevelContactCreateToolDTO": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", + "items": { + "oneOf": [ { - "$ref": "#/components/schemas/CreateQueryToolDTO", - "title": "QueryTool" + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" }, { - "$ref": "#/components/schemas/CreateSlackSendMessageToolDTO", - "title": "SlackSendMessageTool" + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" }, { - "$ref": "#/components/schemas/CreateSmsToolDTO", - "title": "SmsTool" + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" }, { - "$ref": "#/components/schemas/CreateTextEditorToolDTO", - "title": "TextEditorTool" + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] + } + }, + "type": { + "type": "string", + "enum": [ + "gohighlevel.contact.create" + ], + "description": "The type of tool. \"gohighlevel.contact.create\" for GoHighLevel Contact Create tool." + }, + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/ToolRejectionPlan" + } + ] + } + }, + "required": [ + "type" + ] + }, + "CreateGoHighLevelContactGetToolDTO": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" }, { - "$ref": "#/components/schemas/CreateTransferCallToolDTO", - "title": "TransferCallTool" + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" }, { - "$ref": "#/components/schemas/CreateSipRequestToolDTO", - "title": "SipRequestTool" + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" }, { - "$ref": "#/components/schemas/CreateVoicemailToolDTO", - "title": "VoicemailTool" + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" } ] } }, - "toolIds": { - "description": "These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", - "type": "array", - "items": { - "type": "string" - } + "type": { + "type": "string", + "enum": [ + "gohighlevel.contact.get" + ], + "description": "The type of tool. \"gohighlevel.contact.get\" for GoHighLevel Contact Get tool." }, - "knowledgeBase": { - "description": "These are the options for the knowledge base.", - "oneOf": [ + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "allOf": [ { - "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", - "title": "Custom" + "$ref": "#/components/schemas/ToolRejectionPlan" } ] - }, - "provider": { + } + }, + "required": [ + "type" + ] + }, + "OpenAIMessage": { + "type": "object", + "properties": { + "content": { "type": "string", - "description": "This is the provider that will be used for the model. Any service, including your own server, that is compatible with the OpenAI API can be used.", - "enum": [ - "custom-llm" - ] + "nullable": true, + "maxLength": 100000000 }, - "metadataSendMode": { + "role": { "type": "string", - "description": "This determines whether metadata is sent in requests to the custom provider.\n\n- `off` will not send any metadata. payload will look like `{ messages }`\n- `variable` will send `assistant.metadata` as a variable on the payload. payload will look like `{ messages, metadata }`\n- `destructured` will send `assistant.metadata` fields directly on the payload. payload will look like `{ messages, ...metadata }`\n\nFurther, `variable` and `destructured` will send `call`, `phoneNumber`, and `customer` objects in the payload.\n\nDefault is `variable`.", "enum": [ - "off", - "variable", - "destructured" + "assistant", + "function", + "user", + "system", + "tool" ] - }, - "headers": { - "type": "object", - "description": "Custom headers to send with requests. These headers can override default OpenAI headers except for Authorization (which should be specified using a custom-llm credential).", - "additionalProperties": { - "type": "string" - }, - "example": { - "X-Custom-Header": "value" - } - }, - "url": { - "type": "string", - "description": "These is the URL we'll use for the OpenAI client's `baseURL`. Ex. https://openrouter.ai/api/v1" - }, - "wordLevelConfidenceEnabled": { - "type": "boolean", - "description": "This determines whether the transcriber's word level confidence is sent in requests to the custom provider. Default is false.\nThis only works for Deepgram transcribers." - }, - "timeoutSeconds": { - "type": "number", - "description": "This sets the timeout for the connection to the custom provider without needing to stream any tokens back. Default is 20 seconds.", - "minimum": 0, - "maximum": 300 - }, - "model": { - "type": "string", - "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b" - }, - "temperature": { - "type": "number", - "description": "This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.", - "minimum": 0, - "maximum": 2 - }, - "maxTokens": { - "type": "number", - "description": "This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", - "minimum": 50, - "maximum": 10000 - }, - "emotionRecognitionEnabled": { - "type": "boolean", - "description": "This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false" - }, - "numFastTurns": { - "type": "number", - "description": "This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", - "minimum": 0 } }, "required": [ - "provider", - "url", - "model" + "content", + "role" ] }, - "DeepInfraModel": { + "AnyscaleModel": { "type": "object", "properties": { "messages": { @@ -14988,7 +16211,7 @@ "provider": { "type": "string", "enum": [ - "deepinfra" + "anyscale" ] }, "model": { @@ -14997,7 +16220,7 @@ }, "temperature": { "type": "number", - "description": "This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.", + "description": "This is the temperature that will be used for calls. Default is 0.5.", "minimum": 0, "maximum": 2 }, @@ -15022,7 +16245,28 @@ "model" ] }, - "DeepSeekModel": { + "AnthropicThinkingConfig": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "enabled" + ] + }, + "budgetTokens": { + "type": "number", + "description": "The maximum number of tokens to allocate for thinking.\nMust be between 1024 and 100000 tokens.", + "minimum": 1024, + "maximum": 100000 + } + }, + "required": [ + "type", + "budgetTokens" + ] + }, + "AnthropicModel": { "type": "object", "properties": { "messages": { @@ -15150,21 +16394,42 @@ }, "model": { "type": "string", - "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b", + "description": "The specific Anthropic/Claude model that will be used.", "enum": [ - "deepseek-chat", - "deepseek-reasoner" + "claude-3-opus-20240229", + "claude-3-sonnet-20240229", + "claude-3-haiku-20240307", + "claude-3-5-sonnet-20240620", + "claude-3-5-sonnet-20241022", + "claude-3-5-haiku-20241022", + "claude-3-7-sonnet-20250219", + "claude-opus-4-20250514", + "claude-opus-4-5-20251101", + "claude-opus-4-6", + "claude-sonnet-4-20250514", + "claude-sonnet-4-5-20250929", + "claude-sonnet-4-6", + "claude-haiku-4-5-20251001" ] }, "provider": { "type": "string", + "description": "The provider identifier for Anthropic.", "enum": [ - "deep-seek" + "anthropic" + ] + }, + "thinking": { + "description": "Optional configuration for Anthropic's thinking feature.\nOnly applicable for claude-3-7-sonnet-20250219 model.\nIf provided, maxTokens must be greater than thinking.budgetTokens.", + "allOf": [ + { + "$ref": "#/components/schemas/AnthropicThinkingConfig" + } ] }, "temperature": { "type": "number", - "description": "This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.", + "description": "This is the temperature that will be used for calls. Default is 0.5.", "minimum": 0, "maximum": 2 }, @@ -15189,76 +16454,7 @@ "provider" ] }, - "GeminiMultimodalLivePrebuiltVoiceConfig": { - "type": "object", - "properties": { - "voiceName": { - "type": "string", - "enum": [ - "Puck", - "Charon", - "Kore", - "Fenrir", - "Aoede" - ] - } - }, - "required": [ - "voiceName" - ] - }, - "GeminiMultimodalLiveVoiceConfig": { - "type": "object", - "properties": { - "prebuiltVoiceConfig": { - "$ref": "#/components/schemas/GeminiMultimodalLivePrebuiltVoiceConfig" - } - }, - "required": [ - "prebuiltVoiceConfig" - ] - }, - "GeminiMultimodalLiveSpeechConfig": { - "type": "object", - "properties": { - "voiceConfig": { - "$ref": "#/components/schemas/GeminiMultimodalLiveVoiceConfig" - } - }, - "required": [ - "voiceConfig" - ] - }, - "GoogleRealtimeConfig": { - "type": "object", - "properties": { - "topP": { - "type": "number", - "description": "This is the nucleus sampling parameter that controls the cumulative probability of tokens considered during text generation.\nOnly applicable with the Gemini Flash 2.0 Multimodal Live API." - }, - "topK": { - "type": "number", - "description": "This is the top-k sampling parameter that limits the number of highest probability tokens considered during text generation.\nOnly applicable with the Gemini Flash 2.0 Multimodal Live API." - }, - "presencePenalty": { - "type": "number", - "description": "This is the presence penalty parameter that influences the model's likelihood to repeat information by penalizing tokens based on their presence in the text.\nOnly applicable with the Gemini Flash 2.0 Multimodal Live API." - }, - "frequencyPenalty": { - "type": "number", - "description": "This is the frequency penalty parameter that influences the model's likelihood to repeat tokens by penalizing them based on their frequency in the text.\nOnly applicable with the Gemini Flash 2.0 Multimodal Live API." - }, - "speechConfig": { - "description": "This is the speech configuration object that defines the voice settings to be used for the model's speech output.\nOnly applicable with the Gemini Flash 2.0 Multimodal Live API.", - "allOf": [ - { - "$ref": "#/components/schemas/GeminiMultimodalLiveSpeechConfig" - } - ] - } - } - }, - "GoogleModel": { + "AnthropicBedrockModel": { "type": "object", "properties": { "messages": { @@ -15384,44 +16580,45 @@ } ] }, - "model": { + "provider": { "type": "string", - "description": "This is the Google model that will be used.", + "description": "The provider identifier for Anthropic via AWS Bedrock.", "enum": [ - "gemini-3-flash-preview", - "gemini-2.5-pro", - "gemini-2.5-flash", - "gemini-2.5-flash-lite", - "gemini-2.0-flash-thinking-exp", - "gemini-2.0-pro-exp-02-05", - "gemini-2.0-flash", - "gemini-2.0-flash-lite", - "gemini-2.0-flash-exp", - "gemini-2.0-flash-realtime-exp", - "gemini-1.5-flash", - "gemini-1.5-flash-002", - "gemini-1.5-pro", - "gemini-1.5-pro-002", - "gemini-1.0-pro" + "anthropic-bedrock" ] }, - "provider": { + "model": { "type": "string", + "description": "The specific Anthropic/Claude model that will be used via Bedrock.", "enum": [ - "google" + "claude-3-opus-20240229", + "claude-3-sonnet-20240229", + "claude-3-haiku-20240307", + "claude-3-5-sonnet-20240620", + "claude-3-5-sonnet-20241022", + "claude-3-5-haiku-20241022", + "claude-3-7-sonnet-20250219", + "claude-opus-4-20250514", + "claude-opus-4-5-20251101", + "claude-opus-4-6", + "claude-sonnet-4-20250514", + "claude-sonnet-4-5-20250929", + "claude-sonnet-4-6", + "claude-haiku-4-5-20251001", + "global.anthropic.claude-haiku-4-5-20251001-v1:0" ] }, - "realtimeConfig": { - "description": "This is the session configuration for the Gemini Flash 2.0 Multimodal Live API.\nOnly applicable if the model `gemini-2.0-flash-realtime-exp` is selected.", + "thinking": { + "description": "Optional configuration for Anthropic's thinking feature.\nOnly applicable for claude-3-7-sonnet-20250219 model.\nIf provided, maxTokens must be greater than thinking.budgetTokens.", "allOf": [ { - "$ref": "#/components/schemas/GoogleRealtimeConfig" + "$ref": "#/components/schemas/AnthropicThinkingConfig" } ] }, "temperature": { "type": "number", - "description": "This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.", + "description": "This is the temperature that will be used for calls. Default is 0.5.", "minimum": 0, "maximum": 2 }, @@ -15442,11 +16639,11 @@ } }, "required": [ - "model", - "provider" + "provider", + "model" ] }, - "GroqModel": { + "CerebrasModel": { "type": "object", "properties": { "messages": { @@ -15576,32 +16773,19 @@ "type": "string", "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b", "enum": [ - "openai/gpt-oss-20b", - "openai/gpt-oss-120b", - "deepseek-r1-distill-llama-70b", - "llama-3.3-70b-versatile", - "llama-3.1-405b-reasoning", - "llama-3.1-8b-instant", - "llama3-8b-8192", - "llama3-70b-8192", - "gemma2-9b-it", - "moonshotai/kimi-k2-instruct-0905", - "meta-llama/llama-4-maverick-17b-128e-instruct", - "meta-llama/llama-4-scout-17b-16e-instruct", - "mistral-saba-24b", - "compound-beta", - "compound-beta-mini" + "llama3.1-8b", + "llama-3.3-70b" ] }, "provider": { "type": "string", "enum": [ - "groq" + "cerebras" ] }, "temperature": { "type": "number", - "description": "This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.", + "description": "This is the temperature that will be used for calls. Default is 0.5.", "minimum": 0, "maximum": 2 }, @@ -15626,7 +16810,7 @@ "provider" ] }, - "InflectionAIModel": { + "CustomLLMModel": { "type": "object", "properties": { "messages": { @@ -15752,22 +16936,53 @@ } ] }, - "model": { + "provider": { "type": "string", - "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b", + "description": "This is the provider that will be used for the model. Any service, including your own server, that is compatible with the OpenAI API can be used.", "enum": [ - "inflection_3_pi" + "custom-llm" ] }, - "provider": { + "metadataSendMode": { "type": "string", + "description": "This determines whether metadata is sent in requests to the custom provider.\n\n- `off` will not send any metadata. payload will look like `{ messages }`\n- `variable` will send `assistant.metadata` as a variable on the payload. payload will look like `{ messages, metadata }`\n- `destructured` will send `assistant.metadata` fields directly on the payload. payload will look like `{ messages, ...metadata }`\n\nFurther, `variable` and `destructured` will send `call`, `phoneNumber`, and `customer` objects in the payload.\n\nDefault is `variable`.", "enum": [ - "inflection-ai" + "off", + "variable", + "destructured" ] }, + "headers": { + "type": "object", + "description": "Custom headers to send with requests. These headers can override default OpenAI headers except for Authorization (which should be specified using a custom-llm credential).", + "additionalProperties": { + "type": "string" + }, + "example": { + "X-Custom-Header": "value" + } + }, + "url": { + "type": "string", + "description": "These is the URL we'll use for the OpenAI client's `baseURL`. Ex. https://openrouter.ai/api/v1" + }, + "wordLevelConfidenceEnabled": { + "type": "boolean", + "description": "This determines whether the transcriber's word level confidence is sent in requests to the custom provider. Default is false.\nThis only works for Deepgram transcribers." + }, + "timeoutSeconds": { + "type": "number", + "description": "This sets the timeout for the connection to the custom provider without needing to stream any tokens back. Default is 20 seconds.", + "minimum": 0, + "maximum": 300 + }, + "model": { + "type": "string", + "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b" + }, "temperature": { "type": "number", - "description": "This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.", + "description": "This is the temperature that will be used for calls. Default is 0.5.", "minimum": 0, "maximum": 2 }, @@ -15788,11 +17003,12 @@ } }, "required": [ - "model", - "provider" + "provider", + "url", + "model" ] }, - "MinimaxLLMModel": { + "DeepInfraModel": { "type": "object", "properties": { "messages": { @@ -15921,19 +17137,16 @@ "provider": { "type": "string", "enum": [ - "minimax" + "deepinfra" ] }, "model": { "type": "string", - "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b", - "enum": [ - "MiniMax-M2.7" - ] + "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b" }, "temperature": { "type": "number", - "description": "This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.", + "description": "This is the temperature that will be used for calls. Default is 0.5.", "minimum": 0, "maximum": 2 }, @@ -15958,7 +17171,7 @@ "model" ] }, - "OpenAIModel": { + "DeepSeekModel": { "type": "object", "properties": { "messages": { @@ -16084,292 +17297,23 @@ } ] }, - "provider": { - "type": "string", - "description": "This is the provider that will be used for the model.", - "enum": [ - "openai" - ] - }, "model": { "type": "string", - "description": "This is the OpenAI model that will be used.\n\nWhen using Vapi OpenAI or your own Azure Credentials, you have the option to specify the region for the selected model. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest region that make sense.\nThis is helpful when you are required to comply with Data Residency rules. Learn more about Azure regions here https://azure.microsoft.com/en-us/explore/global-infrastructure/data-residency/.\n\n@default undefined", - "enum": [ - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5.2", - "gpt-5.2-chat-latest", - "gpt-5.1", - "gpt-5.1-chat-latest", - "gpt-5", - "gpt-5-chat-latest", - "gpt-5-mini", - "gpt-5-nano", - "gpt-4.1-2025-04-14", - "gpt-4.1-mini-2025-04-14", - "gpt-4.1-nano-2025-04-14", - "gpt-4.1", - "gpt-4.1-mini", - "gpt-4.1-nano", - "chatgpt-4o-latest", - "o3", - "o3-mini", - "o4-mini", - "o1-mini", - "o1-mini-2024-09-12", - "gpt-4o-realtime-preview-2024-10-01", - "gpt-4o-realtime-preview-2024-12-17", - "gpt-4o-mini-realtime-preview-2024-12-17", - "gpt-realtime-2025-08-28", - "gpt-realtime-mini-2025-12-15", - "gpt-4o-mini-2024-07-18", - "gpt-4o-mini", - "gpt-4o", - "gpt-4o-2024-05-13", - "gpt-4o-2024-08-06", - "gpt-4o-2024-11-20", - "gpt-4-turbo", - "gpt-4-turbo-2024-04-09", - "gpt-4-turbo-preview", - "gpt-4-0125-preview", - "gpt-4-1106-preview", - "gpt-4", - "gpt-4-0613", - "gpt-3.5-turbo", - "gpt-3.5-turbo-0125", - "gpt-3.5-turbo-1106", - "gpt-3.5-turbo-16k", - "gpt-3.5-turbo-0613", - "gpt-4.1-2025-04-14:westus", - "gpt-4.1-2025-04-14:eastus2", - "gpt-4.1-2025-04-14:eastus", - "gpt-4.1-2025-04-14:westus3", - "gpt-4.1-2025-04-14:northcentralus", - "gpt-4.1-2025-04-14:southcentralus", - "gpt-4.1-2025-04-14:westeurope", - "gpt-4.1-2025-04-14:germanywestcentral", - "gpt-4.1-2025-04-14:polandcentral", - "gpt-4.1-2025-04-14:spaincentral", - "gpt-4.1-mini-2025-04-14:westus", - "gpt-4.1-mini-2025-04-14:eastus2", - "gpt-4.1-mini-2025-04-14:eastus", - "gpt-4.1-mini-2025-04-14:westus3", - "gpt-4.1-mini-2025-04-14:northcentralus", - "gpt-4.1-mini-2025-04-14:southcentralus", - "gpt-4.1-mini-2025-04-14:westeurope", - "gpt-4.1-mini-2025-04-14:germanywestcentral", - "gpt-4.1-mini-2025-04-14:polandcentral", - "gpt-4.1-mini-2025-04-14:spaincentral", - "gpt-4.1-nano-2025-04-14:westus", - "gpt-4.1-nano-2025-04-14:eastus2", - "gpt-4.1-nano-2025-04-14:westus3", - "gpt-4.1-nano-2025-04-14:northcentralus", - "gpt-4.1-nano-2025-04-14:southcentralus", - "gpt-4o-2024-11-20:swedencentral", - "gpt-4o-2024-11-20:westus", - "gpt-4o-2024-11-20:eastus2", - "gpt-4o-2024-11-20:eastus", - "gpt-4o-2024-11-20:westus3", - "gpt-4o-2024-11-20:southcentralus", - "gpt-4o-2024-11-20:westeurope", - "gpt-4o-2024-11-20:germanywestcentral", - "gpt-4o-2024-11-20:polandcentral", - "gpt-4o-2024-11-20:spaincentral", - "gpt-4o-2024-08-06:westus", - "gpt-4o-2024-08-06:westus3", - "gpt-4o-2024-08-06:eastus", - "gpt-4o-2024-08-06:eastus2", - "gpt-4o-2024-08-06:northcentralus", - "gpt-4o-2024-08-06:southcentralus", - "gpt-4o-mini-2024-07-18:westus", - "gpt-4o-mini-2024-07-18:westus3", - "gpt-4o-mini-2024-07-18:eastus", - "gpt-4o-mini-2024-07-18:eastus2", - "gpt-4o-mini-2024-07-18:northcentralus", - "gpt-4o-mini-2024-07-18:southcentralus", - "gpt-4o-2024-05-13:eastus2", - "gpt-4o-2024-05-13:eastus", - "gpt-4o-2024-05-13:northcentralus", - "gpt-4o-2024-05-13:southcentralus", - "gpt-4o-2024-05-13:westus3", - "gpt-4o-2024-05-13:westus", - "gpt-4-turbo-2024-04-09:eastus2", - "gpt-4-0125-preview:eastus", - "gpt-4-0125-preview:northcentralus", - "gpt-4-0125-preview:southcentralus", - "gpt-4-1106-preview:australiaeast", - "gpt-4-1106-preview:canadaeast", - "gpt-4-1106-preview:france", - "gpt-4-1106-preview:india", - "gpt-4-1106-preview:norway", - "gpt-4-1106-preview:swedencentral", - "gpt-4-1106-preview:uk", - "gpt-4-1106-preview:westus", - "gpt-4-1106-preview:westus3", - "gpt-4-0613:canadaeast", - "gpt-3.5-turbo-0125:canadaeast", - "gpt-3.5-turbo-0125:northcentralus", - "gpt-3.5-turbo-0125:southcentralus", - "gpt-3.5-turbo-1106:canadaeast", - "gpt-3.5-turbo-1106:westus" - ] - }, - "fallbackModels": { - "type": "array", - "description": "These are the fallback models that will be used if the primary model fails. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest fallbacks that make sense.", - "example": [ - "gpt-4-0125-preview", - "gpt-4-0613" - ], - "items": { - "type": "string", - "enum": [ - "gpt-5.4", - "gpt-5.4-mini", - "gpt-5.4-nano", - "gpt-5.2", - "gpt-5.2-chat-latest", - "gpt-5.1", - "gpt-5.1-chat-latest", - "gpt-5", - "gpt-5-chat-latest", - "gpt-5-mini", - "gpt-5-nano", - "gpt-4.1-2025-04-14", - "gpt-4.1-mini-2025-04-14", - "gpt-4.1-nano-2025-04-14", - "gpt-4.1", - "gpt-4.1-mini", - "gpt-4.1-nano", - "chatgpt-4o-latest", - "o3", - "o3-mini", - "o4-mini", - "o1-mini", - "o1-mini-2024-09-12", - "gpt-4o-realtime-preview-2024-10-01", - "gpt-4o-realtime-preview-2024-12-17", - "gpt-4o-mini-realtime-preview-2024-12-17", - "gpt-realtime-2025-08-28", - "gpt-realtime-mini-2025-12-15", - "gpt-4o-mini-2024-07-18", - "gpt-4o-mini", - "gpt-4o", - "gpt-4o-2024-05-13", - "gpt-4o-2024-08-06", - "gpt-4o-2024-11-20", - "gpt-4-turbo", - "gpt-4-turbo-2024-04-09", - "gpt-4-turbo-preview", - "gpt-4-0125-preview", - "gpt-4-1106-preview", - "gpt-4", - "gpt-4-0613", - "gpt-3.5-turbo", - "gpt-3.5-turbo-0125", - "gpt-3.5-turbo-1106", - "gpt-3.5-turbo-16k", - "gpt-3.5-turbo-0613", - "gpt-4.1-2025-04-14:westus", - "gpt-4.1-2025-04-14:eastus2", - "gpt-4.1-2025-04-14:eastus", - "gpt-4.1-2025-04-14:westus3", - "gpt-4.1-2025-04-14:northcentralus", - "gpt-4.1-2025-04-14:southcentralus", - "gpt-4.1-2025-04-14:westeurope", - "gpt-4.1-2025-04-14:germanywestcentral", - "gpt-4.1-2025-04-14:polandcentral", - "gpt-4.1-2025-04-14:spaincentral", - "gpt-4.1-mini-2025-04-14:westus", - "gpt-4.1-mini-2025-04-14:eastus2", - "gpt-4.1-mini-2025-04-14:eastus", - "gpt-4.1-mini-2025-04-14:westus3", - "gpt-4.1-mini-2025-04-14:northcentralus", - "gpt-4.1-mini-2025-04-14:southcentralus", - "gpt-4.1-mini-2025-04-14:westeurope", - "gpt-4.1-mini-2025-04-14:germanywestcentral", - "gpt-4.1-mini-2025-04-14:polandcentral", - "gpt-4.1-mini-2025-04-14:spaincentral", - "gpt-4.1-nano-2025-04-14:westus", - "gpt-4.1-nano-2025-04-14:eastus2", - "gpt-4.1-nano-2025-04-14:westus3", - "gpt-4.1-nano-2025-04-14:northcentralus", - "gpt-4.1-nano-2025-04-14:southcentralus", - "gpt-4o-2024-11-20:swedencentral", - "gpt-4o-2024-11-20:westus", - "gpt-4o-2024-11-20:eastus2", - "gpt-4o-2024-11-20:eastus", - "gpt-4o-2024-11-20:westus3", - "gpt-4o-2024-11-20:southcentralus", - "gpt-4o-2024-11-20:westeurope", - "gpt-4o-2024-11-20:germanywestcentral", - "gpt-4o-2024-11-20:polandcentral", - "gpt-4o-2024-11-20:spaincentral", - "gpt-4o-2024-08-06:westus", - "gpt-4o-2024-08-06:westus3", - "gpt-4o-2024-08-06:eastus", - "gpt-4o-2024-08-06:eastus2", - "gpt-4o-2024-08-06:northcentralus", - "gpt-4o-2024-08-06:southcentralus", - "gpt-4o-mini-2024-07-18:westus", - "gpt-4o-mini-2024-07-18:westus3", - "gpt-4o-mini-2024-07-18:eastus", - "gpt-4o-mini-2024-07-18:eastus2", - "gpt-4o-mini-2024-07-18:northcentralus", - "gpt-4o-mini-2024-07-18:southcentralus", - "gpt-4o-2024-05-13:eastus2", - "gpt-4o-2024-05-13:eastus", - "gpt-4o-2024-05-13:northcentralus", - "gpt-4o-2024-05-13:southcentralus", - "gpt-4o-2024-05-13:westus3", - "gpt-4o-2024-05-13:westus", - "gpt-4-turbo-2024-04-09:eastus2", - "gpt-4-0125-preview:eastus", - "gpt-4-0125-preview:northcentralus", - "gpt-4-0125-preview:southcentralus", - "gpt-4-1106-preview:australiaeast", - "gpt-4-1106-preview:canadaeast", - "gpt-4-1106-preview:france", - "gpt-4-1106-preview:india", - "gpt-4-1106-preview:norway", - "gpt-4-1106-preview:swedencentral", - "gpt-4-1106-preview:uk", - "gpt-4-1106-preview:westus", - "gpt-4-1106-preview:westus3", - "gpt-4-0613:canadaeast", - "gpt-3.5-turbo-0125:canadaeast", - "gpt-3.5-turbo-0125:northcentralus", - "gpt-3.5-turbo-0125:southcentralus", - "gpt-3.5-turbo-1106:canadaeast", - "gpt-3.5-turbo-1106:westus" - ] - } - }, - "toolStrictCompatibilityMode": { - "type": "string", - "description": "Azure OpenAI doesn't support `maxLength` right now https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/structured-outputs?tabs=python-secure%2Cdotnet-entra-id&pivots=programming-language-csharp#unsupported-type-specific-keywords. Need to strip.\n\n- `strip-parameters-with-unsupported-validation` will strip parameters with unsupported validation.\n- `strip-unsupported-validation` will keep the parameters but strip unsupported validation.\n\n@default `strip-unsupported-validation`", + "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b", "enum": [ - "strip-parameters-with-unsupported-validation", - "strip-unsupported-validation" + "deepseek-chat", + "deepseek-reasoner" ] }, - "promptCacheRetention": { + "provider": { "type": "string", - "description": "This controls the prompt cache retention policy for models that support extended caching (GPT-4.1, GPT-5 series).\n\n- `in_memory`: Default behavior, cache retained in GPU memory only\n- `24h`: Extended caching, keeps cached prefixes active for up to 24 hours by offloading to GPU-local storage\n\nOnly applies to models: gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, gpt-5.2, gpt-5.1, gpt-5.1-codex, gpt-5.1-codex-mini, gpt-5.1-chat-latest, gpt-5, gpt-5-codex, gpt-4.1\n\n@default undefined (uses API default which is 'in_memory')", "enum": [ - "in_memory", - "24h" + "deep-seek" ] }, - "promptCacheKey": { - "type": "string", - "description": "This is the prompt cache key for models that support extended caching (GPT-4.1, GPT-5 series).\n\nProviding a cache key allows you to share cached prefixes across requests.\n\n@default undefined", - "maxLength": 64 - }, "temperature": { "type": "number", - "description": "This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.", + "description": "This is the temperature that will be used for calls. Default is 0.5.", "minimum": 0, "maximum": 2 }, @@ -16390,11 +17334,80 @@ } }, "required": [ - "provider", - "model" + "model", + "provider" ] }, - "OpenRouterModel": { + "GeminiMultimodalLivePrebuiltVoiceConfig": { + "type": "object", + "properties": { + "voiceName": { + "type": "string", + "enum": [ + "Puck", + "Charon", + "Kore", + "Fenrir", + "Aoede" + ] + } + }, + "required": [ + "voiceName" + ] + }, + "GeminiMultimodalLiveVoiceConfig": { + "type": "object", + "properties": { + "prebuiltVoiceConfig": { + "$ref": "#/components/schemas/GeminiMultimodalLivePrebuiltVoiceConfig" + } + }, + "required": [ + "prebuiltVoiceConfig" + ] + }, + "GeminiMultimodalLiveSpeechConfig": { + "type": "object", + "properties": { + "voiceConfig": { + "$ref": "#/components/schemas/GeminiMultimodalLiveVoiceConfig" + } + }, + "required": [ + "voiceConfig" + ] + }, + "GoogleRealtimeConfig": { + "type": "object", + "properties": { + "topP": { + "type": "number", + "description": "This is the nucleus sampling parameter that controls the cumulative probability of tokens considered during text generation.\nOnly applicable with the Gemini Flash 2.0 Multimodal Live API." + }, + "topK": { + "type": "number", + "description": "This is the top-k sampling parameter that limits the number of highest probability tokens considered during text generation.\nOnly applicable with the Gemini Flash 2.0 Multimodal Live API." + }, + "presencePenalty": { + "type": "number", + "description": "This is the presence penalty parameter that influences the model's likelihood to repeat information by penalizing tokens based on their presence in the text.\nOnly applicable with the Gemini Flash 2.0 Multimodal Live API." + }, + "frequencyPenalty": { + "type": "number", + "description": "This is the frequency penalty parameter that influences the model's likelihood to repeat tokens by penalizing them based on their frequency in the text.\nOnly applicable with the Gemini Flash 2.0 Multimodal Live API." + }, + "speechConfig": { + "description": "This is the speech configuration object that defines the voice settings to be used for the model's speech output.\nOnly applicable with the Gemini Flash 2.0 Multimodal Live API.", + "allOf": [ + { + "$ref": "#/components/schemas/GeminiMultimodalLiveSpeechConfig" + } + ] + } + } + }, + "GoogleModel": { "type": "object", "properties": { "messages": { @@ -16520,19 +17533,46 @@ } ] }, - "provider": { + "model": { "type": "string", + "description": "This is the Google model that will be used.", "enum": [ - "openrouter" + "gemini-3.5-flash", + "gemini-3.1-flash-lite", + "gemini-3-flash-preview", + "gemini-2.5-pro", + "gemini-2.5-flash", + "gemini-2.5-flash-lite", + "gemini-2.0-flash-thinking-exp", + "gemini-2.0-pro-exp-02-05", + "gemini-2.0-flash", + "gemini-2.0-flash-lite", + "gemini-2.0-flash-exp", + "gemini-2.0-flash-realtime-exp", + "gemini-1.5-flash", + "gemini-1.5-flash-002", + "gemini-1.5-pro", + "gemini-1.5-pro-002", + "gemini-1.0-pro" ] }, - "model": { + "provider": { "type": "string", - "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b" + "enum": [ + "google" + ] + }, + "realtimeConfig": { + "description": "This is the session configuration for the Gemini Flash 2.0 Multimodal Live API.\nOnly applicable if the model `gemini-2.0-flash-realtime-exp` is selected.", + "allOf": [ + { + "$ref": "#/components/schemas/GoogleRealtimeConfig" + } + ] }, "temperature": { "type": "number", - "description": "This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.", + "description": "This is the temperature that will be used for calls. Default is 0.5.", "minimum": 0, "maximum": 2 }, @@ -16553,11 +17593,11 @@ } }, "required": [ - "provider", - "model" + "model", + "provider" ] }, - "PerplexityAIModel": { + "GroqModel": { "type": "object", "properties": { "messages": { @@ -16683,19 +17723,36 @@ } ] }, - "provider": { + "model": { "type": "string", + "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b", "enum": [ - "perplexity-ai" + "openai/gpt-oss-20b", + "openai/gpt-oss-120b", + "deepseek-r1-distill-llama-70b", + "llama-3.3-70b-versatile", + "llama-3.1-405b-reasoning", + "llama-3.1-8b-instant", + "llama3-8b-8192", + "llama3-70b-8192", + "gemma2-9b-it", + "moonshotai/kimi-k2-instruct-0905", + "meta-llama/llama-4-maverick-17b-128e-instruct", + "meta-llama/llama-4-scout-17b-16e-instruct", + "mistral-saba-24b", + "compound-beta", + "compound-beta-mini" ] }, - "model": { + "provider": { "type": "string", - "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b" + "enum": [ + "groq" + ] }, "temperature": { "type": "number", - "description": "This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.", + "description": "This is the temperature that will be used for calls. Default is 0.5.", "minimum": 0, "maximum": 2 }, @@ -16716,11 +17773,11 @@ } }, "required": [ - "provider", - "model" + "model", + "provider" ] }, - "TogetherAIModel": { + "InflectionAIModel": { "type": "object", "properties": { "messages": { @@ -16846,19 +17903,22 @@ } ] }, - "provider": { + "model": { "type": "string", + "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b", "enum": [ - "together-ai" + "inflection_3_pi" ] }, - "model": { + "provider": { "type": "string", - "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b" + "enum": [ + "inflection-ai" + ] }, "temperature": { "type": "number", - "description": "This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.", + "description": "This is the temperature that will be used for calls. Default is 0.5.", "minimum": 0, "maximum": 2 }, @@ -16879,51 +17939,312 @@ } }, "required": [ - "provider", - "model" + "model", + "provider" ] }, - "HangupNode": { + "MinimaxLLMModel": { "type": "object", "properties": { - "type": { + "messages": { + "description": "This is the starting state for the conversation.", + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIMessage" + } + }, + "tools": { + "type": "array", + "description": "These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.\n\nBoth `tools` and `toolIds` can be used together.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/CreateApiRequestToolDTO", + "title": "ApiRequestTool" + }, + { + "$ref": "#/components/schemas/CreateBashToolDTO", + "title": "BashTool" + }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, + { + "$ref": "#/components/schemas/CreateComputerToolDTO", + "title": "ComputerTool" + }, + { + "$ref": "#/components/schemas/CreateDtmfToolDTO", + "title": "DtmfTool" + }, + { + "$ref": "#/components/schemas/CreateEndCallToolDTO", + "title": "EndCallTool" + }, + { + "$ref": "#/components/schemas/CreateFunctionToolDTO", + "title": "FunctionTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelCalendarAvailabilityToolDTO", + "title": "GoHighLevelCalendarAvailabilityTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelCalendarEventCreateToolDTO", + "title": "GoHighLevelCalendarEventCreateTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelContactCreateToolDTO", + "title": "GoHighLevelContactCreateTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelContactGetToolDTO", + "title": "GoHighLevelContactGetTool" + }, + { + "$ref": "#/components/schemas/CreateGoogleCalendarCheckAvailabilityToolDTO", + "title": "GoogleCalendarCheckAvailabilityTool" + }, + { + "$ref": "#/components/schemas/CreateGoogleCalendarCreateEventToolDTO", + "title": "GoogleCalendarCreateEventTool" + }, + { + "$ref": "#/components/schemas/CreateGoogleSheetsRowAppendToolDTO", + "title": "GoogleSheetsRowAppendTool" + }, + { + "$ref": "#/components/schemas/CreateHandoffToolDTO", + "title": "HandoffTool" + }, + { + "$ref": "#/components/schemas/CreateMcpToolDTO", + "title": "McpTool" + }, + { + "$ref": "#/components/schemas/CreateQueryToolDTO", + "title": "QueryTool" + }, + { + "$ref": "#/components/schemas/CreateSlackSendMessageToolDTO", + "title": "SlackSendMessageTool" + }, + { + "$ref": "#/components/schemas/CreateSmsToolDTO", + "title": "SmsTool" + }, + { + "$ref": "#/components/schemas/CreateTextEditorToolDTO", + "title": "TextEditorTool" + }, + { + "$ref": "#/components/schemas/CreateTransferCallToolDTO", + "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" + } + ] + } + }, + "toolIds": { + "description": "These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + "type": "array", + "items": { + "type": "string" + } + }, + "knowledgeBase": { + "description": "These are the options for the knowledge base.", + "oneOf": [ + { + "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", + "title": "Custom" + } + ] + }, + "provider": { "type": "string", "enum": [ - "hangup" + "minimax" ] }, - "name": { + "model": { "type": "string", - "maxLength": 80 + "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b", + "enum": [ + "MiniMax-M2.7" + ] }, - "isStart": { + "temperature": { + "type": "number", + "description": "This is the temperature that will be used for calls. Default is 0.5.", + "minimum": 0, + "maximum": 2 + }, + "maxTokens": { + "type": "number", + "description": "This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", + "minimum": 50, + "maximum": 10000 + }, + "emotionRecognitionEnabled": { "type": "boolean", - "description": "This is whether or not the node is the start of the workflow." + "description": "This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false" }, - "metadata": { - "type": "object", - "description": "This is for metadata you want to store on the task." + "numFastTurns": { + "type": "number", + "description": "This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + "minimum": 0 } }, "required": [ - "type", - "name" + "provider", + "model" ] }, - "WorkflowOpenAIModel": { + "OpenAIModel": { "type": "object", "properties": { + "messages": { + "description": "This is the starting state for the conversation.", + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIMessage" + } + }, + "tools": { + "type": "array", + "description": "These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.\n\nBoth `tools` and `toolIds` can be used together.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/CreateApiRequestToolDTO", + "title": "ApiRequestTool" + }, + { + "$ref": "#/components/schemas/CreateBashToolDTO", + "title": "BashTool" + }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, + { + "$ref": "#/components/schemas/CreateComputerToolDTO", + "title": "ComputerTool" + }, + { + "$ref": "#/components/schemas/CreateDtmfToolDTO", + "title": "DtmfTool" + }, + { + "$ref": "#/components/schemas/CreateEndCallToolDTO", + "title": "EndCallTool" + }, + { + "$ref": "#/components/schemas/CreateFunctionToolDTO", + "title": "FunctionTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelCalendarAvailabilityToolDTO", + "title": "GoHighLevelCalendarAvailabilityTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelCalendarEventCreateToolDTO", + "title": "GoHighLevelCalendarEventCreateTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelContactCreateToolDTO", + "title": "GoHighLevelContactCreateTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelContactGetToolDTO", + "title": "GoHighLevelContactGetTool" + }, + { + "$ref": "#/components/schemas/CreateGoogleCalendarCheckAvailabilityToolDTO", + "title": "GoogleCalendarCheckAvailabilityTool" + }, + { + "$ref": "#/components/schemas/CreateGoogleCalendarCreateEventToolDTO", + "title": "GoogleCalendarCreateEventTool" + }, + { + "$ref": "#/components/schemas/CreateGoogleSheetsRowAppendToolDTO", + "title": "GoogleSheetsRowAppendTool" + }, + { + "$ref": "#/components/schemas/CreateHandoffToolDTO", + "title": "HandoffTool" + }, + { + "$ref": "#/components/schemas/CreateMcpToolDTO", + "title": "McpTool" + }, + { + "$ref": "#/components/schemas/CreateQueryToolDTO", + "title": "QueryTool" + }, + { + "$ref": "#/components/schemas/CreateSlackSendMessageToolDTO", + "title": "SlackSendMessageTool" + }, + { + "$ref": "#/components/schemas/CreateSmsToolDTO", + "title": "SmsTool" + }, + { + "$ref": "#/components/schemas/CreateTextEditorToolDTO", + "title": "TextEditorTool" + }, + { + "$ref": "#/components/schemas/CreateTransferCallToolDTO", + "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" + } + ] + } + }, + "toolIds": { + "description": "These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + "type": "array", + "items": { + "type": "string" + } + }, + "knowledgeBase": { + "description": "These are the options for the knowledge base.", + "oneOf": [ + { + "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", + "title": "Custom" + } + ] + }, "provider": { "type": "string", - "description": "This is the provider of the model (`openai`).", + "description": "This is the provider that will be used for the model.", "enum": [ "openai" ] }, "model": { "type": "string", - "description": "This is the OpenAI model that will be used.\n\nWhen using Vapi OpenAI or your own Azure Credentials, you have the option to specify the region for the selected model. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest region that make sense.\nThis is helpful when you are required to comply with Data Residency rules. Learn more about Azure regions here https://azure.microsoft.com/en-us/explore/global-infrastructure/data-residency/.", - "maxLength": 100, + "description": "This is the OpenAI model that will be used.\n\nWhen using Vapi OpenAI or your own Azure Credentials, you have the option to specify the region for the selected model. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest region that make sense.\nThis is helpful when you are required to comply with Data Residency rules. Learn more about Azure regions here https://azure.microsoft.com/en-us/explore/global-infrastructure/data-residency/.\n\n@default undefined", "enum": [ "gpt-5.4", "gpt-5.4-mini", @@ -16948,6 +18269,12 @@ "o4-mini", "o1-mini", "o1-mini-2024-09-12", + "gpt-4o-realtime-preview-2024-10-01", + "gpt-4o-realtime-preview-2024-12-17", + "gpt-4o-mini-realtime-preview-2024-12-17", + "gpt-realtime-2025-08-28", + "gpt-realtime-mini-2025-12-15", + "gpt-realtime-2", "gpt-4o-mini-2024-07-18", "gpt-4o-mini", "gpt-4o", @@ -17037,20 +18364,198 @@ "gpt-3.5-turbo-0125:northcentralus", "gpt-3.5-turbo-0125:southcentralus", "gpt-3.5-turbo-1106:canadaeast", - "gpt-3.5-turbo-1106:westus" + "gpt-3.5-turbo-1106:westus", + "gpt-4.1:australiaeast", + "gpt-4o:australiaeast", + "gpt-5.4-mini:australiaeast" + ] + }, + "fallbackModels": { + "type": "array", + "description": "These are the fallback models that will be used if the primary model fails. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest fallbacks that make sense.", + "example": [ + "gpt-4-0125-preview", + "gpt-4-0613" + ], + "items": { + "type": "string", + "enum": [ + "gpt-5.4", + "gpt-5.4-mini", + "gpt-5.4-nano", + "gpt-5.2", + "gpt-5.2-chat-latest", + "gpt-5.1", + "gpt-5.1-chat-latest", + "gpt-5", + "gpt-5-chat-latest", + "gpt-5-mini", + "gpt-5-nano", + "gpt-4.1-2025-04-14", + "gpt-4.1-mini-2025-04-14", + "gpt-4.1-nano-2025-04-14", + "gpt-4.1", + "gpt-4.1-mini", + "gpt-4.1-nano", + "chatgpt-4o-latest", + "o3", + "o3-mini", + "o4-mini", + "o1-mini", + "o1-mini-2024-09-12", + "gpt-4o-realtime-preview-2024-10-01", + "gpt-4o-realtime-preview-2024-12-17", + "gpt-4o-mini-realtime-preview-2024-12-17", + "gpt-realtime-2025-08-28", + "gpt-realtime-mini-2025-12-15", + "gpt-realtime-2", + "gpt-4o-mini-2024-07-18", + "gpt-4o-mini", + "gpt-4o", + "gpt-4o-2024-05-13", + "gpt-4o-2024-08-06", + "gpt-4o-2024-11-20", + "gpt-4-turbo", + "gpt-4-turbo-2024-04-09", + "gpt-4-turbo-preview", + "gpt-4-0125-preview", + "gpt-4-1106-preview", + "gpt-4", + "gpt-4-0613", + "gpt-3.5-turbo", + "gpt-3.5-turbo-0125", + "gpt-3.5-turbo-1106", + "gpt-3.5-turbo-16k", + "gpt-3.5-turbo-0613", + "gpt-4.1-2025-04-14:westus", + "gpt-4.1-2025-04-14:eastus2", + "gpt-4.1-2025-04-14:eastus", + "gpt-4.1-2025-04-14:westus3", + "gpt-4.1-2025-04-14:northcentralus", + "gpt-4.1-2025-04-14:southcentralus", + "gpt-4.1-2025-04-14:westeurope", + "gpt-4.1-2025-04-14:germanywestcentral", + "gpt-4.1-2025-04-14:polandcentral", + "gpt-4.1-2025-04-14:spaincentral", + "gpt-4.1-mini-2025-04-14:westus", + "gpt-4.1-mini-2025-04-14:eastus2", + "gpt-4.1-mini-2025-04-14:eastus", + "gpt-4.1-mini-2025-04-14:westus3", + "gpt-4.1-mini-2025-04-14:northcentralus", + "gpt-4.1-mini-2025-04-14:southcentralus", + "gpt-4.1-mini-2025-04-14:westeurope", + "gpt-4.1-mini-2025-04-14:germanywestcentral", + "gpt-4.1-mini-2025-04-14:polandcentral", + "gpt-4.1-mini-2025-04-14:spaincentral", + "gpt-4.1-nano-2025-04-14:westus", + "gpt-4.1-nano-2025-04-14:eastus2", + "gpt-4.1-nano-2025-04-14:westus3", + "gpt-4.1-nano-2025-04-14:northcentralus", + "gpt-4.1-nano-2025-04-14:southcentralus", + "gpt-4o-2024-11-20:swedencentral", + "gpt-4o-2024-11-20:westus", + "gpt-4o-2024-11-20:eastus2", + "gpt-4o-2024-11-20:eastus", + "gpt-4o-2024-11-20:westus3", + "gpt-4o-2024-11-20:southcentralus", + "gpt-4o-2024-11-20:westeurope", + "gpt-4o-2024-11-20:germanywestcentral", + "gpt-4o-2024-11-20:polandcentral", + "gpt-4o-2024-11-20:spaincentral", + "gpt-4o-2024-08-06:westus", + "gpt-4o-2024-08-06:westus3", + "gpt-4o-2024-08-06:eastus", + "gpt-4o-2024-08-06:eastus2", + "gpt-4o-2024-08-06:northcentralus", + "gpt-4o-2024-08-06:southcentralus", + "gpt-4o-mini-2024-07-18:westus", + "gpt-4o-mini-2024-07-18:westus3", + "gpt-4o-mini-2024-07-18:eastus", + "gpt-4o-mini-2024-07-18:eastus2", + "gpt-4o-mini-2024-07-18:northcentralus", + "gpt-4o-mini-2024-07-18:southcentralus", + "gpt-4o-2024-05-13:eastus2", + "gpt-4o-2024-05-13:eastus", + "gpt-4o-2024-05-13:northcentralus", + "gpt-4o-2024-05-13:southcentralus", + "gpt-4o-2024-05-13:westus3", + "gpt-4o-2024-05-13:westus", + "gpt-4-turbo-2024-04-09:eastus2", + "gpt-4-0125-preview:eastus", + "gpt-4-0125-preview:northcentralus", + "gpt-4-0125-preview:southcentralus", + "gpt-4-1106-preview:australiaeast", + "gpt-4-1106-preview:canadaeast", + "gpt-4-1106-preview:france", + "gpt-4-1106-preview:india", + "gpt-4-1106-preview:norway", + "gpt-4-1106-preview:swedencentral", + "gpt-4-1106-preview:uk", + "gpt-4-1106-preview:westus", + "gpt-4-1106-preview:westus3", + "gpt-4-0613:canadaeast", + "gpt-3.5-turbo-0125:canadaeast", + "gpt-3.5-turbo-0125:northcentralus", + "gpt-3.5-turbo-0125:southcentralus", + "gpt-3.5-turbo-1106:canadaeast", + "gpt-3.5-turbo-1106:westus", + "gpt-4.1:australiaeast", + "gpt-4o:australiaeast", + "gpt-5.4-mini:australiaeast" + ] + } + }, + "toolStrictCompatibilityMode": { + "type": "string", + "description": "Azure OpenAI doesn't support `maxLength` right now https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/structured-outputs?tabs=python-secure%2Cdotnet-entra-id&pivots=programming-language-csharp#unsupported-type-specific-keywords. Need to strip.\n\n- `strip-parameters-with-unsupported-validation` will strip parameters with unsupported validation.\n- `strip-unsupported-validation` will keep the parameters but strip unsupported validation.\n\n@default `strip-unsupported-validation`", + "enum": [ + "strip-parameters-with-unsupported-validation", + "strip-unsupported-validation" + ] + }, + "promptCacheRetention": { + "type": "string", + "description": "This controls the prompt cache retention policy for models that support extended caching (GPT-4.1, GPT-5 series).\n\n- `in_memory`: Default behavior, cache retained in GPU memory only\n- `24h`: Extended caching, keeps cached prefixes active for up to 24 hours by offloading to GPU-local storage\n\nOnly applies to models: gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, gpt-5.2, gpt-5.1, gpt-5.1-codex, gpt-5.1-codex-mini, gpt-5.1-chat-latest, gpt-5, gpt-5-codex, gpt-4.1\n\n@default undefined (uses API default which is 'in_memory')", + "enum": [ + "in_memory", + "24h" + ] + }, + "promptCacheKey": { + "type": "string", + "description": "This is the prompt cache key for models that support extended caching (GPT-4.1, GPT-5 series).\n\nProviding a cache key allows you to share cached prefixes across requests.\n\n@default undefined", + "maxLength": 64 + }, + "reasoningEffort": { + "type": "string", + "description": "Reasoning effort for reasoning-capable OpenAI models.\nFor `gpt-realtime-2`: forwarded to V2 stream's session.update as `reasoning.effort`.\nFor non-realtime OpenAI models: routed through `modelSpecificOverridesGet` (openAIUtil.ts:622-726).\nNarrower than CompletionRequestParams.reasoningEffort intentionally: 'none' is an internal-only override value set by modelSpecificOverridesGet for GPT-5 family, not user-settable via DTO.", + "enum": [ + "minimal", + "low", + "medium", + "high" ] }, "temperature": { "type": "number", - "description": "This is the temperature of the model.", + "description": "This is the temperature that will be used for calls. Default is 0.5.", "minimum": 0, "maximum": 2 }, "maxTokens": { "type": "number", - "description": "This is the max tokens of the model.", + "description": "This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", "minimum": 50, "maximum": 10000 + }, + "emotionRecognitionEnabled": { + "type": "boolean", + "description": "This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false" + }, + "numFastTurns": { + "type": "number", + "description": "This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + "minimum": 0 } }, "required": [ @@ -17058,411 +18563,182 @@ "model" ] }, - "WorkflowAnthropicModel": { + "OpenRouterModel": { "type": "object", "properties": { - "provider": { - "type": "string", - "description": "This is the provider of the model (`anthropic`).", - "enum": [ - "anthropic" - ] - }, - "model": { - "type": "string", - "description": "This is the specific model that will be used.", - "maxLength": 100, - "enum": [ - "claude-3-opus-20240229", - "claude-3-sonnet-20240229", - "claude-3-haiku-20240307", - "claude-3-5-sonnet-20240620", - "claude-3-5-sonnet-20241022", - "claude-3-5-haiku-20241022", - "claude-3-7-sonnet-20250219", - "claude-opus-4-20250514", - "claude-opus-4-5-20251101", - "claude-opus-4-6", - "claude-sonnet-4-20250514", - "claude-sonnet-4-5-20250929", - "claude-sonnet-4-6", - "claude-haiku-4-5-20251001" - ] - }, - "thinking": { - "description": "This is the optional configuration for Anthropic's thinking feature.\n\n- If provided, `maxTokens` must be greater than `thinking.budgetTokens`.", - "allOf": [ - { - "$ref": "#/components/schemas/AnthropicThinkingConfig" - } - ] - }, - "temperature": { - "type": "number", - "description": "This is the temperature of the model.", - "minimum": 0, - "maximum": 2 + "messages": { + "description": "This is the starting state for the conversation.", + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIMessage" + } }, - "maxTokens": { - "type": "number", - "description": "This is the max tokens of the model.", - "minimum": 50, - "maximum": 10000 - } - }, - "required": [ - "provider", - "model" - ] - }, - "WorkflowAnthropicBedrockModel": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "description": "This is the provider of the model (`anthropic-bedrock`).", - "enum": [ - "anthropic-bedrock" - ] + "tools": { + "type": "array", + "description": "These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.\n\nBoth `tools` and `toolIds` can be used together.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/CreateApiRequestToolDTO", + "title": "ApiRequestTool" + }, + { + "$ref": "#/components/schemas/CreateBashToolDTO", + "title": "BashTool" + }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, + { + "$ref": "#/components/schemas/CreateComputerToolDTO", + "title": "ComputerTool" + }, + { + "$ref": "#/components/schemas/CreateDtmfToolDTO", + "title": "DtmfTool" + }, + { + "$ref": "#/components/schemas/CreateEndCallToolDTO", + "title": "EndCallTool" + }, + { + "$ref": "#/components/schemas/CreateFunctionToolDTO", + "title": "FunctionTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelCalendarAvailabilityToolDTO", + "title": "GoHighLevelCalendarAvailabilityTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelCalendarEventCreateToolDTO", + "title": "GoHighLevelCalendarEventCreateTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelContactCreateToolDTO", + "title": "GoHighLevelContactCreateTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelContactGetToolDTO", + "title": "GoHighLevelContactGetTool" + }, + { + "$ref": "#/components/schemas/CreateGoogleCalendarCheckAvailabilityToolDTO", + "title": "GoogleCalendarCheckAvailabilityTool" + }, + { + "$ref": "#/components/schemas/CreateGoogleCalendarCreateEventToolDTO", + "title": "GoogleCalendarCreateEventTool" + }, + { + "$ref": "#/components/schemas/CreateGoogleSheetsRowAppendToolDTO", + "title": "GoogleSheetsRowAppendTool" + }, + { + "$ref": "#/components/schemas/CreateHandoffToolDTO", + "title": "HandoffTool" + }, + { + "$ref": "#/components/schemas/CreateMcpToolDTO", + "title": "McpTool" + }, + { + "$ref": "#/components/schemas/CreateQueryToolDTO", + "title": "QueryTool" + }, + { + "$ref": "#/components/schemas/CreateSlackSendMessageToolDTO", + "title": "SlackSendMessageTool" + }, + { + "$ref": "#/components/schemas/CreateSmsToolDTO", + "title": "SmsTool" + }, + { + "$ref": "#/components/schemas/CreateTextEditorToolDTO", + "title": "TextEditorTool" + }, + { + "$ref": "#/components/schemas/CreateTransferCallToolDTO", + "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" + } + ] + } }, - "model": { - "type": "string", - "description": "This is the specific model that will be used.", - "maxLength": 100, - "enum": [ - "claude-3-opus-20240229", - "claude-3-sonnet-20240229", - "claude-3-haiku-20240307", - "claude-3-5-sonnet-20240620", - "claude-3-5-sonnet-20241022", - "claude-3-5-haiku-20241022", - "claude-3-7-sonnet-20250219", - "claude-opus-4-20250514", - "claude-opus-4-5-20251101", - "claude-opus-4-6", - "claude-sonnet-4-20250514", - "claude-sonnet-4-5-20250929", - "claude-sonnet-4-6", - "claude-haiku-4-5-20251001" - ] + "toolIds": { + "description": "These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + "type": "array", + "items": { + "type": "string" + } }, - "thinking": { - "description": "This is the optional configuration for Anthropic's thinking feature.\n\n- If provided, `maxTokens` must be greater than `thinking.budgetTokens`.", - "allOf": [ + "knowledgeBase": { + "description": "These are the options for the knowledge base.", + "oneOf": [ { - "$ref": "#/components/schemas/AnthropicThinkingConfig" + "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", + "title": "Custom" } ] }, - "temperature": { - "type": "number", - "description": "This is the temperature of the model.", - "minimum": 0, - "maximum": 2 - }, - "maxTokens": { - "type": "number", - "description": "This is the max tokens of the model.", - "minimum": 50, - "maximum": 10000 - } - }, - "required": [ - "provider", - "model" - ] - }, - "WorkflowGoogleModel": { - "type": "object", - "properties": { "provider": { "type": "string", - "description": "This is the provider of the model (`google`).", "enum": [ - "google" + "openrouter" ] }, "model": { "type": "string", - "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b", - "maxLength": 100, - "enum": [ - "gemini-3-flash-preview", - "gemini-2.5-pro", - "gemini-2.5-flash", - "gemini-2.5-flash-lite", - "gemini-2.0-flash-thinking-exp", - "gemini-2.0-pro-exp-02-05", - "gemini-2.0-flash", - "gemini-2.0-flash-lite", - "gemini-2.0-flash-exp", - "gemini-2.0-flash-realtime-exp", - "gemini-1.5-flash", - "gemini-1.5-flash-002", - "gemini-1.5-pro", - "gemini-1.5-pro-002", - "gemini-1.0-pro" - ] + "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b" }, "temperature": { "type": "number", - "description": "This is the temperature of the model.", + "description": "This is the temperature that will be used for calls. Default is 0.5.", "minimum": 0, "maximum": 2 }, "maxTokens": { "type": "number", - "description": "This is the max tokens of the model.", + "description": "This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", "minimum": 50, "maximum": 10000 - } - }, - "required": [ - "provider", - "model" - ] - }, - "WorkflowCustomModel": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "description": "This is the provider of the model (`custom-llm`).", - "enum": [ - "custom-llm" - ] - }, - "metadataSendMode": { - "type": "string", - "description": "This determines whether metadata is sent in requests to the custom provider.\n\n- `off` will not send any metadata. payload will look like `{ messages }`\n- `variable` will send `assistant.metadata` as a variable on the payload. payload will look like `{ messages, metadata }`\n- `destructured` will send `assistant.metadata` fields directly on the payload. payload will look like `{ messages, ...metadata }`\n\nFurther, `variable` and `destructured` will send `call`, `phoneNumber`, and `customer` objects in the payload.\n\nDefault is `variable`.", - "enum": [ - "off", - "variable", - "destructured" - ] - }, - "url": { - "type": "string", - "description": "These is the URL we'll use for the OpenAI client's `baseURL`. Ex. https://openrouter.ai/api/v1" - }, - "headers": { - "type": "object", - "description": "These are the headers we'll use for the OpenAI client's `headers`." - }, - "timeoutSeconds": { - "type": "number", - "description": "This sets the timeout for the connection to the custom provider without needing to stream any tokens back. Default is 20 seconds.", - "minimum": 20, - "maximum": 600 }, - "model": { - "type": "string", - "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b", - "maxLength": 100 - }, - "temperature": { - "type": "number", - "description": "This is the temperature of the model.", - "minimum": 0, - "maximum": 2 + "emotionRecognitionEnabled": { + "type": "boolean", + "description": "This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false" }, - "maxTokens": { + "numFastTurns": { "type": "number", - "description": "This is the max tokens of the model.", - "minimum": 50, - "maximum": 10000 + "description": "This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + "minimum": 0 } }, "required": [ "provider", - "url", "model" ] }, - "GlobalNodePlan": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "This is the flag to determine if this node is a global node\n\n@default false", - "default": false - }, - "enterCondition": { - "type": "string", - "description": "This is the condition that will be checked to determine if the global node should be executed.\n\n@default ''", - "maxLength": 1000, - "default": "" - } - } - }, - "ConversationNode": { + "PerplexityAIModel": { "type": "object", "properties": { - "type": { - "type": "string", - "description": "This is the Conversation node. This can be used to start a conversation with the customer.\n\nThe flow is:\n- Workflow starts the conversation node\n- Model is active with the `prompt` and global context.\n- Model will call a tool to exit this node.\n- Workflow will extract variables from the conversation.\n- Workflow continues.", - "enum": [ - "conversation" - ] - }, - "model": { - "description": "This is the model for the node.\n\nThis overrides `workflow.model`.", - "oneOf": [ - { - "$ref": "#/components/schemas/WorkflowOpenAIModel", - "title": "WorkflowOpenAIModel" - }, - { - "$ref": "#/components/schemas/WorkflowAnthropicModel", - "title": "WorkflowAnthropicModel" - }, - { - "$ref": "#/components/schemas/WorkflowAnthropicBedrockModel", - "title": "WorkflowAnthropicBedrockModel" - }, - { - "$ref": "#/components/schemas/WorkflowGoogleModel", - "title": "WorkflowGoogleModel" - }, - { - "$ref": "#/components/schemas/WorkflowCustomModel", - "title": "WorkflowCustomModel" - } - ] - }, - "transcriber": { - "description": "This is the transcriber for the node.\n\nThis overrides `workflow.transcriber`.", - "oneOf": [ - { - "$ref": "#/components/schemas/AssemblyAITranscriber", - "title": "AssemblyAITranscriber" - }, - { - "$ref": "#/components/schemas/AzureSpeechTranscriber", - "title": "AzureSpeechTranscriber" - }, - { - "$ref": "#/components/schemas/CustomTranscriber", - "title": "CustomTranscriber" - }, - { - "$ref": "#/components/schemas/DeepgramTranscriber", - "title": "DeepgramTranscriber" - }, - { - "$ref": "#/components/schemas/ElevenLabsTranscriber", - "title": "ElevenLabsTranscriber" - }, - { - "$ref": "#/components/schemas/GladiaTranscriber", - "title": "GladiaTranscriber" - }, - { - "$ref": "#/components/schemas/GoogleTranscriber", - "title": "GoogleTranscriber" - }, - { - "$ref": "#/components/schemas/SpeechmaticsTranscriber", - "title": "SpeechmaticsTranscriber" - }, - { - "$ref": "#/components/schemas/TalkscriberTranscriber", - "title": "TalkscriberTranscriber" - }, - { - "$ref": "#/components/schemas/OpenAITranscriber", - "title": "OpenAITranscriber" - }, - { - "$ref": "#/components/schemas/CartesiaTranscriber", - "title": "CartesiaTranscriber" - }, - { - "$ref": "#/components/schemas/SonioxTranscriber", - "title": "SonioxTranscriber" - } - ] - }, - "voice": { - "description": "This is the voice for the node.\n\nThis overrides `workflow.voice`.", - "oneOf": [ - { - "$ref": "#/components/schemas/AzureVoice", - "title": "AzureVoice" - }, - { - "$ref": "#/components/schemas/CartesiaVoice", - "title": "CartesiaVoice" - }, - { - "$ref": "#/components/schemas/CustomVoice", - "title": "CustomVoice" - }, - { - "$ref": "#/components/schemas/DeepgramVoice", - "title": "DeepgramVoice" - }, - { - "$ref": "#/components/schemas/ElevenLabsVoice", - "title": "ElevenLabsVoice" - }, - { - "$ref": "#/components/schemas/HumeVoice", - "title": "HumeVoice" - }, - { - "$ref": "#/components/schemas/LMNTVoice", - "title": "LMNTVoice" - }, - { - "$ref": "#/components/schemas/NeuphonicVoice", - "title": "NeuphonicVoice" - }, - { - "$ref": "#/components/schemas/OpenAIVoice", - "title": "OpenAIVoice" - }, - { - "$ref": "#/components/schemas/PlayHTVoice", - "title": "PlayHTVoice" - }, - { - "$ref": "#/components/schemas/WellSaidVoice", - "title": "WellSaidVoice" - }, - { - "$ref": "#/components/schemas/RimeAIVoice", - "title": "RimeAIVoice" - }, - { - "$ref": "#/components/schemas/SmallestAIVoice", - "title": "SmallestAIVoice" - }, - { - "$ref": "#/components/schemas/TavusVoice", - "title": "TavusVoice" - }, - { - "$ref": "#/components/schemas/VapiVoice", - "title": "VapiVoice" - }, - { - "$ref": "#/components/schemas/SesameVoice", - "title": "SesameVoice" - }, - { - "$ref": "#/components/schemas/InworldVoice", - "title": "InworldVoice" - }, - { - "$ref": "#/components/schemas/MinimaxVoice", - "title": "MinimaxVoice" - } - ] + "messages": { + "description": "This is the starting state for the conversation.", + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIMessage" + } }, "tools": { "type": "array", - "description": "These are the tools that the conversation node can use during the call. To use existing tools, use `toolIds`.\n\nBoth `tools` and `toolIds` can be used together.", + "description": "These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.\n\nBoth `tools` and `toolIds` can be used together.", "items": { "oneOf": [ { @@ -17561,749 +18837,971 @@ } }, "toolIds": { - "description": "These are the tools that the conversation node can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + "description": "These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", "type": "array", "items": { "type": "string" } }, - "prompt": { - "type": "string", - "maxLength": 5000 - }, - "globalNodePlan": { - "description": "This is the plan for the global node.", - "allOf": [ + "knowledgeBase": { + "description": "These are the options for the knowledge base.", + "oneOf": [ { - "$ref": "#/components/schemas/GlobalNodePlan" + "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", + "title": "Custom" } ] }, - "variableExtractionPlan": { - "description": "This is the plan that controls the variable extraction from the user's responses.\n\nUsage:\nUse `schema` to specify what you want to extract from the user's responses.\n```json\n{\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"user\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"number\"\n }\n }\n }\n }\n }\n}\n```\n\nThis will be extracted as `{{ user.name }}` and `{{ user.age }}` respectively.\n\n(Optional) Use `aliases` to create new variables.\n\n```json\n{\n \"aliases\": [\n {\n \"key\": \"userAge\",\n \"value\": \"{{user.age}}\"\n },\n {\n \"key\": \"userName\",\n \"value\": \"{{user.name}}\"\n }\n ]\n}\n```\n\nThis will be extracted as `{{ userAge }}` and `{{ userName }}` respectively.\n\nNote: The `schema` field is required for Conversation nodes if you want to extract variables from the user's responses. `aliases` is just a convenience.", - "allOf": [ - { - "$ref": "#/components/schemas/VariableExtractionPlan" - } + "provider": { + "type": "string", + "enum": [ + "perplexity-ai" ] }, - "name": { + "model": { "type": "string", - "maxLength": 80 + "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b" }, - "isStart": { + "temperature": { + "type": "number", + "description": "This is the temperature that will be used for calls. Default is 0.5.", + "minimum": 0, + "maximum": 2 + }, + "maxTokens": { + "type": "number", + "description": "This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", + "minimum": 50, + "maximum": 10000 + }, + "emotionRecognitionEnabled": { "type": "boolean", - "description": "This is whether or not the node is the start of the workflow." + "description": "This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false" }, - "metadata": { - "type": "object", - "description": "This is for metadata you want to store on the task." + "numFastTurns": { + "type": "number", + "description": "This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + "minimum": 0 } }, "required": [ - "type", - "name" + "provider", + "model" ] }, - "ToolNode": { + "TogetherAIModel": { "type": "object", "properties": { - "type": { - "type": "string", - "description": "This is the Tool node. This can be used to call a tool in your workflow.\n\nThe flow is:\n- Workflow starts the tool node\n- Model is called to extract parameters needed by the tool from the conversation history\n- Tool is called with the parameters\n- Server returns a response\n- Workflow continues with the response", - "enum": [ - "tool" - ] + "messages": { + "description": "This is the starting state for the conversation.", + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIMessage" + } }, - "tool": { - "description": "This is the tool to call. To use an existing tool, send `toolId` instead.", + "tools": { + "type": "array", + "description": "These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.\n\nBoth `tools` and `toolIds` can be used together.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/CreateApiRequestToolDTO", + "title": "ApiRequestTool" + }, + { + "$ref": "#/components/schemas/CreateBashToolDTO", + "title": "BashTool" + }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, + { + "$ref": "#/components/schemas/CreateComputerToolDTO", + "title": "ComputerTool" + }, + { + "$ref": "#/components/schemas/CreateDtmfToolDTO", + "title": "DtmfTool" + }, + { + "$ref": "#/components/schemas/CreateEndCallToolDTO", + "title": "EndCallTool" + }, + { + "$ref": "#/components/schemas/CreateFunctionToolDTO", + "title": "FunctionTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelCalendarAvailabilityToolDTO", + "title": "GoHighLevelCalendarAvailabilityTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelCalendarEventCreateToolDTO", + "title": "GoHighLevelCalendarEventCreateTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelContactCreateToolDTO", + "title": "GoHighLevelContactCreateTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelContactGetToolDTO", + "title": "GoHighLevelContactGetTool" + }, + { + "$ref": "#/components/schemas/CreateGoogleCalendarCheckAvailabilityToolDTO", + "title": "GoogleCalendarCheckAvailabilityTool" + }, + { + "$ref": "#/components/schemas/CreateGoogleCalendarCreateEventToolDTO", + "title": "GoogleCalendarCreateEventTool" + }, + { + "$ref": "#/components/schemas/CreateGoogleSheetsRowAppendToolDTO", + "title": "GoogleSheetsRowAppendTool" + }, + { + "$ref": "#/components/schemas/CreateHandoffToolDTO", + "title": "HandoffTool" + }, + { + "$ref": "#/components/schemas/CreateMcpToolDTO", + "title": "McpTool" + }, + { + "$ref": "#/components/schemas/CreateQueryToolDTO", + "title": "QueryTool" + }, + { + "$ref": "#/components/schemas/CreateSlackSendMessageToolDTO", + "title": "SlackSendMessageTool" + }, + { + "$ref": "#/components/schemas/CreateSmsToolDTO", + "title": "SmsTool" + }, + { + "$ref": "#/components/schemas/CreateTextEditorToolDTO", + "title": "TextEditorTool" + }, + { + "$ref": "#/components/schemas/CreateTransferCallToolDTO", + "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" + } + ] + } + }, + "toolIds": { + "description": "These are the tools that the assistant can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + "type": "array", + "items": { + "type": "string" + } + }, + "knowledgeBase": { + "description": "These are the options for the knowledge base.", "oneOf": [ { - "$ref": "#/components/schemas/CreateApiRequestToolDTO", - "title": "ApiRequestTool" - }, - { - "$ref": "#/components/schemas/CreateBashToolDTO", - "title": "BashTool" - }, - { - "$ref": "#/components/schemas/CreateCodeToolDTO", - "title": "CodeTool" - }, - { - "$ref": "#/components/schemas/CreateComputerToolDTO", - "title": "ComputerTool" - }, - { - "$ref": "#/components/schemas/CreateDtmfToolDTO", - "title": "DtmfTool" - }, - { - "$ref": "#/components/schemas/CreateEndCallToolDTO", - "title": "EndCallTool" - }, - { - "$ref": "#/components/schemas/CreateFunctionToolDTO", - "title": "FunctionTool" - }, - { - "$ref": "#/components/schemas/CreateGoHighLevelCalendarAvailabilityToolDTO", - "title": "GoHighLevelCalendarAvailabilityTool" - }, - { - "$ref": "#/components/schemas/CreateGoHighLevelCalendarEventCreateToolDTO", - "title": "GoHighLevelCalendarEventCreateTool" - }, - { - "$ref": "#/components/schemas/CreateGoHighLevelContactCreateToolDTO", - "title": "GoHighLevelContactCreateTool" - }, - { - "$ref": "#/components/schemas/CreateGoHighLevelContactGetToolDTO", - "title": "GoHighLevelContactGetTool" - }, - { - "$ref": "#/components/schemas/CreateGoogleCalendarCheckAvailabilityToolDTO", - "title": "GoogleCalendarCheckAvailabilityTool" - }, - { - "$ref": "#/components/schemas/CreateGoogleCalendarCreateEventToolDTO", - "title": "GoogleCalendarCreateEventTool" - }, - { - "$ref": "#/components/schemas/CreateGoogleSheetsRowAppendToolDTO", - "title": "GoogleSheetsRowAppendTool" - }, - { - "$ref": "#/components/schemas/CreateHandoffToolDTO", - "title": "HandoffTool" - }, - { - "$ref": "#/components/schemas/CreateMcpToolDTO", - "title": "McpTool" - }, - { - "$ref": "#/components/schemas/CreateQueryToolDTO", - "title": "QueryTool" - }, - { - "$ref": "#/components/schemas/CreateSlackSendMessageToolDTO", - "title": "SlackSendMessageTool" - }, - { - "$ref": "#/components/schemas/CreateSmsToolDTO", - "title": "SmsTool" - }, - { - "$ref": "#/components/schemas/CreateTextEditorToolDTO", - "title": "TextEditorTool" - }, - { - "$ref": "#/components/schemas/CreateTransferCallToolDTO", - "title": "TransferCallTool" - }, - { - "$ref": "#/components/schemas/CreateSipRequestToolDTO", - "title": "SipRequestTool" - }, - { - "$ref": "#/components/schemas/CreateVoicemailToolDTO", - "title": "VoicemailTool" + "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", + "title": "Custom" } ] }, - "toolId": { + "provider": { "type": "string", - "description": "This is the tool to call. To use a transient tool, send `tool` instead." + "enum": [ + "together-ai" + ] }, - "name": { + "model": { "type": "string", - "maxLength": 80 - }, - "isStart": { - "type": "boolean", - "description": "This is whether or not the node is the start of the workflow." + "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b" }, - "metadata": { - "type": "object", - "description": "This is for metadata you want to store on the task." - } - }, - "required": [ - "type", - "name" - ] - }, - "VoicemailDetectionBackoffPlan": { - "type": "object", - "properties": { - "startAtSeconds": { + "temperature": { "type": "number", - "description": "This is the number of seconds to wait before starting the first retry attempt.", + "description": "This is the temperature that will be used for calls. Default is 0.5.", "minimum": 0, - "default": 5 + "maximum": 2 }, - "frequencySeconds": { + "maxTokens": { "type": "number", - "description": "This is the interval in seconds between retry attempts.", - "minimum": 2.5, - "default": 5 + "description": "This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", + "minimum": 50, + "maximum": 10000 }, - "maxRetries": { + "emotionRecognitionEnabled": { + "type": "boolean", + "description": "This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false" + }, + "numFastTurns": { "type": "number", - "description": "This is the maximum number of retry attempts before giving up.", - "minimum": 1, - "maximum": 10, - "default": 6 + "description": "This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.\n\nDefault is 0.\n\n@default 0", + "minimum": 0 } - } + }, + "required": [ + "provider", + "model" + ] }, - "GoogleVoicemailDetectionPlan": { + "HangupNode": { "type": "object", "properties": { - "beepMaxAwaitSeconds": { - "type": "number", - "description": "This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message\n\n- If we detect a voicemail beep before this, we will speak the message at that point.\n\n- Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.\n\n@default 30\n@min 0\n@max 60", - "minimum": 0, - "maximum": 30, - "default": 30 - }, - "provider": { + "type": { "type": "string", - "description": "This is the provider to use for voicemail detection.", "enum": [ - "google" - ] - }, - "backoffPlan": { - "description": "This is the backoff plan for the voicemail detection.", - "allOf": [ - { - "$ref": "#/components/schemas/VoicemailDetectionBackoffPlan" - } + "hangup" ] }, - "type": { + "name": { "type": "string", - "description": "This is the detection type to use for voicemail detection.\n- 'audio': Uses native audio models (default)\n- 'transcript': Uses ASR/transcript-based detection\n@default 'audio' (audio detection)", - "enum": [ - "audio", - "transcript" - ] + "maxLength": 80 + }, + "isStart": { + "type": "boolean", + "description": "This is whether or not the node is the start of the workflow." + }, + "metadata": { + "type": "object", + "description": "This is for metadata you want to store on the task." } }, "required": [ - "provider" + "type", + "name" ] }, - "OpenAIVoicemailDetectionPlan": { + "WorkflowOpenAIModel": { "type": "object", "properties": { - "beepMaxAwaitSeconds": { - "type": "number", - "description": "This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message\n\n- If we detect a voicemail beep before this, we will speak the message at that point.\n\n- Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.\n\n@default 30\n@min 0\n@max 60", - "minimum": 0, - "maximum": 30, - "default": 30 - }, "provider": { "type": "string", - "description": "This is the provider to use for voicemail detection.", + "description": "This is the provider of the model (`openai`).", "enum": [ "openai" ] }, - "backoffPlan": { - "description": "This is the backoff plan for the voicemail detection.", - "allOf": [ - { - "$ref": "#/components/schemas/VoicemailDetectionBackoffPlan" - } - ] - }, - "type": { + "model": { "type": "string", - "description": "This is the detection type to use for voicemail detection.\n- 'audio': Uses native audio models (default)\n- 'transcript': Uses ASR/transcript-based detection\n@default 'audio' (audio detection)", + "description": "This is the OpenAI model that will be used.\n\nWhen using Vapi OpenAI or your own Azure Credentials, you have the option to specify the region for the selected model. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest region that make sense.\nThis is helpful when you are required to comply with Data Residency rules. Learn more about Azure regions here https://azure.microsoft.com/en-us/explore/global-infrastructure/data-residency/.", + "maxLength": 100, "enum": [ - "audio", - "transcript" + "gpt-5.4", + "gpt-5.4-mini", + "gpt-5.4-nano", + "gpt-5.2", + "gpt-5.2-chat-latest", + "gpt-5.1", + "gpt-5.1-chat-latest", + "gpt-5", + "gpt-5-chat-latest", + "gpt-5-mini", + "gpt-5-nano", + "gpt-4.1-2025-04-14", + "gpt-4.1-mini-2025-04-14", + "gpt-4.1-nano-2025-04-14", + "gpt-4.1", + "gpt-4.1-mini", + "gpt-4.1-nano", + "chatgpt-4o-latest", + "o3", + "o3-mini", + "o4-mini", + "o1-mini", + "o1-mini-2024-09-12", + "gpt-4o-mini-2024-07-18", + "gpt-4o-mini", + "gpt-4o", + "gpt-4o-2024-05-13", + "gpt-4o-2024-08-06", + "gpt-4o-2024-11-20", + "gpt-4-turbo", + "gpt-4-turbo-2024-04-09", + "gpt-4-turbo-preview", + "gpt-4-0125-preview", + "gpt-4-1106-preview", + "gpt-4", + "gpt-4-0613", + "gpt-3.5-turbo", + "gpt-3.5-turbo-0125", + "gpt-3.5-turbo-1106", + "gpt-3.5-turbo-16k", + "gpt-3.5-turbo-0613", + "gpt-4.1-2025-04-14:westus", + "gpt-4.1-2025-04-14:eastus2", + "gpt-4.1-2025-04-14:eastus", + "gpt-4.1-2025-04-14:westus3", + "gpt-4.1-2025-04-14:northcentralus", + "gpt-4.1-2025-04-14:southcentralus", + "gpt-4.1-2025-04-14:westeurope", + "gpt-4.1-2025-04-14:germanywestcentral", + "gpt-4.1-2025-04-14:polandcentral", + "gpt-4.1-2025-04-14:spaincentral", + "gpt-4.1-mini-2025-04-14:westus", + "gpt-4.1-mini-2025-04-14:eastus2", + "gpt-4.1-mini-2025-04-14:eastus", + "gpt-4.1-mini-2025-04-14:westus3", + "gpt-4.1-mini-2025-04-14:northcentralus", + "gpt-4.1-mini-2025-04-14:southcentralus", + "gpt-4.1-mini-2025-04-14:westeurope", + "gpt-4.1-mini-2025-04-14:germanywestcentral", + "gpt-4.1-mini-2025-04-14:polandcentral", + "gpt-4.1-mini-2025-04-14:spaincentral", + "gpt-4.1-nano-2025-04-14:westus", + "gpt-4.1-nano-2025-04-14:eastus2", + "gpt-4.1-nano-2025-04-14:westus3", + "gpt-4.1-nano-2025-04-14:northcentralus", + "gpt-4.1-nano-2025-04-14:southcentralus", + "gpt-4o-2024-11-20:swedencentral", + "gpt-4o-2024-11-20:westus", + "gpt-4o-2024-11-20:eastus2", + "gpt-4o-2024-11-20:eastus", + "gpt-4o-2024-11-20:westus3", + "gpt-4o-2024-11-20:southcentralus", + "gpt-4o-2024-11-20:westeurope", + "gpt-4o-2024-11-20:germanywestcentral", + "gpt-4o-2024-11-20:polandcentral", + "gpt-4o-2024-11-20:spaincentral", + "gpt-4o-2024-08-06:westus", + "gpt-4o-2024-08-06:westus3", + "gpt-4o-2024-08-06:eastus", + "gpt-4o-2024-08-06:eastus2", + "gpt-4o-2024-08-06:northcentralus", + "gpt-4o-2024-08-06:southcentralus", + "gpt-4o-mini-2024-07-18:westus", + "gpt-4o-mini-2024-07-18:westus3", + "gpt-4o-mini-2024-07-18:eastus", + "gpt-4o-mini-2024-07-18:eastus2", + "gpt-4o-mini-2024-07-18:northcentralus", + "gpt-4o-mini-2024-07-18:southcentralus", + "gpt-4o-2024-05-13:eastus2", + "gpt-4o-2024-05-13:eastus", + "gpt-4o-2024-05-13:northcentralus", + "gpt-4o-2024-05-13:southcentralus", + "gpt-4o-2024-05-13:westus3", + "gpt-4o-2024-05-13:westus", + "gpt-4-turbo-2024-04-09:eastus2", + "gpt-4-0125-preview:eastus", + "gpt-4-0125-preview:northcentralus", + "gpt-4-0125-preview:southcentralus", + "gpt-4-1106-preview:australiaeast", + "gpt-4-1106-preview:canadaeast", + "gpt-4-1106-preview:france", + "gpt-4-1106-preview:india", + "gpt-4-1106-preview:norway", + "gpt-4-1106-preview:swedencentral", + "gpt-4-1106-preview:uk", + "gpt-4-1106-preview:westus", + "gpt-4-1106-preview:westus3", + "gpt-4-0613:canadaeast", + "gpt-3.5-turbo-0125:canadaeast", + "gpt-3.5-turbo-0125:northcentralus", + "gpt-3.5-turbo-0125:southcentralus", + "gpt-3.5-turbo-1106:canadaeast", + "gpt-3.5-turbo-1106:westus", + "gpt-4.1:australiaeast", + "gpt-4o:australiaeast", + "gpt-5.4-mini:australiaeast" ] + }, + "temperature": { + "type": "number", + "description": "This is the temperature of the model.", + "minimum": 0, + "maximum": 2 + }, + "maxTokens": { + "type": "number", + "description": "This is the max tokens of the model.", + "minimum": 50, + "maximum": 10000 } }, "required": [ - "provider" + "provider", + "model" ] }, - "TwilioVoicemailDetectionPlan": { + "WorkflowAnthropicModel": { "type": "object", "properties": { "provider": { "type": "string", - "description": "This is the provider to use for voicemail detection.", + "description": "This is the provider of the model (`anthropic`).", "enum": [ - "twilio" + "anthropic" ] }, - "voicemailDetectionTypes": { - "type": "array", - "description": "These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence'].\n\n@default {Array} ['machine_end_beep', 'machine_end_silence']", - "enum": [ - "machine_start", - "human", - "fax", - "unknown", - "machine_end_beep", - "machine_end_silence", - "machine_end_other" - ], - "example": [ - "machine_end_beep", - "machine_end_silence" - ], - "items": { - "type": "string", - "enum": [ - "machine_start", - "human", - "fax", - "unknown", - "machine_end_beep", - "machine_end_silence", - "machine_end_other" - ] - } - }, - "enabled": { - "type": "boolean", - "description": "This sets whether the assistant should detect voicemail. Defaults to true.\n\n@default true" - }, - "machineDetectionTimeout": { - "type": "number", - "description": "The number of seconds that Twilio should attempt to perform answering machine detection before timing out and returning AnsweredBy as unknown. Default is 30 seconds.\n\nIncreasing this value will provide the engine more time to make a determination. This can be useful when DetectMessageEnd is provided in the MachineDetection parameter and there is an expectation of long answering machine greetings that can exceed 30 seconds.\n\nDecreasing this value will reduce the amount of time the engine has to make a determination. This can be particularly useful when the Enable option is provided in the MachineDetection parameter and you want to limit the time for initial detection.\n\nCheck the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.\n\n@default 30", - "minimum": 3, - "maximum": 59 - }, - "machineDetectionSpeechThreshold": { - "type": "number", - "description": "The number of milliseconds that is used as the measuring stick for the length of the speech activity. Durations lower than this value will be interpreted as a human, longer as a machine. Default is 2400 milliseconds.\n\nIncreasing this value will reduce the chance of a False Machine (detected machine, actually human) for a long human greeting (e.g., a business greeting) but increase the time it takes to detect a machine.\n\nDecreasing this value will reduce the chances of a False Human (detected human, actually machine) for short voicemail greetings. The value of this parameter may need to be reduced by more than 1000ms to detect very short voicemail greetings. A reduction of that significance can result in increased False Machine detections. Adjusting the MachineDetectionSpeechEndThreshold is likely the better approach for short voicemails. Decreasing MachineDetectionSpeechThreshold will also reduce the time it takes to detect a machine.\n\nCheck the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.\n\n@default 2400", - "minimum": 1000, - "maximum": 6000 - }, - "machineDetectionSpeechEndThreshold": { - "type": "number", - "description": "The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Default is 1200 milliseconds.\n\nIncreasing this value will typically be used to better address the short voicemail greeting scenarios. For short voicemails, there is typically 1000-2000ms of audio followed by 1200-2400ms of silence and then additional audio before the beep. Increasing the MachineDetectionSpeechEndThreshold to ~2500ms will treat the 1200-2400ms of silence as a gap in the greeting but not the end of the greeting and will result in a machine detection. The downsides of such a change include:\n- Increasing the delay for human detection by the amount you increase this parameter, e.g., a change of 1200ms to 2500ms increases human detection delay by 1300ms.\n- Cases where a human has two utterances separated by a period of silence (e.g. a \"Hello\", then 2000ms of silence, and another \"Hello\") may be interpreted as a machine.\n\nDecreasing this value will result in faster human detection. The consequence is that it can lead to increased False Human (detected human, actually machine) detections because a silence gap in a voicemail greeting (not necessarily just in short voicemail scenarios) can be incorrectly interpreted as the end of speech.\n\nCheck the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.\n\n@default 1200", - "minimum": 500, - "maximum": 5000 - }, - "machineDetectionSilenceTimeout": { - "type": "number", - "description": "The number of milliseconds of initial silence after which an unknown AnsweredBy result will be returned. Default is 5000 milliseconds.\n\nIncreasing this value will result in waiting for a longer period of initial silence before returning an 'unknown' AMD result.\n\nDecreasing this value will result in waiting for a shorter period of initial silence before returning an 'unknown' AMD result.\n\nCheck the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.\n\n@default 5000", - "minimum": 2000, - "maximum": 10000 - } - }, - "required": [ - "provider" - ] - }, - "VapiVoicemailDetectionPlan": { - "type": "object", - "properties": { - "beepMaxAwaitSeconds": { - "type": "number", - "description": "This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message\n\n- If we detect a voicemail beep before this, we will speak the message at that point.\n\n- Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.\n\n@default 30\n@min 0\n@max 60", - "minimum": 0, - "maximum": 30, - "default": 30 - }, - "provider": { + "model": { "type": "string", - "description": "This is the provider to use for voicemail detection.", + "description": "This is the specific model that will be used.", + "maxLength": 100, "enum": [ - "vapi" + "claude-3-opus-20240229", + "claude-3-sonnet-20240229", + "claude-3-haiku-20240307", + "claude-3-5-sonnet-20240620", + "claude-3-5-sonnet-20241022", + "claude-3-5-haiku-20241022", + "claude-3-7-sonnet-20250219", + "claude-opus-4-20250514", + "claude-opus-4-5-20251101", + "claude-opus-4-6", + "claude-sonnet-4-20250514", + "claude-sonnet-4-5-20250929", + "claude-sonnet-4-6", + "claude-haiku-4-5-20251001" ] }, - "backoffPlan": { - "description": "This is the backoff plan for the voicemail detection.", + "thinking": { + "description": "This is the optional configuration for Anthropic's thinking feature.\n\n- If provided, `maxTokens` must be greater than `thinking.budgetTokens`.", "allOf": [ { - "$ref": "#/components/schemas/VoicemailDetectionBackoffPlan" + "$ref": "#/components/schemas/AnthropicThinkingConfig" } ] }, - "type": { - "type": "string", - "description": "This is the detection type to use for voicemail detection.\n- 'audio': Uses native audio models (default)\n- 'transcript': Uses ASR/transcript-based detection\n@default 'audio' (audio detection)", - "enum": [ - "audio", - "transcript" - ] + "temperature": { + "type": "number", + "description": "This is the temperature of the model.", + "minimum": 0, + "maximum": 2 + }, + "maxTokens": { + "type": "number", + "description": "This is the max tokens of the model.", + "minimum": 50, + "maximum": 10000 } }, "required": [ - "provider" + "provider", + "model" ] }, - "TransferHookAction": { + "WorkflowAnthropicBedrockModel": { "type": "object", "properties": { - "type": { + "provider": { "type": "string", - "description": "This is the type of action - must be \"transfer\"", + "description": "This is the provider of the model (`anthropic-bedrock`).", "enum": [ - "transfer" - ] - }, - "destination": { - "description": "This is the destination details for the transfer - can be a phone number or SIP URI", - "oneOf": [ - { - "$ref": "#/components/schemas/TransferDestinationNumber", - "title": "NumberTransferDestination" - }, - { - "$ref": "#/components/schemas/TransferDestinationSip", - "title": "SipTransferDestination" - } + "anthropic-bedrock" ] - } - }, - "required": [ - "type" - ] - }, - "FunctionCallHookAction": { - "type": "object", - "properties": { - "messages": { - "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ToolMessageStart", - "title": "ToolMessageStart" - }, - { - "$ref": "#/components/schemas/ToolMessageComplete", - "title": "ToolMessageComplete" - }, - { - "$ref": "#/components/schemas/ToolMessageFailed", - "title": "ToolMessageFailed" - }, - { - "$ref": "#/components/schemas/ToolMessageDelayed", - "title": "ToolMessageDelayed" - } - ] - } }, - "type": { + "model": { "type": "string", + "description": "This is the specific model that will be used.", + "maxLength": 100, "enum": [ - "function" - ], - "description": "The type of tool. \"function\" for Function tool." - }, - "async": { - "type": "boolean", - "example": false, - "description": "This determines if the tool is async.\n\n If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.\n\n If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.\n\n Defaults to synchronous (`false`)." - }, - "server": { - "description": "\n This is the server where a `tool-calls` webhook will be sent.\n\n Notes:\n - Webhook is sent to this server when a tool call is made.\n - Webhook contains the call, assistant, and phone number objects.\n - Webhook contains the variables set on the assistant.\n - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.\n - Webhook expects a response with tool call result.", - "allOf": [ - { - "$ref": "#/components/schemas/Server" - } + "claude-3-opus-20240229", + "claude-3-sonnet-20240229", + "claude-3-haiku-20240307", + "claude-3-5-sonnet-20240620", + "claude-3-5-sonnet-20241022", + "claude-3-5-haiku-20241022", + "claude-3-7-sonnet-20250219", + "claude-opus-4-20250514", + "claude-opus-4-5-20251101", + "claude-opus-4-6", + "claude-sonnet-4-20250514", + "claude-sonnet-4-5-20250929", + "claude-sonnet-4-6", + "claude-haiku-4-5-20251001", + "global.anthropic.claude-haiku-4-5-20251001-v1:0" ] }, - "variableExtractionPlan": { - "description": "Plan to extract variables from the tool response", + "thinking": { + "description": "This is the optional configuration for Anthropic's thinking feature.\n\n- If provided, `maxTokens` must be greater than `thinking.budgetTokens`.", "allOf": [ { - "$ref": "#/components/schemas/VariableExtractionPlan" + "$ref": "#/components/schemas/AnthropicThinkingConfig" } ] }, - "parameters": { - "description": "Static key-value pairs merged into the request body. Values support Liquid templates.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ToolParameter" - } - }, - "rejectionPlan": { - "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", - "allOf": [ - { - "$ref": "#/components/schemas/ToolRejectionPlan" - } - ] + "temperature": { + "type": "number", + "description": "This is the temperature of the model.", + "minimum": 0, + "maximum": 2 }, - "function": { - "description": "This is the function definition of the tool.", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAIFunction" - } - ] + "maxTokens": { + "type": "number", + "description": "This is the max tokens of the model.", + "minimum": 50, + "maximum": 10000 } }, "required": [ - "type" + "provider", + "model" ] }, - "SayHookAction": { + "WorkflowGoogleModel": { "type": "object", "properties": { - "type": { + "provider": { "type": "string", - "description": "This is the type of action - must be \"say\"", + "description": "This is the provider of the model (`google`).", "enum": [ - "say" + "google" ] }, - "prompt": { - "description": "This is the prompt for the assistant to generate a response based on existing conversation.\nCan be a string or an array of chat messages.", - "oneOf": [ - { - "type": "string", - "title": "String" - }, - { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/SystemMessage", - "title": "SystemMessage" - }, - { - "$ref": "#/components/schemas/UserMessage", - "title": "UserMessage" - }, - { - "$ref": "#/components/schemas/AssistantMessage", - "title": "AssistantMessage" - }, - { - "$ref": "#/components/schemas/ToolMessage", - "title": "ToolMessage" - }, - { - "$ref": "#/components/schemas/DeveloperMessage", - "title": "DeveloperMessage" - } - ] - }, - "title": "MessageArray" - } - ], - "examples": [ - "Ask the user if they're still in the call", - [ - { - "role": "system", - "content": "You are a helpful assistant, and would like to know if the user is still in the call based on the conversation history in {{transcript}}" - } - ] + "model": { + "type": "string", + "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b", + "maxLength": 100, + "enum": [ + "gemini-3.5-flash", + "gemini-3.1-flash-lite", + "gemini-3-flash-preview", + "gemini-2.5-pro", + "gemini-2.5-flash", + "gemini-2.5-flash-lite", + "gemini-2.0-flash-thinking-exp", + "gemini-2.0-pro-exp-02-05", + "gemini-2.0-flash", + "gemini-2.0-flash-lite", + "gemini-2.0-flash-exp", + "gemini-2.0-flash-realtime-exp", + "gemini-1.5-flash", + "gemini-1.5-flash-002", + "gemini-1.5-pro", + "gemini-1.5-pro-002", + "gemini-1.0-pro" ] }, - "exact": { - "type": "object", - "description": "This is the message to say" + "temperature": { + "type": "number", + "description": "This is the temperature of the model.", + "minimum": 0, + "maximum": 2 + }, + "maxTokens": { + "type": "number", + "description": "This is the max tokens of the model.", + "minimum": 50, + "maximum": 10000 } }, "required": [ - "type" + "provider", + "model" ] }, - "MessageAddHookAction": { + "WorkflowCustomModel": { "type": "object", "properties": { - "type": { + "provider": { "type": "string", - "description": "This is the type of action - must be \"message.add\"", + "description": "This is the provider of the model (`custom-llm`).", "enum": [ - "message.add" - ] - }, - "message": { - "description": "The message to add to the conversation in OpenAI format", - "example": { - "role": "system", - "content": "Context update from hook" - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAIMessage" - } + "custom-llm" ] }, - "triggerResponseEnabled": { - "type": "boolean", - "description": "Whether to trigger an assistant response after adding the message", - "default": true - } - }, - "required": [ - "type", - "message" - ] - }, - "CallHookFilter": { - "type": "object", - "properties": { - "type": { + "metadataSendMode": { "type": "string", - "description": "This is the type of filter - currently only \"oneOf\" is supported", + "description": "This determines whether metadata is sent in requests to the custom provider.\n\n- `off` will not send any metadata. payload will look like `{ messages }`\n- `variable` will send `assistant.metadata` as a variable on the payload. payload will look like `{ messages, metadata }`\n- `destructured` will send `assistant.metadata` fields directly on the payload. payload will look like `{ messages, ...metadata }`\n\nFurther, `variable` and `destructured` will send `call`, `phoneNumber`, and `customer` objects in the payload.\n\nDefault is `variable`.", "enum": [ - "oneOf" - ], - "maxLength": 1000 + "off", + "variable", + "destructured" + ] }, - "key": { + "url": { "type": "string", - "description": "This is the key to filter on (e.g. \"call.endedReason\")", - "maxLength": 1000 + "description": "These is the URL we'll use for the OpenAI client's `baseURL`. Ex. https://openrouter.ai/api/v1" }, - "oneOf": { - "description": "This is the array of possible values to match against", - "type": "array", - "items": { - "type": "string", - "maxLength": 1000 - } - } - }, - "required": [ - "type", - "key", - "oneOf" - ] - }, - "CallHookCallEnding": { - "type": "object", - "properties": { - "on": { + "headers": { + "type": "object", + "description": "These are the headers we'll use for the OpenAI client's `headers`." + }, + "timeoutSeconds": { + "type": "number", + "description": "This sets the timeout for the connection to the custom provider without needing to stream any tokens back. Default is 20 seconds.", + "minimum": 20, + "maximum": 600 + }, + "model": { "type": "string", - "description": "This is the event that triggers this hook", - "enum": [ - "call.ending" - ], - "maxLength": 1000 + "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b", + "maxLength": 100 }, - "do": { - "type": "array", - "description": "This is the set of actions to perform when the hook triggers", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ToolCallHookAction", - "title": "ToolCallHookAction" - }, - { - "$ref": "#/components/schemas/MessageAddHookAction", - "title": "MessageAddHookAction" - } - ] - } + "temperature": { + "type": "number", + "description": "This is the temperature of the model.", + "minimum": 0, + "maximum": 2 }, - "filters": { - "description": "This is the set of filters that must match for the hook to trigger", - "type": "array", - "items": { - "$ref": "#/components/schemas/CallHookFilter" - } + "maxTokens": { + "type": "number", + "description": "This is the max tokens of the model.", + "minimum": 50, + "maximum": 10000 } }, "required": [ - "on", - "do" + "provider", + "url", + "model" ] }, - "CallHookAssistantSpeechInterrupted": { + "GlobalNodePlan": { "type": "object", "properties": { - "on": { - "type": "string", - "description": "This is the event that triggers this hook", - "enum": [ - "assistant.speech.interrupted" - ], - "maxLength": 1000 + "enabled": { + "type": "boolean", + "description": "This is the flag to determine if this node is a global node\n\n@default false", + "default": false }, - "do": { - "type": "array", - "description": "This is the set of actions to perform when the hook triggers", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/SayHookAction", - "title": "SayHookAction" - }, - { - "$ref": "#/components/schemas/ToolCallHookAction", - "title": "ToolCallHookAction" - }, - { - "$ref": "#/components/schemas/MessageAddHookAction", - "title": "MessageAddHookAction" - } - ] - } + "enterCondition": { + "type": "string", + "description": "This is the condition that will be checked to determine if the global node should be executed.\n\n@default ''", + "maxLength": 1000, + "default": "" } - }, - "required": [ - "on", - "do" - ] + } }, - "CallHookCustomerSpeechInterrupted": { + "ConversationNode": { "type": "object", "properties": { - "on": { + "type": { "type": "string", - "description": "This is the event that triggers this hook", + "description": "This is the Conversation node. This can be used to start a conversation with the customer.\n\nThe flow is:\n- Workflow starts the conversation node\n- Model is active with the `prompt` and global context.\n- Model will call a tool to exit this node.\n- Workflow will extract variables from the conversation.\n- Workflow continues.", "enum": [ - "customer.speech.interrupted" - ], - "maxLength": 1000 + "conversation" + ] }, - "do": { - "type": "array", - "description": "This is the set of actions to perform when the hook triggers", + "model": { + "description": "This is the model for the node.\n\nThis overrides `workflow.model`.", + "oneOf": [ + { + "$ref": "#/components/schemas/WorkflowOpenAIModel", + "title": "WorkflowOpenAIModel" + }, + { + "$ref": "#/components/schemas/WorkflowAnthropicModel", + "title": "WorkflowAnthropicModel" + }, + { + "$ref": "#/components/schemas/WorkflowAnthropicBedrockModel", + "title": "WorkflowAnthropicBedrockModel" + }, + { + "$ref": "#/components/schemas/WorkflowGoogleModel", + "title": "WorkflowGoogleModel" + }, + { + "$ref": "#/components/schemas/WorkflowCustomModel", + "title": "WorkflowCustomModel" + } + ] + }, + "transcriber": { + "description": "This is the transcriber for the node.\n\nThis overrides `workflow.transcriber`.", + "oneOf": [ + { + "$ref": "#/components/schemas/AssemblyAITranscriber", + "title": "AssemblyAITranscriber" + }, + { + "$ref": "#/components/schemas/AzureSpeechTranscriber", + "title": "AzureSpeechTranscriber" + }, + { + "$ref": "#/components/schemas/CustomTranscriber", + "title": "CustomTranscriber" + }, + { + "$ref": "#/components/schemas/DeepgramTranscriber", + "title": "DeepgramTranscriber" + }, + { + "$ref": "#/components/schemas/ElevenLabsTranscriber", + "title": "ElevenLabsTranscriber" + }, + { + "$ref": "#/components/schemas/GladiaTranscriber", + "title": "GladiaTranscriber" + }, + { + "$ref": "#/components/schemas/GoogleTranscriber", + "title": "GoogleTranscriber" + }, + { + "$ref": "#/components/schemas/SpeechmaticsTranscriber", + "title": "SpeechmaticsTranscriber" + }, + { + "$ref": "#/components/schemas/TalkscriberTranscriber", + "title": "TalkscriberTranscriber" + }, + { + "$ref": "#/components/schemas/OpenAITranscriber", + "title": "OpenAITranscriber" + }, + { + "$ref": "#/components/schemas/CartesiaTranscriber", + "title": "CartesiaTranscriber" + }, + { + "$ref": "#/components/schemas/SonioxTranscriber", + "title": "SonioxTranscriber" + }, + { + "$ref": "#/components/schemas/XaiTranscriber", + "title": "XaiTranscriber" + }, + { + "$ref": "#/components/schemas/VapiTranscriber", + "title": "VapiTranscriber" + } + ] + }, + "voice": { + "description": "This is the voice for the node.\n\nThis overrides `workflow.voice`.", + "oneOf": [ + { + "$ref": "#/components/schemas/AzureVoice", + "title": "AzureVoice" + }, + { + "$ref": "#/components/schemas/CartesiaVoice", + "title": "CartesiaVoice" + }, + { + "$ref": "#/components/schemas/CustomVoice", + "title": "CustomVoice" + }, + { + "$ref": "#/components/schemas/DeepgramVoice", + "title": "DeepgramVoice" + }, + { + "$ref": "#/components/schemas/ElevenLabsVoice", + "title": "ElevenLabsVoice" + }, + { + "$ref": "#/components/schemas/HumeVoice", + "title": "HumeVoice" + }, + { + "$ref": "#/components/schemas/LMNTVoice", + "title": "LMNTVoice" + }, + { + "$ref": "#/components/schemas/NeuphonicVoice", + "title": "NeuphonicVoice" + }, + { + "$ref": "#/components/schemas/OpenAIVoice", + "title": "OpenAIVoice" + }, + { + "$ref": "#/components/schemas/PlayHTVoice", + "title": "PlayHTVoice" + }, + { + "$ref": "#/components/schemas/WellSaidVoice", + "title": "WellSaidVoice" + }, + { + "$ref": "#/components/schemas/RimeAIVoice", + "title": "RimeAIVoice" + }, + { + "$ref": "#/components/schemas/SmallestAIVoice", + "title": "SmallestAIVoice" + }, + { + "$ref": "#/components/schemas/TavusVoice", + "title": "TavusVoice" + }, + { + "$ref": "#/components/schemas/VapiVoice", + "title": "VapiVoice" + }, + { + "$ref": "#/components/schemas/SesameVoice", + "title": "SesameVoice" + }, + { + "$ref": "#/components/schemas/InworldVoice", + "title": "InworldVoice" + }, + { + "$ref": "#/components/schemas/MinimaxVoice", + "title": "MinimaxVoice" + }, + { + "$ref": "#/components/schemas/XaiVoice", + "title": "XaiVoice" + }, + { + "$ref": "#/components/schemas/MicrosoftVoice", + "title": "MicrosoftVoice" + } + ] + }, + "tools": { + "type": "array", + "description": "These are the tools that the conversation node can use during the call. To use existing tools, use `toolIds`.\n\nBoth `tools` and `toolIds` can be used together.", "items": { "oneOf": [ { - "$ref": "#/components/schemas/SayHookAction", - "title": "SayHookAction" + "$ref": "#/components/schemas/CreateApiRequestToolDTO", + "title": "ApiRequestTool" }, { - "$ref": "#/components/schemas/ToolCallHookAction", - "title": "ToolCallHookAction" + "$ref": "#/components/schemas/CreateBashToolDTO", + "title": "BashTool" }, { - "$ref": "#/components/schemas/MessageAddHookAction", - "title": "MessageAddHookAction" + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, + { + "$ref": "#/components/schemas/CreateComputerToolDTO", + "title": "ComputerTool" + }, + { + "$ref": "#/components/schemas/CreateDtmfToolDTO", + "title": "DtmfTool" + }, + { + "$ref": "#/components/schemas/CreateEndCallToolDTO", + "title": "EndCallTool" + }, + { + "$ref": "#/components/schemas/CreateFunctionToolDTO", + "title": "FunctionTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelCalendarAvailabilityToolDTO", + "title": "GoHighLevelCalendarAvailabilityTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelCalendarEventCreateToolDTO", + "title": "GoHighLevelCalendarEventCreateTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelContactCreateToolDTO", + "title": "GoHighLevelContactCreateTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelContactGetToolDTO", + "title": "GoHighLevelContactGetTool" + }, + { + "$ref": "#/components/schemas/CreateGoogleCalendarCheckAvailabilityToolDTO", + "title": "GoogleCalendarCheckAvailabilityTool" + }, + { + "$ref": "#/components/schemas/CreateGoogleCalendarCreateEventToolDTO", + "title": "GoogleCalendarCreateEventTool" + }, + { + "$ref": "#/components/schemas/CreateGoogleSheetsRowAppendToolDTO", + "title": "GoogleSheetsRowAppendTool" + }, + { + "$ref": "#/components/schemas/CreateHandoffToolDTO", + "title": "HandoffTool" + }, + { + "$ref": "#/components/schemas/CreateMcpToolDTO", + "title": "McpTool" + }, + { + "$ref": "#/components/schemas/CreateQueryToolDTO", + "title": "QueryTool" + }, + { + "$ref": "#/components/schemas/CreateSlackSendMessageToolDTO", + "title": "SlackSendMessageTool" + }, + { + "$ref": "#/components/schemas/CreateSmsToolDTO", + "title": "SmsTool" + }, + { + "$ref": "#/components/schemas/CreateTextEditorToolDTO", + "title": "TextEditorTool" + }, + { + "$ref": "#/components/schemas/CreateTransferCallToolDTO", + "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] } + }, + "toolIds": { + "description": "These are the tools that the conversation node can use during the call. To use transient tools, use `tools`.\n\nBoth `tools` and `toolIds` can be used together.", + "type": "array", + "items": { + "type": "string" + } + }, + "prompt": { + "type": "string", + "maxLength": 5000 + }, + "globalNodePlan": { + "description": "This is the plan for the global node.", + "allOf": [ + { + "$ref": "#/components/schemas/GlobalNodePlan" + } + ] + }, + "variableExtractionPlan": { + "description": "This is the plan that controls the variable extraction from the user's responses.\n\nUsage:\nUse `schema` to specify what you want to extract from the user's responses.\n```json\n{\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"user\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"number\"\n }\n }\n }\n }\n }\n}\n```\n\nThis will be extracted as `{{ user.name }}` and `{{ user.age }}` respectively.\n\n(Optional) Use `aliases` to create new variables.\n\n```json\n{\n \"aliases\": [\n {\n \"key\": \"userAge\",\n \"value\": \"{{user.age}}\"\n },\n {\n \"key\": \"userName\",\n \"value\": \"{{user.name}}\"\n }\n ]\n}\n```\n\nThis will be extracted as `{{ userAge }}` and `{{ userName }}` respectively.\n\nNote: The `schema` field is required for Conversation nodes if you want to extract variables from the user's responses. `aliases` is just a convenience.", + "allOf": [ + { + "$ref": "#/components/schemas/VariableExtractionPlan" + } + ] + }, + "name": { + "type": "string", + "maxLength": 80 + }, + "isStart": { + "type": "boolean", + "description": "This is whether or not the node is the start of the workflow." + }, + "metadata": { + "type": "object", + "description": "This is for metadata you want to store on the task." } }, "required": [ - "on", - "do" + "type", + "name" ] }, - "ToolCallHookAction": { + "ToolNode": { "type": "object", "properties": { "type": { "type": "string", - "description": "This is the type of action - must be \"tool\"", + "description": "This is the Tool node. This can be used to call a tool in your workflow.\n\nThe flow is:\n- Workflow starts the tool node\n- Model is called to extract parameters needed by the tool from the conversation history\n- Tool is called with the parameters\n- Server returns a response\n- Workflow continues with the response", "enum": [ "tool" ] @@ -18408,1177 +19906,1027 @@ "toolId": { "type": "string", "description": "This is the tool to call. To use a transient tool, send `tool` instead." + }, + "name": { + "type": "string", + "maxLength": 80 + }, + "isStart": { + "type": "boolean", + "description": "This is whether or not the node is the start of the workflow." + }, + "metadata": { + "type": "object", + "description": "This is for metadata you want to store on the task." } }, "required": [ - "type" + "type", + "name" ] }, - "CustomerSpeechTimeoutOptions": { + "VoicemailDetectionBackoffPlan": { "type": "object", "properties": { - "timeoutSeconds": { + "startAtSeconds": { "type": "number", - "description": "This is the timeout in seconds before action is triggered.\nThe clock starts when the assistant finishes speaking and remains active until the user speaks.\n\n@default 7.5", - "minimum": 1, - "maximum": 1000 + "description": "This is the number of seconds to wait before starting the first retry attempt.", + "minimum": 0, + "default": 5 }, - "triggerMaxCount": { + "frequencySeconds": { "type": "number", - "description": "This is the maximum number of times the hook will trigger in a call.\n\n@default 3", - "minimum": 1, - "maximum": 10 + "description": "This is the interval in seconds between retry attempts.", + "minimum": 2.5, + "default": 5 }, - "triggerResetMode": { - "type": "object", - "description": "This is whether the counter for hook trigger resets the user speaks.\n\n@default never" + "maxRetries": { + "type": "number", + "description": "This is the maximum number of retry attempts before giving up.", + "minimum": 1, + "maximum": 10, + "default": 6 } - }, - "required": [ - "timeoutSeconds" - ] + } }, - "CallHookCustomerSpeechTimeout": { + "GoogleVoicemailDetectionPlan": { "type": "object", "properties": { - "on": { - "type": "string", - "description": "Must be either \"customer.speech.timeout\" or match the pattern \"customer.speech.timeout[property=value]\"", - "maxLength": 1000 + "beepMaxAwaitSeconds": { + "type": "number", + "description": "This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message\n\n- If we detect a voicemail beep before this, we will speak the message at that point.\n\n- Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.\n\n@default 30\n@min 0\n@max 60", + "minimum": 0, + "maximum": 30, + "default": 30 }, - "do": { - "type": "array", - "description": "This is the set of actions to perform when the hook triggers", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/SayHookAction", - "title": "SayHookAction" - }, - { - "$ref": "#/components/schemas/ToolCallHookAction", - "title": "ToolCallHookAction" - }, - { - "$ref": "#/components/schemas/MessageAddHookAction", - "title": "MessageAddHookAction" - } - ] - } + "provider": { + "type": "string", + "description": "This is the provider to use for voicemail detection.", + "enum": [ + "google" + ] }, - "options": { - "description": "This is the set of filters that must match for the hook to trigger", + "backoffPlan": { + "description": "This is the backoff plan for the voicemail detection.", "allOf": [ { - "$ref": "#/components/schemas/CustomerSpeechTimeoutOptions" + "$ref": "#/components/schemas/VoicemailDetectionBackoffPlan" } ] }, - "name": { - "type": "string", - "description": "This is the name of the hook, it can be set by the user to identify the hook.\nIf no name is provided, the hook will be auto generated as UUID.\n\n@default UUID", - "maxLength": 1000 - } - }, - "required": [ - "on", - "do" - ] - }, - "CallHookModelResponseTimeout": { - "type": "object", - "properties": { - "on": { + "type": { "type": "string", - "description": "This is the event that triggers this hook", + "description": "This is the detection type to use for voicemail detection.\n- 'audio': Uses native audio models (default)\n- 'transcript': Uses ASR/transcript-based detection\n@default 'audio' (audio detection)", "enum": [ - "model.response.timeout" - ], - "maxLength": 1000 - }, - "do": { - "type": "array", - "description": "This is the set of actions to perform when the hook triggers", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/SayHookAction", - "title": "SayHookAction" - }, - { - "$ref": "#/components/schemas/ToolCallHookAction", - "title": "ToolCallHookAction" - }, - { - "$ref": "#/components/schemas/MessageAddHookAction", - "title": "MessageAddHookAction" - } - ] - } + "audio", + "transcript" + ] } }, "required": [ - "on", - "do" + "provider" ] }, - "AIEdgeCondition": { + "OpenAIVoicemailDetectionPlan": { "type": "object", "properties": { - "type": { + "beepMaxAwaitSeconds": { + "type": "number", + "description": "This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message\n\n- If we detect a voicemail beep before this, we will speak the message at that point.\n\n- Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.\n\n@default 30\n@min 0\n@max 60", + "minimum": 0, + "maximum": 30, + "default": 30 + }, + "provider": { "type": "string", + "description": "This is the provider to use for voicemail detection.", "enum": [ - "ai" + "openai" ] }, - "prompt": { - "type": "string", - "description": "This is the prompt for the AI edge condition. It should evaluate to a boolean.", - "maxLength": 1000 - } - }, - "required": [ - "type", - "prompt" - ] - }, - "Edge": { - "type": "object", - "properties": { - "condition": { - "oneOf": [ + "backoffPlan": { + "description": "This is the backoff plan for the voicemail detection.", + "allOf": [ { - "$ref": "#/components/schemas/AIEdgeCondition", - "title": "AIEdgeCondition" + "$ref": "#/components/schemas/VoicemailDetectionBackoffPlan" } ] }, - "from": { - "type": "string", - "maxLength": 80 - }, - "to": { + "type": { "type": "string", - "maxLength": 80 - }, - "metadata": { - "type": "object", - "description": "This is for metadata you want to store on the edge." + "description": "This is the detection type to use for voicemail detection.\n- 'audio': Uses native audio models (default)\n- 'transcript': Uses ASR/transcript-based detection\n@default 'audio' (audio detection)", + "enum": [ + "audio", + "transcript" + ] } }, "required": [ - "from", - "to" + "provider" ] }, - "RecordingConsentPlanStayOnLine": { + "TwilioVoicemailDetectionPlan": { "type": "object", "properties": { - "message": { + "provider": { "type": "string", - "description": "This is the message asking for consent to record the call.\nIf the type is `stay-on-line`, the message should ask the user to hang up if they do not consent.\nIf the type is `verbal`, the message should ask the user to verbally consent or decline.", - "maxLength": 1000, - "examples": [ - "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", - "This call may be recorded for quality and training purposes. Say \"I agree\" if you consent to being recorded, or \"I disagree\" if you do not consent." + "description": "This is the provider to use for voicemail detection.", + "enum": [ + "twilio" ] }, - "voice": { - "description": "This is the voice to use for the consent message. If not specified, inherits from the assistant's voice.\nUse a different voice for the consent message for a better user experience.", - "oneOf": [ - { - "$ref": "#/components/schemas/AzureVoice", - "title": "AzureVoice" - }, - { - "$ref": "#/components/schemas/CartesiaVoice", - "title": "CartesiaVoice" - }, - { - "$ref": "#/components/schemas/CustomVoice", - "title": "CustomVoice" - }, - { - "$ref": "#/components/schemas/DeepgramVoice", - "title": "DeepgramVoice" - }, - { - "$ref": "#/components/schemas/ElevenLabsVoice", - "title": "ElevenLabsVoice" - }, - { - "$ref": "#/components/schemas/HumeVoice", - "title": "HumeVoice" - }, - { - "$ref": "#/components/schemas/LMNTVoice", - "title": "LMNTVoice" - }, - { - "$ref": "#/components/schemas/NeuphonicVoice", - "title": "NeuphonicVoice" - }, - { - "$ref": "#/components/schemas/OpenAIVoice", - "title": "OpenAIVoice" - }, - { - "$ref": "#/components/schemas/PlayHTVoice", - "title": "PlayHTVoice" - }, - { - "$ref": "#/components/schemas/WellSaidVoice", - "title": "WellSaidVoice" - }, - { - "$ref": "#/components/schemas/RimeAIVoice", - "title": "RimeAIVoice" - }, - { - "$ref": "#/components/schemas/SmallestAIVoice", - "title": "SmallestAIVoice" - }, - { - "$ref": "#/components/schemas/TavusVoice", - "title": "TavusVoice" - }, - { - "$ref": "#/components/schemas/VapiVoice", - "title": "VapiVoice" - }, - { - "$ref": "#/components/schemas/SesameVoice", - "title": "SesameVoice" - }, - { - "$ref": "#/components/schemas/InworldVoice", - "title": "InworldVoice" - }, - { - "$ref": "#/components/schemas/MinimaxVoice", - "title": "MinimaxVoice" - } - ] - }, - "type": { - "type": "string", - "description": "This is the type of recording consent plan. This type assumes consent is granted if the user stays on the line.", + "voicemailDetectionTypes": { + "type": "array", + "description": "These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence'].\n\n@default {Array} ['machine_end_beep', 'machine_end_silence']", "enum": [ - "stay-on-line" + "machine_start", + "human", + "fax", + "unknown", + "machine_end_beep", + "machine_end_silence", + "machine_end_other" ], - "example": "stay-on-line" + "example": [ + "machine_end_beep", + "machine_end_silence" + ], + "items": { + "type": "string", + "enum": [ + "machine_start", + "human", + "fax", + "unknown", + "machine_end_beep", + "machine_end_silence", + "machine_end_other" + ] + } }, - "waitSeconds": { + "enabled": { + "type": "boolean", + "description": "This sets whether the assistant should detect voicemail. Defaults to true.\n\n@default true" + }, + "machineDetectionTimeout": { "type": "number", - "description": "Number of seconds to wait before transferring to the assistant if user stays on the call", - "minimum": 1, - "maximum": 6, - "default": 3, - "example": 3 + "description": "The number of seconds that Twilio should attempt to perform answering machine detection before timing out and returning AnsweredBy as unknown. Default is 30 seconds.\n\nIncreasing this value will provide the engine more time to make a determination. This can be useful when DetectMessageEnd is provided in the MachineDetection parameter and there is an expectation of long answering machine greetings that can exceed 30 seconds.\n\nDecreasing this value will reduce the amount of time the engine has to make a determination. This can be particularly useful when the Enable option is provided in the MachineDetection parameter and you want to limit the time for initial detection.\n\nCheck the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.\n\n@default 30", + "minimum": 3, + "maximum": 59 + }, + "machineDetectionSpeechThreshold": { + "type": "number", + "description": "The number of milliseconds that is used as the measuring stick for the length of the speech activity. Durations lower than this value will be interpreted as a human, longer as a machine. Default is 2400 milliseconds.\n\nIncreasing this value will reduce the chance of a False Machine (detected machine, actually human) for a long human greeting (e.g., a business greeting) but increase the time it takes to detect a machine.\n\nDecreasing this value will reduce the chances of a False Human (detected human, actually machine) for short voicemail greetings. The value of this parameter may need to be reduced by more than 1000ms to detect very short voicemail greetings. A reduction of that significance can result in increased False Machine detections. Adjusting the MachineDetectionSpeechEndThreshold is likely the better approach for short voicemails. Decreasing MachineDetectionSpeechThreshold will also reduce the time it takes to detect a machine.\n\nCheck the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.\n\n@default 2400", + "minimum": 1000, + "maximum": 6000 + }, + "machineDetectionSpeechEndThreshold": { + "type": "number", + "description": "The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Default is 1200 milliseconds.\n\nIncreasing this value will typically be used to better address the short voicemail greeting scenarios. For short voicemails, there is typically 1000-2000ms of audio followed by 1200-2400ms of silence and then additional audio before the beep. Increasing the MachineDetectionSpeechEndThreshold to ~2500ms will treat the 1200-2400ms of silence as a gap in the greeting but not the end of the greeting and will result in a machine detection. The downsides of such a change include:\n- Increasing the delay for human detection by the amount you increase this parameter, e.g., a change of 1200ms to 2500ms increases human detection delay by 1300ms.\n- Cases where a human has two utterances separated by a period of silence (e.g. a \"Hello\", then 2000ms of silence, and another \"Hello\") may be interpreted as a machine.\n\nDecreasing this value will result in faster human detection. The consequence is that it can lead to increased False Human (detected human, actually machine) detections because a silence gap in a voicemail greeting (not necessarily just in short voicemail scenarios) can be incorrectly interpreted as the end of speech.\n\nCheck the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.\n\n@default 1200", + "minimum": 500, + "maximum": 5000 + }, + "machineDetectionSilenceTimeout": { + "type": "number", + "description": "The number of milliseconds of initial silence after which an unknown AnsweredBy result will be returned. Default is 5000 milliseconds.\n\nIncreasing this value will result in waiting for a longer period of initial silence before returning an 'unknown' AMD result.\n\nDecreasing this value will result in waiting for a shorter period of initial silence before returning an 'unknown' AMD result.\n\nCheck the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.\n\n@default 5000", + "minimum": 2000, + "maximum": 10000 } }, "required": [ - "message", - "type" + "provider" ] }, - "RecordingConsentPlanVerbal": { + "VapiVoicemailDetectionPlan": { "type": "object", "properties": { - "message": { + "beepMaxAwaitSeconds": { + "type": "number", + "description": "This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message\n\n- If we detect a voicemail beep before this, we will speak the message at that point.\n\n- Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.\n\n@default 30\n@min 0\n@max 60", + "minimum": 0, + "maximum": 30, + "default": 30 + }, + "provider": { "type": "string", - "description": "This is the message asking for consent to record the call.\nIf the type is `stay-on-line`, the message should ask the user to hang up if they do not consent.\nIf the type is `verbal`, the message should ask the user to verbally consent or decline.", - "maxLength": 1000, - "examples": [ - "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", - "This call may be recorded for quality and training purposes. Say \"I agree\" if you consent to being recorded, or \"I disagree\" if you do not consent." + "description": "This is the provider to use for voicemail detection.", + "enum": [ + "vapi" ] }, - "voice": { - "description": "This is the voice to use for the consent message. If not specified, inherits from the assistant's voice.\nUse a different voice for the consent message for a better user experience.", - "oneOf": [ - { - "$ref": "#/components/schemas/AzureVoice", - "title": "AzureVoice" - }, - { - "$ref": "#/components/schemas/CartesiaVoice", - "title": "CartesiaVoice" - }, - { - "$ref": "#/components/schemas/CustomVoice", - "title": "CustomVoice" - }, - { - "$ref": "#/components/schemas/DeepgramVoice", - "title": "DeepgramVoice" - }, - { - "$ref": "#/components/schemas/ElevenLabsVoice", - "title": "ElevenLabsVoice" - }, - { - "$ref": "#/components/schemas/HumeVoice", - "title": "HumeVoice" - }, - { - "$ref": "#/components/schemas/LMNTVoice", - "title": "LMNTVoice" - }, - { - "$ref": "#/components/schemas/NeuphonicVoice", - "title": "NeuphonicVoice" - }, - { - "$ref": "#/components/schemas/OpenAIVoice", - "title": "OpenAIVoice" - }, - { - "$ref": "#/components/schemas/PlayHTVoice", - "title": "PlayHTVoice" - }, - { - "$ref": "#/components/schemas/WellSaidVoice", - "title": "WellSaidVoice" - }, - { - "$ref": "#/components/schemas/RimeAIVoice", - "title": "RimeAIVoice" - }, - { - "$ref": "#/components/schemas/SmallestAIVoice", - "title": "SmallestAIVoice" - }, - { - "$ref": "#/components/schemas/TavusVoice", - "title": "TavusVoice" - }, - { - "$ref": "#/components/schemas/VapiVoice", - "title": "VapiVoice" - }, - { - "$ref": "#/components/schemas/SesameVoice", - "title": "SesameVoice" - }, - { - "$ref": "#/components/schemas/InworldVoice", - "title": "InworldVoice" - }, + "backoffPlan": { + "description": "This is the backoff plan for the voicemail detection.", + "allOf": [ { - "$ref": "#/components/schemas/MinimaxVoice", - "title": "MinimaxVoice" + "$ref": "#/components/schemas/VoicemailDetectionBackoffPlan" } ] }, "type": { "type": "string", - "description": "This is the type of recording consent plan. This type assumes consent is granted if the user verbally consents or declines.", + "description": "This is the detection type to use for voicemail detection.\n- 'audio': Uses native audio models (default)\n- 'transcript': Uses ASR/transcript-based detection\n@default 'audio' (audio detection)", "enum": [ - "verbal" - ], - "example": "verbal" - }, - "declineTool": { - "type": "object", - "description": "Tool to execute if user verbally declines recording consent" - }, - "declineToolId": { - "type": "string", - "description": "ID of existing tool to execute if user verbally declines recording consent" + "audio", + "transcript" + ] } }, "required": [ - "message", - "type" + "provider" ] }, - "SecurityFilterBase": { - "type": "object", - "properties": {} - }, - "SecurityFilterPlan": { + "TransferHookAction": { "type": "object", "properties": { - "enabled": { - "type": "boolean", - "description": "Whether the security filter is enabled.\n@default false", - "default": false - }, - "filters": { - "description": "Array of security filter types to apply.\nIf array is not empty, only those security filters are run.", - "example": "[{ type: \"sql-injection\" }, { type: \"xss\" }]", - "type": "array", - "items": { - "$ref": "#/components/schemas/SecurityFilterBase" - } - }, - "mode": { + "type": { "type": "string", - "description": "Mode of operation when a security threat is detected.\n- 'sanitize': Remove or replace the threatening content\n- 'reject': Replace the entire transcript with replacement text\n- 'replace': Replace threatening patterns with replacement text\n@default 'sanitize'", + "description": "This is the type of action - must be \"transfer\"", "enum": [ - "sanitize", - "reject", - "replace" - ], - "default": "sanitize" - }, - "replacementText": { - "type": "string", - "description": "Text to use when replacing filtered content.\n@default '[FILTERED]'", - "default": "[FILTERED]" - } - } - }, - "CompliancePlan": { - "type": "object", - "properties": { - "hipaaEnabled": { - "type": "boolean", - "description": "When this is enabled, logs, recordings, and transcriptions will be stored in HIPAA-compliant storage. Defaults to false. Only HIPAA-compliant providers will be available for LLM, Voice, and Transcriber respectively. This setting is only honored if the organization is on an Enterprise subscription or has purchased the HIPAA add-on." - }, - "pciEnabled": { - "type": "boolean", - "description": "When this is enabled, the user will be restricted to use PCI-compliant providers, and no logs or transcripts are stored.\nAt the end of the call, you will receive an end-of-call-report message to store on your server. Defaults to false.", - "example": { - "pciEnabled": false - } - }, - "securityFilterPlan": { - "description": "This is the security filter plan for the assistant. It allows filtering of transcripts for security threats before sending to LLM.", - "allOf": [ - { - "$ref": "#/components/schemas/SecurityFilterPlan" - } + "transfer" ] }, - "recordingConsentPlan": { + "destination": { + "description": "This is the destination details for the transfer - can be a phone number or SIP URI", "oneOf": [ { - "$ref": "#/components/schemas/RecordingConsentPlanStayOnLine", - "title": "RecordingConsentStayOnLinePlan" + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "NumberTransferDestination" }, { - "$ref": "#/components/schemas/RecordingConsentPlanVerbal", - "title": "RecordingConsentPlanVerbal" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "stay-on-line": "#/components/schemas/RecordingConsentPlanStayOnLine", - "verbal": "#/components/schemas/RecordingConsentPlanVerbal" - } - } - } - } - }, - "StructuredDataPlan": { - "type": "object", - "properties": { - "messages": { - "description": "These are the messages used to generate the structured data.\n\n@default: ```\n[\n {\n \"role\": \"system\",\n \"content\": \"You are an expert data extractor. You will be given a transcript of a call. Extract structured data per the JSON Schema. DO NOT return anything except the structured data.\\n\\nJson Schema:\\\\n{{schema}}\\n\\nOnly respond with the JSON.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Here is the transcript:\\n\\n{{transcript}}\\n\\n. Here is the ended reason of the call:\\n\\n{{endedReason}}\\n\\n\"\n }\n]```\n\nYou can customize by providing any messages you want.\n\nHere are the template variables available:\n- {{transcript}}: the transcript of the call from `call.artifact.transcript`- {{systemPrompt}}: the system prompt of the call from `assistant.model.messages[type=system].content`- {{messages}}: the messages of the call from `assistant.model.messages`- {{schema}}: the schema of the structured data from `structuredDataPlan.schema`- {{endedReason}}: the ended reason of the call from `call.endedReason`", - "type": "array", - "items": { - "type": "object" - } - }, - "enabled": { - "type": "boolean", - "description": "This determines whether structured data is generated and stored in `call.analysis.structuredData`. Defaults to false.\n\nUsage:\n- If you want to extract structured data, set this to true and provide a `schema`.\n\n@default false" - }, - "schema": { - "description": "This is the schema of the structured data. The output is stored in `call.analysis.structuredData`.\n\nComplete guide on JSON Schema can be found [here](https://ajv.js.org/json-schema.html#json-data-type).", - "allOf": [ - { - "$ref": "#/components/schemas/JsonSchema" - } - ] - }, - "timeoutSeconds": { - "type": "number", - "description": "This is how long the request is tried before giving up. When request times out, `call.analysis.structuredData` will be empty.\n\nUsage:\n- To guarantee the structured data is generated, set this value high. Note, this will delay the end of call report in cases where model is slow to respond.\n\n@default 5 seconds", - "minimum": 1, - "maximum": 60 - } - } - }, - "StructuredDataMultiPlan": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "This is the key of the structured data plan in the catalog." - }, - "plan": { - "description": "This is an individual structured data plan in the catalog.", - "allOf": [ - { - "$ref": "#/components/schemas/StructuredDataPlan" + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "SipTransferDestination" } ] } }, "required": [ - "key", - "plan" + "type" ] }, - "SuccessEvaluationPlan": { + "FunctionCallHookAction": { "type": "object", "properties": { - "rubric": { - "type": "string", - "enum": [ - "NumericScale", - "DescriptiveScale", - "Checklist", - "Matrix", - "PercentageScale", - "LikertScale", - "AutomaticRubric", - "PassFail" - ], - "description": "This enforces the rubric of the evaluation. The output is stored in `call.analysis.successEvaluation`.\n\nOptions include:\n- 'NumericScale': A scale of 1 to 10.\n- 'DescriptiveScale': A scale of Excellent, Good, Fair, Poor.\n- 'Checklist': A checklist of criteria and their status.\n- 'Matrix': A grid that evaluates multiple criteria across different performance levels.\n- 'PercentageScale': A scale of 0% to 100%.\n- 'LikertScale': A scale of Strongly Agree, Agree, Neutral, Disagree, Strongly Disagree.\n- 'AutomaticRubric': Automatically break down evaluation into several criteria, each with its own score.\n- 'PassFail': A simple 'true' if call passed, 'false' if not.\n\nDefault is 'PassFail'." - }, "messages": { - "description": "These are the messages used to generate the success evaluation.\n\n@default: ```\n[\n {\n \"role\": \"system\",\n \"content\": \"You are an expert call evaluator. You will be given a transcript of a call and the system prompt of the AI participant. Determine if the call was successful based on the objectives inferred from the system prompt. DO NOT return anything except the result.\\n\\nRubric:\\\\n{{rubric}}\\n\\nOnly respond with the result.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Here is the transcript:\\n\\n{{transcript}}\\n\\n\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Here was the system prompt of the call:\\n\\n{{systemPrompt}}\\n\\n. Here is the ended reason of the call:\\n\\n{{endedReason}}\\n\\n\"\n }\n]```\n\nYou can customize by providing any messages you want.\n\nHere are the template variables available:\n- {{transcript}}: the transcript of the call from `call.artifact.transcript`- {{systemPrompt}}: the system prompt of the call from `assistant.model.messages[type=system].content`- {{messages}}: the messages of the call from `assistant.model.messages`- {{rubric}}: the rubric of the success evaluation from `successEvaluationPlan.rubric`- {{endedReason}}: the ended reason of the call from `call.endedReason`", "type": "array", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { - "type": "object" + "oneOf": [ + { + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" + }, + { + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" + }, + { + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" + }, + { + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] } }, - "enabled": { - "type": "boolean", - "description": "This determines whether a success evaluation is generated and stored in `call.analysis.successEvaluation`. Defaults to true.\n\nUsage:\n- If you want to disable the success evaluation, set this to false.\n\n@default true" + "type": { + "type": "string", + "enum": [ + "function" + ], + "description": "The type of tool. \"function\" for Function tool." }, - "timeoutSeconds": { - "type": "number", - "description": "This is how long the request is tried before giving up. When request times out, `call.analysis.successEvaluation` will be empty.\n\nUsage:\n- To guarantee the success evaluation is generated, set this value high. Note, this will delay the end of call report in cases where model is slow to respond.\n\n@default 5 seconds", - "minimum": 1, - "maximum": 60 - } - } - }, - "AnalysisPlan": { - "type": "object", - "properties": { - "minMessagesThreshold": { - "type": "number", - "description": "The minimum number of messages required to run the analysis plan.\nIf the number of messages is less than this, analysis will be skipped.\n\n@default 2", - "deprecated": true, - "minimum": 0 + "async": { + "type": "boolean", + "example": false, + "description": "This determines if the tool is async.\n\n If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.\n\n If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.\n\n Defaults to synchronous (`false`)." }, - "summaryPlan": { - "description": "This is the plan for generating the summary of the call. This outputs to `call.analysis.summary`.", - "deprecated": true, + "server": { + "description": "\n This is the server where a `tool-calls` webhook will be sent.\n\n Notes:\n - Webhook is sent to this server when a tool call is made.\n - Webhook contains the call, assistant, and phone number objects.\n - Webhook contains the variables set on the assistant.\n - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.\n - Webhook expects a response with tool call result.", "allOf": [ { - "$ref": "#/components/schemas/SummaryPlan" + "$ref": "#/components/schemas/Server" } ] }, - "structuredDataPlan": { - "description": "This is the plan for generating the structured data from the call. This outputs to `call.analysis.structuredData`.", - "deprecated": true, + "variableExtractionPlan": { + "description": "Plan to extract variables from the tool response", "allOf": [ { - "$ref": "#/components/schemas/StructuredDataPlan" + "$ref": "#/components/schemas/VariableExtractionPlan" } ] }, - "structuredDataMultiPlan": { - "description": "This is an array of structured data plan catalogs. Each entry includes a `key` and a `plan` for generating the structured data from the call. This outputs to `call.analysis.structuredDataMulti`.", - "deprecated": true, + "parameters": { + "description": "Static key-value pairs merged into the request body. Values support Liquid templates.", "type": "array", "items": { - "$ref": "#/components/schemas/StructuredDataMultiPlan" + "$ref": "#/components/schemas/ToolParameter" } }, - "successEvaluationPlan": { - "description": "This is the plan for generating the success evaluation of the call. This outputs to `call.analysis.successEvaluation`.", - "deprecated": true, + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", "allOf": [ { - "$ref": "#/components/schemas/SuccessEvaluationPlan" + "$ref": "#/components/schemas/ToolRejectionPlan" } ] }, - "outcomeIds": { - "description": "This is an array of outcome UUIDs to be calculated during analysis.\nThe outcomes will be calculated and stored in `call.analysis.outcomes`.", - "deprecated": true, - "type": "array", - "items": { - "type": "string" - } + "function": { + "description": "This is the function definition of the tool.", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAIFunction" + } + ] } - } + }, + "required": [ + "type" + ] }, - "TranscriptPlan": { + "SayHookAction": { "type": "object", "properties": { - "enabled": { - "type": "boolean", - "description": "This determines whether the transcript is stored in `call.artifact.transcript`. Defaults to true.\n\n@default true", - "example": true - }, - "assistantName": { + "type": { "type": "string", - "description": "This is the name of the assistant in the transcript. Defaults to 'AI'.\n\nUsage:\n- If you want to change the name of the assistant in the transcript, set this. Example, here is what the transcript would look like with `assistantName` set to 'Buyer':\n```\nUser: Hello, how are you?\nBuyer: I'm fine.\nUser: Do you want to buy a car?\nBuyer: No.\n```\n\n@default 'AI'" + "description": "This is the type of action - must be \"say\"", + "enum": [ + "say" + ] }, - "userName": { - "type": "string", - "description": "This is the name of the user in the transcript. Defaults to 'User'.\n\nUsage:\n- If you want to change the name of the user in the transcript, set this. Example, here is what the transcript would look like with `userName` set to 'Seller':\n```\nSeller: Hello, how are you?\nAI: I'm fine.\nSeller: Do you want to buy a car?\nAI: No.\n```\n\n@default 'User'" - } - } - }, - "ComplianceOverride": { - "type": "object", - "properties": { - "forceStoreOnHipaaEnabled": { - "type": "boolean", - "description": "Force storage for this output under HIPAA. Only enable if output contains no sensitive data.", - "example": false - } - } - }, - "CreateStructuredOutputDTO": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "This is the type of structured output.\n\n- 'ai': Uses an LLM to extract structured data from the conversation (default).\n- 'regex': Uses a regex pattern to extract data from the transcript without an LLM.\n\nDefaults to 'ai' if not specified.", - "enum": [ - "ai", - "regex" - ], - "default": "ai" - }, - "regex": { - "type": "string", - "description": "This is the regex pattern to match against the transcript.\n\nOnly used when type is 'regex'. Supports both raw patterns (e.g. '\\d+') and\nregex literal format (e.g. '/\\d+/gi'). Uses RE2 syntax for safety.\n\nThe result depends on the schema type:\n- boolean: true if the pattern matches, false otherwise\n- string: the first match or first capture group\n- number/integer: the first match parsed as a number\n- array: all matches", - "minLength": 1, - "maxLength": 1000 - }, - "model": { - "description": "This is the model that will be used to extract the structured output.\n\nTo provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages.\nBetween the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history.\nBetween the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition.\ni.e.:\n`{{structuredOutput}}`\n`{{structuredOutput.name}}`\n`{{structuredOutput.description}}`\n`{{structuredOutput.schema}}`\n\nIf model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts.\nIf messages or required fields are not specified, the default system and user prompts will be used.", + "exact": { + "description": "This is the exact message to say. When a string array is provided, one is randomly selected.", "oneOf": [ { - "$ref": "#/components/schemas/WorkflowOpenAIModel", - "title": "WorkflowOpenAIModel" - }, - { - "$ref": "#/components/schemas/WorkflowAnthropicModel", - "title": "WorkflowAnthropicModel" + "type": "string" }, { - "$ref": "#/components/schemas/WorkflowAnthropicBedrockModel", - "title": "WorkflowAnthropicBedrockModel" - }, + "type": "array", + "items": { + "type": "string" + } + } + ], + "examples": [ + "Are you still there?", + [ + "I didn't catch that.", + "Could you repeat that?", + "Are you still there?" + ] + ] + }, + "prompt": { + "description": "This is the prompt for the assistant to generate a response based on existing conversation.\nCan be a string or an array of chat messages.", + "oneOf": [ { - "$ref": "#/components/schemas/WorkflowGoogleModel", - "title": "WorkflowGoogleModel" + "type": "string", + "title": "String" }, { - "$ref": "#/components/schemas/WorkflowCustomModel", - "title": "WorkflowCustomModel" + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/SystemMessage", + "title": "SystemMessage" + }, + { + "$ref": "#/components/schemas/UserMessage", + "title": "UserMessage" + }, + { + "$ref": "#/components/schemas/AssistantMessage", + "title": "AssistantMessage" + }, + { + "$ref": "#/components/schemas/ToolMessage", + "title": "ToolMessage" + }, + { + "$ref": "#/components/schemas/DeveloperMessage", + "title": "DeveloperMessage" + } + ] + }, + "title": "MessageArray" } + ], + "examples": [ + "Ask the user if they're still in the call", + [ + { + "role": "system", + "content": "You are a helpful assistant, and would like to know if the user is still in the call based on the conversation history in {{transcript}}" + } + ] + ] + } + }, + "required": [ + "type" + ] + }, + "MessageAddHookAction": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the type of action - must be \"message.add\"", + "enum": [ + "message.add" ] }, - "compliancePlan": { - "description": "Compliance configuration for this output. Only enable overrides if no sensitive data will be stored.", + "message": { + "description": "The message to add to the conversation in OpenAI format", "example": { - "forceStoreOnHipaaEnabled": false + "role": "system", + "content": "Context update from hook" }, "allOf": [ { - "$ref": "#/components/schemas/ComplianceOverride" + "$ref": "#/components/schemas/OpenAIMessage" } ] }, - "name": { + "triggerResponseEnabled": { + "type": "boolean", + "description": "Whether to trigger an assistant response after adding the message", + "default": true + } + }, + "required": [ + "type", + "message" + ] + }, + "CallHookFilter": { + "type": "object", + "properties": { + "type": { "type": "string", - "description": "This is the name of the structured output.", - "minLength": 1, - "maxLength": 40 + "description": "This is the type of filter - currently only \"oneOf\" is supported", + "enum": [ + "oneOf" + ], + "maxLength": 1000 }, - "schema": { - "description": "This is the JSON Schema definition for the structured output.\n\nThis is required when creating a structured output. Defines the structure and validation rules for the data that will be extracted. Supports all JSON Schema features including:\n- Objects and nested properties\n- Arrays and array validation\n- String, number, boolean, and null types\n- Enums and const values\n- Validation constraints (min/max, patterns, etc.)\n- Composition with allOf, anyOf, oneOf", - "allOf": [ - { - "$ref": "#/components/schemas/JsonSchema" - } - ] + "key": { + "type": "string", + "description": "This is the key to filter on (e.g. \"call.endedReason\")", + "maxLength": 1000 }, - "description": { + "oneOf": { + "description": "This is the array of possible values to match against", + "type": "array", + "items": { + "type": "string", + "maxLength": 1000 + } + } + }, + "required": [ + "type", + "key", + "oneOf" + ] + }, + "CallHookCallEnding": { + "type": "object", + "properties": { + "on": { "type": "string", - "description": "This is the description of what the structured output extracts.\n\nUse this to provide context about what data will be extracted and how it will be used." + "description": "This is the event that triggers this hook", + "enum": [ + "call.ending" + ], + "maxLength": 1000 }, - "assistantIds": { - "description": "These are the assistant IDs that this structured output is linked to.\n\nWhen linked to assistants, this structured output will be available for extraction during those assistant's calls.", + "do": { "type": "array", + "description": "This is the set of actions to perform when the hook triggers", "items": { - "type": "string" + "oneOf": [ + { + "$ref": "#/components/schemas/ToolCallHookAction", + "title": "ToolCallHookAction" + }, + { + "$ref": "#/components/schemas/MessageAddHookAction", + "title": "MessageAddHookAction" + } + ] } }, - "workflowIds": { - "description": "These are the workflow IDs that this structured output is linked to.\n\nWhen linked to workflows, this structured output will be available for extraction during those workflow's execution.", + "filters": { + "description": "This is the set of filters that must match for the hook to trigger", "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/CallHookFilter" } } }, "required": [ - "name", - "schema" + "on", + "do" ] }, - "ScorecardMetric": { + "CallHookAssistantSpeechInterrupted": { "type": "object", "properties": { - "structuredOutputId": { + "on": { "type": "string", - "description": "This is the unique identifier for the structured output that will be used to evaluate the scorecard.\nThe structured output must be of type number or boolean only for now." + "description": "This is the event that triggers this hook", + "enum": [ + "assistant.speech.interrupted" + ], + "maxLength": 1000 }, - "conditions": { - "description": "These are the conditions that will be used to evaluate the scorecard.\nEach condition will have a comparator, value, and points that will be used to calculate the final score.\nThe points will be added to the overall score if the condition is met.\nThe overall score will be normalized to a 100 point scale to ensure uniformity across different scorecards.", + "do": { "type": "array", + "description": "This is the set of actions to perform when the hook triggers", "items": { - "type": "object" + "oneOf": [ + { + "$ref": "#/components/schemas/SayHookAction", + "title": "SayHookAction" + }, + { + "$ref": "#/components/schemas/ToolCallHookAction", + "title": "ToolCallHookAction" + }, + { + "$ref": "#/components/schemas/MessageAddHookAction", + "title": "MessageAddHookAction" + } + ] } } }, "required": [ - "structuredOutputId", - "conditions" + "on", + "do" ] }, - "CreateScorecardDTO": { + "CallHookCustomerSpeechInterrupted": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "This is the name of the scorecard. It is only for user reference and will not be used for any evaluation.", - "maxLength": 80 - }, - "description": { + "on": { "type": "string", - "description": "This is the description of the scorecard. It is only for user reference and will not be used for any evaluation.", - "maxLength": 500 - }, - "metrics": { - "description": "These are the metrics that will be used to evaluate the scorecard.\nEach metric will have a set of conditions and points that will be used to generate the score.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ScorecardMetric" - } + "description": "This is the event that triggers this hook", + "enum": [ + "customer.speech.interrupted" + ], + "maxLength": 1000 }, - "assistantIds": { - "description": "These are the assistant IDs that this scorecard is linked to.\nWhen linked to assistants, this scorecard will be available for evaluation during those assistants' calls.", + "do": { "type": "array", + "description": "This is the set of actions to perform when the hook triggers", "items": { - "type": "string" + "oneOf": [ + { + "$ref": "#/components/schemas/SayHookAction", + "title": "SayHookAction" + }, + { + "$ref": "#/components/schemas/ToolCallHookAction", + "title": "ToolCallHookAction" + }, + { + "$ref": "#/components/schemas/MessageAddHookAction", + "title": "MessageAddHookAction" + } + ] } } }, "required": [ - "metrics" + "on", + "do" ] }, - "ArtifactPlan": { + "ToolCallHookAction": { "type": "object", "properties": { - "recordingEnabled": { - "type": "boolean", - "description": "This determines whether assistant's calls are recorded. Defaults to true.\n\nUsage:\n- If you don't want to record the calls, set this to false.\n- If you want to record the calls when `assistant.hipaaEnabled` (deprecated) or `assistant.compliancePlan.hipaaEnabled` explicity set this to true and make sure to provide S3 or GCP credentials on the Provider Credentials page in the Dashboard.\n\nYou can find the recording at `call.artifact.recordingUrl` and `call.artifact.stereoRecordingUrl` after the call is ended.\n\n@default true", - "example": true - }, - "recordingFormat": { + "type": { "type": "string", - "description": "This determines the format of the recording. Defaults to `wav;l16`.\n\n@default 'wav;l16'", + "description": "This is the type of action - must be \"tool\"", "enum": [ - "wav;l16", - "mp3" + "tool" ] }, - "recordingUseCustomStorageEnabled": { - "type": "boolean", - "description": "This determines whether to use custom storage (S3 or GCP) for call recordings when storage credentials are configured.\n\nWhen set to false, recordings will be stored on Vapi's storage instead of your custom storage, even if you have custom storage credentials configured.\n\nUsage:\n- Set to false if you have custom storage configured but want to store recordings on Vapi's storage for this assistant.\n- Set to true (or leave unset) to use your custom storage for recordings when available.\n\n@default true", - "example": true - }, - "videoRecordingEnabled": { - "type": "boolean", - "description": "This determines whether the video is recorded during the call. Defaults to false. Only relevant for `webCall` type.\n\nYou can find the video recording at `call.artifact.videoRecordingUrl` after the call is ended.\n\n@default false", - "example": false - }, - "fullMessageHistoryEnabled": { - "type": "boolean", - "description": "This determines whether the artifact contains the full message history, even after handoff context engineering. Defaults to false.", - "example": false - }, - "pcapEnabled": { - "type": "boolean", - "description": "This determines whether the SIP packet capture is enabled. Defaults to true. Only relevant for `phone` type calls where phone number's provider is `vapi` or `byo-phone-number`.\n\nYou can find the packet capture at `call.artifact.pcapUrl` after the call is ended.\n\n@default true", - "example": true - }, - "pcapS3PathPrefix": { - "type": "string", - "description": "This is the path where the SIP packet capture will be uploaded. This is only used if you have provided S3 or GCP credentials on the Provider Credentials page in the Dashboard.\n\nIf credential.s3PathPrefix or credential.bucketPlan.path is set, this will append to it.\n\nUsage:\n- If you want to upload the packet capture to a specific path, set this to the path. Example: `/my-assistant-captures`.\n- If you want to upload the packet capture to the root of the bucket, set this to `/`.\n\n@default '/'", - "example": "/pcaps" - }, - "pcapUseCustomStorageEnabled": { - "type": "boolean", - "description": "This determines whether to use custom storage (S3 or GCP) for SIP packet captures when storage credentials are configured.\n\nWhen set to false, packet captures will be stored on Vapi's storage instead of your custom storage, even if you have custom storage credentials configured.\n\nUsage:\n- Set to false if you have custom storage configured but want to store packet captures on Vapi's storage for this assistant.\n- Set to true (or leave unset) to use your custom storage for packet captures when available.\n\n@default true", - "example": true - }, - "loggingEnabled": { - "type": "boolean", - "description": "This determines whether the call logs are enabled. Defaults to true.\n\n@default true", - "example": true - }, - "loggingUseCustomStorageEnabled": { - "type": "boolean", - "description": "This determines whether to use custom storage (S3 or GCP) for call logs when storage credentials are configured.\n\nWhen set to false, logs will be stored on Vapi's storage instead of your custom storage, even if you have custom storage credentials configured.\n\nUsage:\n- Set to false if you have custom storage configured but want to store logs on Vapi's storage for this assistant.\n- Set to true (or leave unset) to use your custom storage for logs when available.\n\n@default true", - "example": true - }, - "transcriptPlan": { - "description": "This is the plan for `call.artifact.transcript`. To disable, set `transcriptPlan.enabled` to false.", - "allOf": [ + "tool": { + "description": "This is the tool to call. To use an existing tool, send `toolId` instead.", + "oneOf": [ { - "$ref": "#/components/schemas/TranscriptPlan" + "$ref": "#/components/schemas/CreateApiRequestToolDTO", + "title": "ApiRequestTool" + }, + { + "$ref": "#/components/schemas/CreateBashToolDTO", + "title": "BashTool" + }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, + { + "$ref": "#/components/schemas/CreateComputerToolDTO", + "title": "ComputerTool" + }, + { + "$ref": "#/components/schemas/CreateDtmfToolDTO", + "title": "DtmfTool" + }, + { + "$ref": "#/components/schemas/CreateEndCallToolDTO", + "title": "EndCallTool" + }, + { + "$ref": "#/components/schemas/CreateFunctionToolDTO", + "title": "FunctionTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelCalendarAvailabilityToolDTO", + "title": "GoHighLevelCalendarAvailabilityTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelCalendarEventCreateToolDTO", + "title": "GoHighLevelCalendarEventCreateTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelContactCreateToolDTO", + "title": "GoHighLevelContactCreateTool" + }, + { + "$ref": "#/components/schemas/CreateGoHighLevelContactGetToolDTO", + "title": "GoHighLevelContactGetTool" + }, + { + "$ref": "#/components/schemas/CreateGoogleCalendarCheckAvailabilityToolDTO", + "title": "GoogleCalendarCheckAvailabilityTool" + }, + { + "$ref": "#/components/schemas/CreateGoogleCalendarCreateEventToolDTO", + "title": "GoogleCalendarCreateEventTool" + }, + { + "$ref": "#/components/schemas/CreateGoogleSheetsRowAppendToolDTO", + "title": "GoogleSheetsRowAppendTool" + }, + { + "$ref": "#/components/schemas/CreateHandoffToolDTO", + "title": "HandoffTool" + }, + { + "$ref": "#/components/schemas/CreateMcpToolDTO", + "title": "McpTool" + }, + { + "$ref": "#/components/schemas/CreateQueryToolDTO", + "title": "QueryTool" + }, + { + "$ref": "#/components/schemas/CreateSlackSendMessageToolDTO", + "title": "SlackSendMessageTool" + }, + { + "$ref": "#/components/schemas/CreateSmsToolDTO", + "title": "SmsTool" + }, + { + "$ref": "#/components/schemas/CreateTextEditorToolDTO", + "title": "TextEditorTool" + }, + { + "$ref": "#/components/schemas/CreateTransferCallToolDTO", + "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/CreateSipRequestToolDTO", + "title": "SipRequestTool" + }, + { + "$ref": "#/components/schemas/CreateVoicemailToolDTO", + "title": "VoicemailTool" } ] }, - "recordingPath": { - "type": "string", - "description": "This is the path where the recording will be uploaded. This is only used if you have provided S3 or GCP credentials on the Provider Credentials page in the Dashboard.\n\nIf credential.s3PathPrefix or credential.bucketPlan.path is set, this will append to it.\n\nUsage:\n- If you want to upload the recording to a specific path, set this to the path. Example: `/my-assistant-recordings`.\n- If you want to upload the recording to the root of the bucket, set this to `/`.\n\n@default '/'" - }, - "structuredOutputIds": { - "description": "This is an array of structured output IDs to be calculated during the call.\nThe outputs will be extracted and stored in `call.artifact.structuredOutputs` after the call is ended.", - "type": "array", - "items": { - "type": "string" - } - }, - "structuredOutputs": { - "description": "This is an array of transient structured outputs to be calculated during the call.\nThe outputs will be extracted and stored in `call.artifact.structuredOutputs` after the call is ended.\nUse this to provide inline structured output configurations instead of referencing existing ones via structuredOutputIds.", - "type": "array", - "items": { - "$ref": "#/components/schemas/CreateStructuredOutputDTO" - } - }, - "scorecardIds": { - "description": "This is an array of scorecard IDs that will be evaluated based on the structured outputs extracted during the call.\nThe scorecards will be evaluated and the results will be stored in `call.artifact.scorecards` after the call has ended.", - "type": "array", - "items": { - "type": "string" - } - }, - "scorecards": { - "description": "This is the array of scorecards that will be evaluated based on the structured outputs extracted during the call.\nThe scorecards will be evaluated and the results will be stored in `call.artifact.scorecards` after the call has ended.", - "type": "array", - "items": { - "$ref": "#/components/schemas/CreateScorecardDTO" - } - }, - "loggingPath": { + "toolId": { "type": "string", - "description": "This is the path where the call logs will be uploaded. This is only used if you have provided S3 or GCP credentials on the Provider Credentials page in the Dashboard.\n\nIf credential.s3PathPrefix or credential.bucketPlan.path is set, this will append to it.\n\nUsage:\n- If you want to upload the call logs to a specific path, set this to the path. Example: `/my-assistant-logs`.\n- If you want to upload the call logs to the root of the bucket, set this to `/`.\n\n@default '/'" + "description": "This is the tool to call. To use a transient tool, send `tool` instead." } - } + }, + "required": [ + "type" + ] }, - "StopSpeakingPlan": { + "CustomerSpeechTimeoutOptions": { "type": "object", "properties": { - "numWords": { - "type": "number", - "description": "This is the number of words that the customer has to say before the assistant will stop talking.\n\nWords like \"stop\", \"actually\", \"no\", etc. will always interrupt immediately regardless of this value.\n\nWords like \"okay\", \"yeah\", \"right\" will never interrupt.\n\nWhen set to 0, `voiceSeconds` is used in addition to the transcriptions to determine the customer has started speaking.\n\nDefaults to 0.\n\n@default 0", - "minimum": 0, - "maximum": 10, - "example": 0 + "triggerResetMode": { + "type": "string", + "description": "This is whether the counter for hook trigger resets the user speaks.\n\n@default never", + "enum": [ + "onUserSpeech", + "never" + ] }, - "voiceSeconds": { + "timeoutSeconds": { "type": "number", - "description": "This is the seconds customer has to speak before the assistant stops talking. This uses the VAD (Voice Activity Detection) spike to determine if the customer has started speaking.\n\nConsiderations:\n- A lower value might be more responsive but could potentially pick up non-speech sounds.\n- A higher value reduces false positives but might slightly delay the detection of speech onset.\n\nThis is only used if `numWords` is set to 0.\n\nDefaults to 0.2\n\n@default 0.2", - "minimum": 0, - "maximum": 0.5, - "example": 0.2 + "description": "This is the timeout in seconds before action is triggered.\nThe clock starts when the assistant finishes speaking and remains active until the user speaks.\n\n@default 7.5\n@minimum 2\n@maximum 1000", + "minimum": 1, + "maximum": 1000 }, - "backoffSeconds": { + "triggerMaxCount": { "type": "number", - "description": "This is the seconds to wait before the assistant will start talking again after being interrupted.\n\nDefaults to 1.\n\n@default 1", - "minimum": 0, - "maximum": 10, - "example": 1 - }, - "acknowledgementPhrases": { - "description": "These are the phrases that will never interrupt the assistant, even if numWords threshold is met.\nThese are typically acknowledgement or backchanneling phrases.", - "example": [ - "i understand", - "i see", - "i got it", - "i hear you", - "im listening", - "im with you", - "right", - "okay", - "ok", - "sure", - "alright", - "got it", - "understood", - "yeah", - "yes", - "uh-huh", - "mm-hmm", - "gotcha", - "mhmm", - "ah", - "yeah okay", - "yeah sure" - ], - "default": [ - "i understand", - "i see", - "i got it", - "i hear you", - "im listening", - "im with you", - "right", - "okay", - "ok", - "sure", - "alright", - "got it", - "understood", - "yeah", - "yes", - "uh-huh", - "mm-hmm", - "gotcha", - "mhmm", - "ah", - "yeah okay", - "yeah sure" - ], - "type": "array", - "items": { - "type": "string", - "maxLength": 240 - } - }, - "interruptionPhrases": { - "description": "These are the phrases that will always interrupt the assistant immediately, regardless of numWords.\nThese are typically phrases indicating disagreement or desire to stop.", - "example": [ - "stop", - "shut", - "up", - "enough", - "quiet", - "silence", - "but", - "dont", - "not", - "no", - "hold", - "wait", - "cut", - "pause", - "nope", - "nah", - "nevermind", - "never", - "bad", - "actually" - ], - "default": [ - "stop", - "shut", - "up", - "enough", - "quiet", - "silence", - "but", - "dont", - "not", - "no", - "hold", - "wait", - "cut", - "pause", - "nope", - "nah", - "nevermind", - "never", - "bad", - "actually" - ], - "type": "array", - "items": { - "type": "string", - "maxLength": 240 - } + "description": "This is the maximum number of times the hook will trigger in a call.\n\n@default 3", + "minimum": 1, + "maximum": 10 } - } + }, + "required": [ + "timeoutSeconds" + ] }, - "MonitorPlan": { + "CallHookCustomerSpeechTimeout": { "type": "object", "properties": { - "listenEnabled": { - "type": "boolean", - "description": "This determines whether the assistant's calls allow live listening. Defaults to true.\n\nFetch `call.monitor.listenUrl` to get the live listening URL.\n\n@default true", - "example": false - }, - "listenAuthenticationEnabled": { - "type": "boolean", - "description": "This enables authentication on the `call.monitor.listenUrl`.\n\nIf `listenAuthenticationEnabled` is `true`, the `call.monitor.listenUrl` will require an `Authorization: Bearer ` header.\n\n@default false", - "example": false - }, - "controlEnabled": { - "type": "boolean", - "description": "This determines whether the assistant's calls allow live control. Defaults to true.\n\nFetch `call.monitor.controlUrl` to get the live control URL.\n\nTo use, send any control message via a POST request to `call.monitor.controlUrl`. Here are the types of controls supported: https://docs.vapi.ai/api-reference/messages/client-inbound-message\n\n@default true", - "example": false - }, - "controlAuthenticationEnabled": { - "type": "boolean", - "description": "This enables authentication on the `call.monitor.controlUrl`.\n\nIf `controlAuthenticationEnabled` is `true`, the `call.monitor.controlUrl` will require an `Authorization: Bearer ` header.\n\n@default false", - "example": false + "on": { + "type": "string", + "description": "Must be either \"customer.speech.timeout\" or match the pattern \"customer.speech.timeout[property=value]\"", + "maxLength": 1000 }, - "monitorIds": { - "description": "This the set of monitor ids that are attached to the assistant.\nThe source of truth for the monitor ids is the assistant_monitor join table.\nThis field can be used for transient assistants and to update assistants with new monitor ids.\n\n@default []", - "example": [ - "123e4567-e89b-12d3-a456-426614174000" - ], + "do": { "type": "array", + "description": "This is the set of actions to perform when the hook triggers", "items": { - "type": "string" + "oneOf": [ + { + "$ref": "#/components/schemas/SayHookAction", + "title": "SayHookAction" + }, + { + "$ref": "#/components/schemas/ToolCallHookAction", + "title": "ToolCallHookAction" + }, + { + "$ref": "#/components/schemas/MessageAddHookAction", + "title": "MessageAddHookAction" + } + ] } - } - } - }, - "KeypadInputPlan": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "This keeps track of whether the user has enabled keypad input.\nBy default, it is off.\n\n@default false" }, - "timeoutSeconds": { - "type": "number", - "description": "This is the time in seconds to wait before processing the input.\nIf the input is not received within this time, the input will be ignored.\nIf set to \"off\", the input will be processed when the user enters a delimiter or immediately if no delimiter is used.\n\n@default 2", - "minimum": 0, - "maximum": 10 + "options": { + "description": "This is the set of filters that must match for the hook to trigger", + "allOf": [ + { + "$ref": "#/components/schemas/CustomerSpeechTimeoutOptions" + } + ] }, - "delimiters": { + "name": { "type": "string", - "description": "This is the delimiter(s) that will be used to process the input.\nCan be '#', '*', or an empty array.", - "enum": [ - "#", - "*", - "" - ] + "description": "This is the name of the hook, it can be set by the user to identify the hook.\nIf no name is provided, the hook will be auto generated as UUID.\n\n@default UUID", + "maxLength": 1000 } - } + }, + "required": [ + "on", + "do" + ] }, - "WorkflowUserEditable": { + "CallHookModelResponseTimeout": { "type": "object", "properties": { - "nodes": { + "on": { + "type": "string", + "description": "This is the event that triggers this hook", + "enum": [ + "model.response.timeout" + ], + "maxLength": 1000 + }, + "do": { "type": "array", + "description": "This is the set of actions to perform when the hook triggers", "items": { "oneOf": [ { - "$ref": "#/components/schemas/ConversationNode", - "title": "ConversationNode" + "$ref": "#/components/schemas/SayHookAction", + "title": "SayHookAction" }, { - "$ref": "#/components/schemas/ToolNode", - "title": "ToolNode" + "$ref": "#/components/schemas/ToolCallHookAction", + "title": "ToolCallHookAction" + }, + { + "$ref": "#/components/schemas/MessageAddHookAction", + "title": "MessageAddHookAction" } ] } + } + }, + "required": [ + "on", + "do" + ] + }, + "AIEdgeCondition": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "ai" + ] }, - "model": { - "description": "This is the model for the workflow.\n\nThis can be overridden at node level using `nodes[n].model`.", + "prompt": { + "type": "string", + "description": "This is the prompt for the AI edge condition. It should evaluate to a boolean.", + "maxLength": 1000 + } + }, + "required": [ + "type", + "prompt" + ] + }, + "Edge": { + "type": "object", + "properties": { + "condition": { "oneOf": [ { - "$ref": "#/components/schemas/WorkflowOpenAIModel", - "title": "WorkflowOpenAIModel" + "$ref": "#/components/schemas/AIEdgeCondition", + "title": "AIEdgeCondition" + } + ] + }, + "from": { + "type": "string", + "maxLength": 80 + }, + "to": { + "type": "string", + "maxLength": 80 + }, + "metadata": { + "type": "object", + "description": "This is for metadata you want to store on the edge." + } + }, + "required": [ + "from", + "to" + ] + }, + "RecordingConsentPlanStayOnLine": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "This is the message asking for consent to record the call.\nIf the type is `stay-on-line`, the message should ask the user to hang up if they do not consent.\nIf the type is `verbal`, the message should ask the user to verbally consent or decline.", + "maxLength": 1000, + "examples": [ + "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", + "This call may be recorded for quality and training purposes. Say \"I agree\" if you consent to being recorded, or \"I disagree\" if you do not consent." + ] + }, + "voice": { + "description": "This is the voice to use for the consent message. If not specified, inherits from the assistant's voice.\nUse a different voice for the consent message for a better user experience.", + "oneOf": [ + { + "$ref": "#/components/schemas/AzureVoice", + "title": "AzureVoice" }, { - "$ref": "#/components/schemas/WorkflowAnthropicModel", - "title": "WorkflowAnthropicModel" + "$ref": "#/components/schemas/CartesiaVoice", + "title": "CartesiaVoice" }, { - "$ref": "#/components/schemas/WorkflowAnthropicBedrockModel", - "title": "WorkflowAnthropicBedrockModel" + "$ref": "#/components/schemas/CustomVoice", + "title": "CustomVoice" }, { - "$ref": "#/components/schemas/WorkflowGoogleModel", - "title": "WorkflowGoogleModel" + "$ref": "#/components/schemas/DeepgramVoice", + "title": "DeepgramVoice" }, { - "$ref": "#/components/schemas/WorkflowCustomModel", - "title": "WorkflowCustomModel" - } - ] - }, - "transcriber": { - "description": "This is the transcriber for the workflow.\n\nThis can be overridden at node level using `nodes[n].transcriber`.", - "oneOf": [ + "$ref": "#/components/schemas/ElevenLabsVoice", + "title": "ElevenLabsVoice" + }, { - "$ref": "#/components/schemas/AssemblyAITranscriber", - "title": "AssemblyAITranscriber" + "$ref": "#/components/schemas/HumeVoice", + "title": "HumeVoice" }, { - "$ref": "#/components/schemas/AzureSpeechTranscriber", - "title": "AzureSpeechTranscriber" + "$ref": "#/components/schemas/LMNTVoice", + "title": "LMNTVoice" }, { - "$ref": "#/components/schemas/CustomTranscriber", - "title": "CustomTranscriber" + "$ref": "#/components/schemas/NeuphonicVoice", + "title": "NeuphonicVoice" }, { - "$ref": "#/components/schemas/DeepgramTranscriber", - "title": "DeepgramTranscriber" + "$ref": "#/components/schemas/OpenAIVoice", + "title": "OpenAIVoice" }, { - "$ref": "#/components/schemas/ElevenLabsTranscriber", - "title": "ElevenLabsTranscriber" + "$ref": "#/components/schemas/PlayHTVoice", + "title": "PlayHTVoice" }, { - "$ref": "#/components/schemas/GladiaTranscriber", - "title": "GladiaTranscriber" + "$ref": "#/components/schemas/WellSaidVoice", + "title": "WellSaidVoice" }, { - "$ref": "#/components/schemas/GoogleTranscriber", - "title": "GoogleTranscriber" + "$ref": "#/components/schemas/RimeAIVoice", + "title": "RimeAIVoice" }, { - "$ref": "#/components/schemas/SpeechmaticsTranscriber", - "title": "SpeechmaticsTranscriber" + "$ref": "#/components/schemas/SmallestAIVoice", + "title": "SmallestAIVoice" }, { - "$ref": "#/components/schemas/TalkscriberTranscriber", - "title": "TalkscriberTranscriber" + "$ref": "#/components/schemas/TavusVoice", + "title": "TavusVoice" }, { - "$ref": "#/components/schemas/OpenAITranscriber", - "title": "OpenAITranscriber" + "$ref": "#/components/schemas/VapiVoice", + "title": "VapiVoice" }, { - "$ref": "#/components/schemas/CartesiaTranscriber", - "title": "CartesiaTranscriber" + "$ref": "#/components/schemas/SesameVoice", + "title": "SesameVoice" }, { - "$ref": "#/components/schemas/SonioxTranscriber", - "title": "SonioxTranscriber" + "$ref": "#/components/schemas/InworldVoice", + "title": "InworldVoice" + }, + { + "$ref": "#/components/schemas/MinimaxVoice", + "title": "MinimaxVoice" + }, + { + "$ref": "#/components/schemas/XaiVoice", + "title": "XaiVoice" + }, + { + "$ref": "#/components/schemas/MicrosoftVoice", + "title": "MicrosoftVoice" } ] }, + "firstMessageMode": { + "type": "string", + "description": "This controls whether the consent assistant speaks first or waits for the caller to speak first.\n\nUse:\n- `assistant-speaks-first` (default) to have the consent assistant play the consent message as soon as the call is answered.\n- `assistant-waits-for-user` to have the consent assistant wait for the caller to speak before playing the consent message.\n\nWe strongly recommend `assistant-waits-for-user` for outbound calls. Some telephony providers signal \"answered\" while the line is still ringing, which can cause the consent message to play into a ringing line and be missed by the caller. Waiting for the caller to speak first guarantees they hear the full consent message.\n\nNote: when combined with `type: 'stay-on-line'`, silence only counts toward consent after the caller has spoken at least once.\n\n@default 'assistant-speaks-first'", + "enum": [ + "assistant-speaks-first", + "assistant-waits-for-user" + ], + "default": "assistant-speaks-first", + "example": "assistant-speaks-first" + }, + "type": { + "type": "string", + "description": "This is the type of recording consent plan. This type assumes consent is granted if the user stays on the line.", + "enum": [ + "stay-on-line" + ], + "example": "stay-on-line" + }, + "waitSeconds": { + "type": "number", + "description": "Number of seconds to wait before transferring to the assistant if user stays on the call", + "minimum": 1, + "maximum": 6, + "default": 3, + "example": 3 + } + }, + "required": [ + "message", + "type" + ] + }, + "RecordingConsentPlanVerbal": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "This is the message asking for consent to record the call.\nIf the type is `stay-on-line`, the message should ask the user to hang up if they do not consent.\nIf the type is `verbal`, the message should ask the user to verbally consent or decline.", + "maxLength": 1000, + "examples": [ + "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.", + "This call may be recorded for quality and training purposes. Say \"I agree\" if you consent to being recorded, or \"I disagree\" if you do not consent." + ] + }, "voice": { - "description": "This is the voice for the workflow.\n\nThis can be overridden at node level using `nodes[n].voice`.", + "description": "This is the voice to use for the consent message. If not specified, inherits from the assistant's voice.\nUse a different voice for the consent message for a better user experience.", "oneOf": [ { "$ref": "#/components/schemas/AzureVoice", @@ -19651,30 +20999,1031 @@ { "$ref": "#/components/schemas/MinimaxVoice", "title": "MinimaxVoice" + }, + { + "$ref": "#/components/schemas/XaiVoice", + "title": "XaiVoice" + }, + { + "$ref": "#/components/schemas/MicrosoftVoice", + "title": "MicrosoftVoice" } ] }, - "observabilityPlan": { - "description": "This is the plan for observability of workflow's calls.\n\nCurrently, only Langfuse is supported.", - "oneOf": [ - { - "$ref": "#/components/schemas/LangfuseObservabilityPlan", - "title": "Langfuse" - } + "firstMessageMode": { + "type": "string", + "description": "This controls whether the consent assistant speaks first or waits for the caller to speak first.\n\nUse:\n- `assistant-speaks-first` (default) to have the consent assistant play the consent message as soon as the call is answered.\n- `assistant-waits-for-user` to have the consent assistant wait for the caller to speak before playing the consent message.\n\nWe strongly recommend `assistant-waits-for-user` for outbound calls. Some telephony providers signal \"answered\" while the line is still ringing, which can cause the consent message to play into a ringing line and be missed by the caller. Waiting for the caller to speak first guarantees they hear the full consent message.\n\nNote: when combined with `type: 'stay-on-line'`, silence only counts toward consent after the caller has spoken at least once.\n\n@default 'assistant-speaks-first'", + "enum": [ + "assistant-speaks-first", + "assistant-waits-for-user" + ], + "default": "assistant-speaks-first", + "example": "assistant-speaks-first" + }, + "type": { + "type": "string", + "description": "This is the type of recording consent plan. This type assumes consent is granted if the user verbally consents or declines.", + "enum": [ + "verbal" + ], + "example": "verbal" + }, + "declineTool": { + "type": "object", + "description": "Tool to execute if user verbally declines recording consent" + }, + "declineToolId": { + "type": "string", + "description": "ID of existing tool to execute if user verbally declines recording consent" + } + }, + "required": [ + "message", + "type" + ] + }, + "SecurityFilterBase": { + "type": "object", + "properties": {} + }, + "SecurityFilterPlan": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether the security filter is enabled.\n@default false", + "default": false + }, + "filters": { + "description": "Array of security filter types to apply.\nIf array is not empty, only those security filters are run.", + "example": "[{ type: \"sql-injection\" }, { type: \"xss\" }]", + "type": "array", + "items": { + "$ref": "#/components/schemas/SecurityFilterBase" + } + }, + "mode": { + "type": "string", + "description": "Mode of operation when a security threat is detected.\n- 'sanitize': Remove or replace the threatening content\n- 'reject': Replace the entire transcript with replacement text\n- 'replace': Replace threatening patterns with replacement text\n@default 'sanitize'", + "enum": [ + "sanitize", + "reject", + "replace" ], + "default": "sanitize" + }, + "replacementText": { + "type": "string", + "description": "Text to use when replacing filtered content.\n@default '[FILTERED]'", + "default": "[FILTERED]" + } + } + }, + "CompliancePlan": { + "type": "object", + "properties": { + "hipaaEnabled": { + "type": "boolean", + "description": "When this is enabled, logs, recordings, and transcriptions will be stored in HIPAA-compliant storage. Defaults to false. Only HIPAA-compliant providers will be available for LLM, Voice, and Transcriber respectively. This setting is only honored if the organization is on an Enterprise subscription or has purchased the HIPAA add-on." + }, + "pciEnabled": { + "type": "boolean", + "description": "When this is enabled, the user will be restricted to use PCI-compliant providers, and no logs or transcripts are stored.\nAt the end of the call, you will receive an end-of-call-report message to store on your server. Defaults to false.", + "example": { + "pciEnabled": false + } + }, + "securityFilterPlan": { + "description": "This is the security filter plan for the assistant. It allows filtering of transcripts for security threats before sending to LLM.", "allOf": [ { - "$ref": "#/components/schemas/LangfuseObservabilityPlan" + "$ref": "#/components/schemas/SecurityFilterPlan" } ] }, - "backgroundSound": { - "description": "This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.\nYou can also provide a custom sound by providing a URL to an audio file.", + "recordingConsentPlan": { "oneOf": [ { - "type": "enum", - "enum": [ - "off", + "$ref": "#/components/schemas/RecordingConsentPlanStayOnLine", + "title": "RecordingConsentStayOnLinePlan" + }, + { + "$ref": "#/components/schemas/RecordingConsentPlanVerbal", + "title": "RecordingConsentPlanVerbal" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "stay-on-line": "#/components/schemas/RecordingConsentPlanStayOnLine", + "verbal": "#/components/schemas/RecordingConsentPlanVerbal" + } + } + } + } + }, + "StructuredDataPlan": { + "type": "object", + "properties": { + "messages": { + "description": "These are the messages used to generate the structured data.\n\n@default: ```\n[\n {\n \"role\": \"system\",\n \"content\": \"You are an expert data extractor. You will be given a transcript of a call. Extract structured data per the JSON Schema. DO NOT return anything except the structured data.\\n\\nJson Schema:\\\\n{{schema}}\\n\\nOnly respond with the JSON.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Here is the transcript:\\n\\n{{transcript}}\\n\\n. Here is the ended reason of the call:\\n\\n{{endedReason}}\\n\\n\"\n }\n]```\n\nYou can customize by providing any messages you want.\n\nHere are the template variables available:\n- {{transcript}}: the transcript of the call from `call.artifact.transcript`- {{systemPrompt}}: the system prompt of the call from `assistant.model.messages[type=system].content`- {{messages}}: the messages of the call from `assistant.model.messages`- {{schema}}: the schema of the structured data from `structuredDataPlan.schema`- {{endedReason}}: the ended reason of the call from `call.endedReason`", + "type": "array", + "items": { + "type": "object" + } + }, + "enabled": { + "type": "boolean", + "description": "This determines whether structured data is generated and stored in `call.analysis.structuredData`. Defaults to false.\n\nUsage:\n- If you want to extract structured data, set this to true and provide a `schema`.\n\n@default false" + }, + "schema": { + "description": "This is the schema of the structured data. The output is stored in `call.analysis.structuredData`.\n\nComplete guide on JSON Schema can be found [here](https://ajv.js.org/json-schema.html#json-data-type).", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] + }, + "timeoutSeconds": { + "type": "number", + "description": "This is how long the request is tried before giving up. When request times out, `call.analysis.structuredData` will be empty.\n\nUsage:\n- To guarantee the structured data is generated, set this value high. Note, this will delay the end of call report in cases where model is slow to respond.\n\n@default 5 seconds", + "minimum": 1, + "maximum": 60 + } + } + }, + "StructuredDataMultiPlan": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "This is the key of the structured data plan in the catalog." + }, + "plan": { + "description": "This is an individual structured data plan in the catalog.", + "allOf": [ + { + "$ref": "#/components/schemas/StructuredDataPlan" + } + ] + } + }, + "required": [ + "key", + "plan" + ] + }, + "SuccessEvaluationPlan": { + "type": "object", + "properties": { + "rubric": { + "type": "string", + "enum": [ + "NumericScale", + "DescriptiveScale", + "Checklist", + "Matrix", + "PercentageScale", + "LikertScale", + "AutomaticRubric", + "PassFail" + ], + "description": "This enforces the rubric of the evaluation. The output is stored in `call.analysis.successEvaluation`.\n\nOptions include:\n- 'NumericScale': A scale of 1 to 10.\n- 'DescriptiveScale': A scale of Excellent, Good, Fair, Poor.\n- 'Checklist': A checklist of criteria and their status.\n- 'Matrix': A grid that evaluates multiple criteria across different performance levels.\n- 'PercentageScale': A scale of 0% to 100%.\n- 'LikertScale': A scale of Strongly Agree, Agree, Neutral, Disagree, Strongly Disagree.\n- 'AutomaticRubric': Automatically break down evaluation into several criteria, each with its own score.\n- 'PassFail': A simple 'true' if call passed, 'false' if not.\n\nDefault is 'PassFail'." + }, + "messages": { + "description": "These are the messages used to generate the success evaluation.\n\n@default: ```\n[\n {\n \"role\": \"system\",\n \"content\": \"You are an expert call evaluator. You will be given a transcript of a call and the system prompt of the AI participant. Determine if the call was successful based on the objectives inferred from the system prompt. DO NOT return anything except the result.\\n\\nRubric:\\\\n{{rubric}}\\n\\nOnly respond with the result.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Here is the transcript:\\n\\n{{transcript}}\\n\\n\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Here was the system prompt of the call:\\n\\n{{systemPrompt}}\\n\\n. Here is the ended reason of the call:\\n\\n{{endedReason}}\\n\\n\"\n }\n]```\n\nYou can customize by providing any messages you want.\n\nHere are the template variables available:\n- {{transcript}}: the transcript of the call from `call.artifact.transcript`- {{systemPrompt}}: the system prompt of the call from `assistant.model.messages[type=system].content`- {{messages}}: the messages of the call from `assistant.model.messages`- {{rubric}}: the rubric of the success evaluation from `successEvaluationPlan.rubric`- {{endedReason}}: the ended reason of the call from `call.endedReason`", + "type": "array", + "items": { + "type": "object" + } + }, + "enabled": { + "type": "boolean", + "description": "This determines whether a success evaluation is generated and stored in `call.analysis.successEvaluation`. Defaults to true.\n\nUsage:\n- If you want to disable the success evaluation, set this to false.\n\n@default true" + }, + "timeoutSeconds": { + "type": "number", + "description": "This is how long the request is tried before giving up. When request times out, `call.analysis.successEvaluation` will be empty.\n\nUsage:\n- To guarantee the success evaluation is generated, set this value high. Note, this will delay the end of call report in cases where model is slow to respond.\n\n@default 5 seconds", + "minimum": 1, + "maximum": 60 + } + } + }, + "AnalysisPlan": { + "type": "object", + "properties": { + "minMessagesThreshold": { + "type": "number", + "description": "The minimum number of messages required to run the analysis plan.\nIf the number of messages is less than this, analysis will be skipped.\n\n@default 2", + "deprecated": true, + "minimum": 0 + }, + "summaryPlan": { + "description": "This is the plan for generating the summary of the call. This outputs to `call.analysis.summary`.", + "deprecated": true, + "allOf": [ + { + "$ref": "#/components/schemas/SummaryPlan" + } + ] + }, + "structuredDataPlan": { + "description": "This is the plan for generating the structured data from the call. This outputs to `call.analysis.structuredData`.", + "deprecated": true, + "allOf": [ + { + "$ref": "#/components/schemas/StructuredDataPlan" + } + ] + }, + "structuredDataMultiPlan": { + "description": "This is an array of structured data plan catalogs. Each entry includes a `key` and a `plan` for generating the structured data from the call. This outputs to `call.analysis.structuredDataMulti`.", + "deprecated": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/StructuredDataMultiPlan" + } + }, + "successEvaluationPlan": { + "description": "This is the plan for generating the success evaluation of the call. This outputs to `call.analysis.successEvaluation`.", + "deprecated": true, + "allOf": [ + { + "$ref": "#/components/schemas/SuccessEvaluationPlan" + } + ] + }, + "outcomeIds": { + "description": "This is an array of outcome UUIDs to be calculated during analysis.\nThe outcomes will be calculated and stored in `call.analysis.outcomes`.", + "deprecated": true, + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "TranscriptPlan": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "This determines whether the transcript is stored in `call.artifact.transcript`. Defaults to true.\n\n@default true", + "example": true + }, + "assistantName": { + "type": "string", + "description": "This is the name of the assistant in the transcript. Defaults to 'AI'.\n\nUsage:\n- If you want to change the name of the assistant in the transcript, set this. Example, here is what the transcript would look like with `assistantName` set to 'Buyer':\n```\nUser: Hello, how are you?\nBuyer: I'm fine.\nUser: Do you want to buy a car?\nBuyer: No.\n```\n\n@default 'AI'" + }, + "userName": { + "type": "string", + "description": "This is the name of the user in the transcript. Defaults to 'User'.\n\nUsage:\n- If you want to change the name of the user in the transcript, set this. Example, here is what the transcript would look like with `userName` set to 'Seller':\n```\nSeller: Hello, how are you?\nAI: I'm fine.\nSeller: Do you want to buy a car?\nAI: No.\n```\n\n@default 'User'" + } + } + }, + "ComplianceOverride": { + "type": "object", + "properties": { + "forceStoreOnHipaaEnabled": { + "type": "boolean", + "description": "Force storage for this output under HIPAA. Only enable if output contains no sensitive data.", + "example": false + } + } + }, + "CreateStructuredOutputDTO": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the type of structured output.\n\n- 'ai': Uses an LLM to extract structured data from the conversation (default).\n- 'regex': Uses a regex pattern to extract data from the transcript without an LLM.\n\nDefaults to 'ai' if not specified.", + "enum": [ + "ai", + "regex" + ], + "default": "ai" + }, + "regex": { + "type": "string", + "description": "This is the regex pattern to match against the transcript.\n\nOnly used when type is 'regex'. Supports both raw patterns (e.g. '\\d+') and\nregex literal format (e.g. '/\\d+/gi'). Uses RE2 syntax for safety.\n\nThe result depends on the schema type:\n- boolean: true if the pattern matches, false otherwise\n- string: the first match or first capture group\n- number/integer: the first match parsed as a number\n- array: all matches", + "minLength": 1, + "maxLength": 1000 + }, + "model": { + "description": "This is the model that will be used to extract the structured output.\n\nTo provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages.\nBetween the system or user messages, you must reference either 'transcript' or 'messages' with the `{{}}` syntax to access the conversation history.\nBetween the system or user messages, you must reference a variation of the structured output with the `{{}}` syntax to access the structured output definition.\ni.e.:\n`{{structuredOutput}}`\n`{{structuredOutput.name}}`\n`{{structuredOutput.description}}`\n`{{structuredOutput.schema}}`\n\nIf model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts.\nIf messages or required fields are not specified, the default system and user prompts will be used.", + "oneOf": [ + { + "$ref": "#/components/schemas/WorkflowOpenAIModel", + "title": "WorkflowOpenAIModel" + }, + { + "$ref": "#/components/schemas/WorkflowAnthropicModel", + "title": "WorkflowAnthropicModel" + }, + { + "$ref": "#/components/schemas/WorkflowAnthropicBedrockModel", + "title": "WorkflowAnthropicBedrockModel" + }, + { + "$ref": "#/components/schemas/WorkflowGoogleModel", + "title": "WorkflowGoogleModel" + }, + { + "$ref": "#/components/schemas/WorkflowCustomModel", + "title": "WorkflowCustomModel" + } + ] + }, + "compliancePlan": { + "description": "Compliance configuration for this output. Only enable overrides if no sensitive data will be stored.", + "example": { + "forceStoreOnHipaaEnabled": false + }, + "allOf": [ + { + "$ref": "#/components/schemas/ComplianceOverride" + } + ] + }, + "name": { + "type": "string", + "description": "This is the name of the structured output.", + "minLength": 1, + "maxLength": 40 + }, + "schema": { + "description": "This is the JSON Schema definition for the structured output.\n\nThis is required when creating a structured output. Defines the structure and validation rules for the data that will be extracted. Supports all JSON Schema features including:\n- Objects and nested properties\n- Arrays and array validation\n- String, number, boolean, and null types\n- Enums and const values\n- Validation constraints (min/max, patterns, etc.)\n- Composition with allOf, anyOf, oneOf", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] + }, + "description": { + "type": "string", + "description": "This is the description of what the structured output extracts.\n\nUse this to provide context about what data will be extracted and how it will be used." + }, + "assistantIds": { + "description": "These are the assistant IDs that this structured output is linked to.\n\nWhen linked to assistants, this structured output will be available for extraction during those assistant's calls.", + "type": "array", + "items": { + "type": "string" + } + }, + "workflowIds": { + "description": "These are the workflow IDs that this structured output is linked to.\n\nWhen linked to workflows, this structured output will be available for extraction during those workflow's execution.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "name", + "schema" + ] + }, + "NumberComparatorScorecardMetricCondition": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the type of the condition. Currently only 'comparator' is supported.", + "enum": [ + "comparator" + ] + }, + "comparator": { + "type": "string", + "description": "This is the comparator that will be used to compare the result of the structured output with the value specified.\nOnly '=', '!=', '>', '<', '>=', and '<=' are supported for number conditions\nOnly '=' is supported for boolean conditions.", + "enum": [ + "=", + "!=", + ">", + "<", + ">=", + "<=" + ] + }, + "value": { + "type": "number", + "description": "This is the value that will be used to compare the result of the structured output with the comparator.\nIf the result of the comparison is true, the points will be added to the overall score." + }, + "points": { + "type": "number", + "description": "These are the points that will be added to the overall score if the condition is met.\nThe points must be between 0 and 100.", + "minimum": 0, + "maximum": 100 + } + }, + "required": [ + "type", + "comparator", + "value", + "points" + ] + }, + "BooleanComparatorScorecardMetricCondition": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the type of the condition. Currently only 'comparator' is supported.", + "enum": [ + "comparator" + ] + }, + "comparator": { + "type": "string", + "description": "The comparator can only be '=' for boolean conditions.", + "enum": [ + "=" + ] + }, + "value": { + "type": "boolean", + "description": "This is the value that will be used to compare the result of the structured output with the comparator.\nIf the result of the comparison is true, the points will be added to the overall score." + }, + "points": { + "type": "number", + "description": "These are the points that will be added to the overall score if the condition is met.\nThe points must be between 0 and 100.", + "minimum": 0, + "maximum": 100 + } + }, + "required": [ + "type", + "comparator", + "value", + "points" + ] + }, + "ScorecardMetric": { + "type": "object", + "properties": { + "conditions": { + "type": "array", + "description": "These are the conditions that will be used to evaluate the scorecard.\nEach condition will have a comparator, value, and points that will be used to calculate the final score.\nThe points will be added to the overall score if the condition is met.\nThe overall score will be normalized to a 100 point scale to ensure uniformity across different scorecards.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/NumberComparatorScorecardMetricCondition", + "title": "NumberComparatorScorecardMetricCondition" + }, + { + "$ref": "#/components/schemas/BooleanComparatorScorecardMetricCondition", + "title": "BooleanComparatorScorecardMetricCondition" + } + ] + } + }, + "structuredOutputId": { + "type": "string", + "description": "This is the unique identifier for the structured output that will be used to evaluate the scorecard.\nThe structured output must be of type number or boolean only for now." + } + }, + "required": [ + "conditions", + "structuredOutputId" + ] + }, + "CreateScorecardDTO": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "This is the name of the scorecard. It is only for user reference and will not be used for any evaluation.", + "maxLength": 80 + }, + "description": { + "type": "string", + "description": "This is the description of the scorecard. It is only for user reference and will not be used for any evaluation.", + "maxLength": 500 + }, + "metrics": { + "description": "These are the metrics that will be used to evaluate the scorecard.\nEach metric will have a set of conditions and points that will be used to generate the score.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ScorecardMetric" + } + }, + "assistantIds": { + "description": "These are the assistant IDs that this scorecard is linked to.\nWhen linked to assistants, this scorecard will be available for evaluation during those assistants' calls.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "metrics" + ] + }, + "ArtifactPlan": { + "type": "object", + "properties": { + "recordingEnabled": { + "type": "boolean", + "description": "This determines whether assistant's calls are recorded. Defaults to true.\n\nUsage:\n- If you don't want to record the calls, set this to false.\n- If you want to record the calls when `assistant.hipaaEnabled` (deprecated) or `assistant.compliancePlan.hipaaEnabled` explicity set this to true and make sure to provide S3 or GCP credentials on the Provider Credentials page in the Dashboard.\n\nYou can find the recording at `call.artifact.recordingUrl` and `call.artifact.stereoRecordingUrl` after the call is ended.\n\n@default true", + "example": true + }, + "recordingFormat": { + "type": "string", + "description": "This determines the format of the recording. Defaults to `wav;l16`.\n\n@default 'wav;l16'", + "enum": [ + "wav;l16", + "mp3" + ] + }, + "recordingUseCustomStorageEnabled": { + "type": "boolean", + "description": "This determines whether to use custom storage (S3 or GCP) for call recordings when storage credentials are configured.\n\nWhen set to false, recordings will be stored on Vapi's storage instead of your custom storage, even if you have custom storage credentials configured.\n\nUsage:\n- Set to false if you have custom storage configured but want to store recordings on Vapi's storage for this assistant.\n- Set to true (or leave unset) to use your custom storage for recordings when available.\n\n@default true", + "example": true + }, + "videoRecordingEnabled": { + "type": "boolean", + "description": "This determines whether the video is recorded during the call. Defaults to false. Only relevant for `webCall` type.\n\nYou can find the video recording at `call.artifact.videoRecordingUrl` after the call is ended.\n\n@default false", + "example": false + }, + "fullMessageHistoryEnabled": { + "type": "boolean", + "description": "This determines whether the artifact contains the full message history, even after handoff context engineering. Defaults to false.", + "example": false + }, + "pcapEnabled": { + "type": "boolean", + "description": "This determines whether the SIP packet capture is enabled. Defaults to true. Only relevant for `phone` type calls where phone number's provider is `vapi` or `byo-phone-number`.\n\nYou can find the packet capture at `call.artifact.pcapUrl` after the call is ended.\n\n@default true", + "example": true + }, + "pcapS3PathPrefix": { + "type": "string", + "description": "This is the path where the SIP packet capture will be uploaded. This is only used if you have provided S3 or GCP credentials on the Provider Credentials page in the Dashboard.\n\nIf credential.s3PathPrefix or credential.bucketPlan.path is set, this will append to it.\n\nUsage:\n- If you want to upload the packet capture to a specific path, set this to the path. Example: `/my-assistant-captures`.\n- If you want to upload the packet capture to the root of the bucket, set this to `/`.\n\n@default '/'", + "example": "/pcaps" + }, + "pcapUseCustomStorageEnabled": { + "type": "boolean", + "description": "This determines whether to use custom storage (S3 or GCP) for SIP packet captures when storage credentials are configured.\n\nWhen set to false, packet captures will be stored on Vapi's storage instead of your custom storage, even if you have custom storage credentials configured.\n\nUsage:\n- Set to false if you have custom storage configured but want to store packet captures on Vapi's storage for this assistant.\n- Set to true (or leave unset) to use your custom storage for packet captures when available.\n\n@default true", + "example": true + }, + "loggingEnabled": { + "type": "boolean", + "description": "This determines whether the call logs are enabled. Defaults to true.\n\n@default true", + "example": true + }, + "loggingUseCustomStorageEnabled": { + "type": "boolean", + "description": "This determines whether to use custom storage (S3 or GCP) for call logs when storage credentials are configured.\n\nWhen set to false, logs will be stored on Vapi's storage instead of your custom storage, even if you have custom storage credentials configured.\n\nUsage:\n- Set to false if you have custom storage configured but want to store logs on Vapi's storage for this assistant.\n- Set to true (or leave unset) to use your custom storage for logs when available.\n\n@default true", + "example": true + }, + "transcriptPlan": { + "description": "This is the plan for `call.artifact.transcript`. To disable, set `transcriptPlan.enabled` to false.", + "allOf": [ + { + "$ref": "#/components/schemas/TranscriptPlan" + } + ] + }, + "recordingPath": { + "type": "string", + "description": "This is the path where the recording will be uploaded. This is only used if you have provided S3 or GCP credentials on the Provider Credentials page in the Dashboard.\n\nIf credential.s3PathPrefix or credential.bucketPlan.path is set, this will append to it.\n\nUsage:\n- If you want to upload the recording to a specific path, set this to the path. Example: `/my-assistant-recordings`.\n- If you want to upload the recording to the root of the bucket, set this to `/`.\n\n@default '/'" + }, + "structuredOutputIds": { + "description": "This is an array of structured output IDs to be calculated during the call.\nThe outputs will be extracted and stored in `call.artifact.structuredOutputs` after the call is ended.", + "type": "array", + "items": { + "type": "string" + } + }, + "structuredOutputs": { + "description": "This is an array of transient structured outputs to be calculated during the call.\nThe outputs will be extracted and stored in `call.artifact.structuredOutputs` after the call is ended.\nUse this to provide inline structured output configurations instead of referencing existing ones via structuredOutputIds.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CreateStructuredOutputDTO" + } + }, + "scorecardIds": { + "description": "This is an array of scorecard IDs that will be evaluated based on the structured outputs extracted during the call.\nThe scorecards will be evaluated and the results will be stored in `call.artifact.scorecards` after the call has ended.", + "type": "array", + "items": { + "type": "string" + } + }, + "scorecards": { + "description": "This is the array of scorecards that will be evaluated based on the structured outputs extracted during the call.\nThe scorecards will be evaluated and the results will be stored in `call.artifact.scorecards` after the call has ended.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CreateScorecardDTO" + } + }, + "loggingPath": { + "type": "string", + "description": "This is the path where the call logs will be uploaded. This is only used if you have provided S3 or GCP credentials on the Provider Credentials page in the Dashboard.\n\nIf credential.s3PathPrefix or credential.bucketPlan.path is set, this will append to it.\n\nUsage:\n- If you want to upload the call logs to a specific path, set this to the path. Example: `/my-assistant-logs`.\n- If you want to upload the call logs to the root of the bucket, set this to `/`.\n\n@default '/'" + } + } + }, + "StopSpeakingPlan": { + "type": "object", + "properties": { + "numWords": { + "type": "number", + "description": "This is the number of words that the customer has to say before the assistant will stop talking.\n\nWords like \"stop\", \"actually\", \"no\", etc. will always interrupt immediately regardless of this value.\n\nWords like \"okay\", \"yeah\", \"right\" will never interrupt.\n\nWhen set to 0, `voiceSeconds` is used in addition to the transcriptions to determine the customer has started speaking.\n\nDefaults to 0.\n\n@default 0", + "minimum": 0, + "maximum": 10, + "example": 0 + }, + "voiceSeconds": { + "type": "number", + "description": "This is the seconds customer has to speak before the assistant stops talking. This uses the VAD (Voice Activity Detection) spike to determine if the customer has started speaking.\n\nConsiderations:\n- A lower value might be more responsive but could potentially pick up non-speech sounds.\n- A higher value reduces false positives but might slightly delay the detection of speech onset.\n\nThis is only used if `numWords` is set to 0.\n\nDefaults to 0.2\n\n@default 0.2", + "minimum": 0, + "maximum": 0.5, + "example": 0.2 + }, + "backoffSeconds": { + "type": "number", + "description": "This is the seconds to wait before the assistant will start talking again after being interrupted.\n\nDefaults to 1.\n\n@default 1", + "minimum": 0, + "maximum": 10, + "example": 1 + }, + "acknowledgementPhrases": { + "description": "These are the phrases that will never interrupt the assistant, even if numWords threshold is met.\nThese are typically acknowledgement or backchanneling phrases.", + "example": [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure" + ], + "default": [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure" + ], + "type": "array", + "items": { + "type": "string", + "maxLength": 240 + } + }, + "interruptionPhrases": { + "description": "These are the phrases that will always interrupt the assistant immediately, regardless of numWords.\nThese are typically phrases indicating disagreement or desire to stop.", + "example": [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually" + ], + "default": [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually" + ], + "type": "array", + "items": { + "type": "string", + "maxLength": 240 + } + } + } + }, + "MonitorPlan": { + "type": "object", + "properties": { + "listenEnabled": { + "type": "boolean", + "description": "This determines whether the assistant's calls allow live listening. Defaults to true.\n\nFetch `call.monitor.listenUrl` to get the live listening URL.\n\n@default true", + "example": false + }, + "listenAuthenticationEnabled": { + "type": "boolean", + "description": "This enables authentication on the `call.monitor.listenUrl`.\n\nIf `listenAuthenticationEnabled` is `true`, the `call.monitor.listenUrl` will require an `Authorization: Bearer ` header.\n\n@default false", + "example": false + }, + "controlEnabled": { + "type": "boolean", + "description": "This determines whether the assistant's calls allow live control. Defaults to true.\n\nFetch `call.monitor.controlUrl` to get the live control URL.\n\nTo use, send any control message via a POST request to `call.monitor.controlUrl`. Here are the types of controls supported: https://docs.vapi.ai/api-reference/messages/client-inbound-message\n\n@default true", + "example": false + }, + "controlAuthenticationEnabled": { + "type": "boolean", + "description": "This enables authentication on the `call.monitor.controlUrl`.\n\nIf `controlAuthenticationEnabled` is `true`, the `call.monitor.controlUrl` will require an `Authorization: Bearer ` header.\n\n@default false", + "example": false + }, + "monitorIds": { + "description": "This the set of monitor ids that are attached to the assistant.\nThe source of truth for the monitor ids is the assistant_monitor join table.\nThis field can be used for transient assistants and to update assistants with new monitor ids.\n\n@default []", + "example": [ + "123e4567-e89b-12d3-a456-426614174000" + ], + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "KeypadInputPlan": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "This keeps track of whether the user has enabled keypad input.\nBy default, it is off.\n\n@default false" + }, + "timeoutSeconds": { + "type": "number", + "description": "This is the time in seconds to wait before processing the input.\nIf the input is not received within this time, the input will be ignored.\nIf set to \"off\", the input will be processed when the user enters a delimiter or immediately if no delimiter is used.\n\n@default 2", + "minimum": 0, + "maximum": 10 + }, + "delimiters": { + "type": "string", + "description": "This is the delimiter(s) that will be used to process the input.\nCan be '#', '*', or an empty array.", + "enum": [ + "#", + "*", + "" + ] + } + } + }, + "WorkflowUserEditable": { + "type": "object", + "properties": { + "nodes": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ConversationNode", + "title": "ConversationNode" + }, + { + "$ref": "#/components/schemas/ToolNode", + "title": "ToolNode" + } + ] + } + }, + "model": { + "description": "This is the model for the workflow.\n\nThis can be overridden at node level using `nodes[n].model`.", + "oneOf": [ + { + "$ref": "#/components/schemas/WorkflowOpenAIModel", + "title": "WorkflowOpenAIModel" + }, + { + "$ref": "#/components/schemas/WorkflowAnthropicModel", + "title": "WorkflowAnthropicModel" + }, + { + "$ref": "#/components/schemas/WorkflowAnthropicBedrockModel", + "title": "WorkflowAnthropicBedrockModel" + }, + { + "$ref": "#/components/schemas/WorkflowGoogleModel", + "title": "WorkflowGoogleModel" + }, + { + "$ref": "#/components/schemas/WorkflowCustomModel", + "title": "WorkflowCustomModel" + } + ] + }, + "transcriber": { + "description": "This is the transcriber for the workflow.\n\nThis can be overridden at node level using `nodes[n].transcriber`.", + "oneOf": [ + { + "$ref": "#/components/schemas/AssemblyAITranscriber", + "title": "AssemblyAITranscriber" + }, + { + "$ref": "#/components/schemas/AzureSpeechTranscriber", + "title": "AzureSpeechTranscriber" + }, + { + "$ref": "#/components/schemas/CustomTranscriber", + "title": "CustomTranscriber" + }, + { + "$ref": "#/components/schemas/DeepgramTranscriber", + "title": "DeepgramTranscriber" + }, + { + "$ref": "#/components/schemas/ElevenLabsTranscriber", + "title": "ElevenLabsTranscriber" + }, + { + "$ref": "#/components/schemas/GladiaTranscriber", + "title": "GladiaTranscriber" + }, + { + "$ref": "#/components/schemas/GoogleTranscriber", + "title": "GoogleTranscriber" + }, + { + "$ref": "#/components/schemas/SpeechmaticsTranscriber", + "title": "SpeechmaticsTranscriber" + }, + { + "$ref": "#/components/schemas/TalkscriberTranscriber", + "title": "TalkscriberTranscriber" + }, + { + "$ref": "#/components/schemas/OpenAITranscriber", + "title": "OpenAITranscriber" + }, + { + "$ref": "#/components/schemas/CartesiaTranscriber", + "title": "CartesiaTranscriber" + }, + { + "$ref": "#/components/schemas/SonioxTranscriber", + "title": "SonioxTranscriber" + }, + { + "$ref": "#/components/schemas/XaiTranscriber", + "title": "XaiTranscriber" + }, + { + "$ref": "#/components/schemas/VapiTranscriber", + "title": "VapiTranscriber" + } + ] + }, + "voice": { + "description": "This is the voice for the workflow.\n\nThis can be overridden at node level using `nodes[n].voice`.", + "oneOf": [ + { + "$ref": "#/components/schemas/AzureVoice", + "title": "AzureVoice" + }, + { + "$ref": "#/components/schemas/CartesiaVoice", + "title": "CartesiaVoice" + }, + { + "$ref": "#/components/schemas/CustomVoice", + "title": "CustomVoice" + }, + { + "$ref": "#/components/schemas/DeepgramVoice", + "title": "DeepgramVoice" + }, + { + "$ref": "#/components/schemas/ElevenLabsVoice", + "title": "ElevenLabsVoice" + }, + { + "$ref": "#/components/schemas/HumeVoice", + "title": "HumeVoice" + }, + { + "$ref": "#/components/schemas/LMNTVoice", + "title": "LMNTVoice" + }, + { + "$ref": "#/components/schemas/NeuphonicVoice", + "title": "NeuphonicVoice" + }, + { + "$ref": "#/components/schemas/OpenAIVoice", + "title": "OpenAIVoice" + }, + { + "$ref": "#/components/schemas/PlayHTVoice", + "title": "PlayHTVoice" + }, + { + "$ref": "#/components/schemas/WellSaidVoice", + "title": "WellSaidVoice" + }, + { + "$ref": "#/components/schemas/RimeAIVoice", + "title": "RimeAIVoice" + }, + { + "$ref": "#/components/schemas/SmallestAIVoice", + "title": "SmallestAIVoice" + }, + { + "$ref": "#/components/schemas/TavusVoice", + "title": "TavusVoice" + }, + { + "$ref": "#/components/schemas/VapiVoice", + "title": "VapiVoice" + }, + { + "$ref": "#/components/schemas/SesameVoice", + "title": "SesameVoice" + }, + { + "$ref": "#/components/schemas/InworldVoice", + "title": "InworldVoice" + }, + { + "$ref": "#/components/schemas/MinimaxVoice", + "title": "MinimaxVoice" + }, + { + "$ref": "#/components/schemas/XaiVoice", + "title": "XaiVoice" + }, + { + "$ref": "#/components/schemas/MicrosoftVoice", + "title": "MicrosoftVoice" + } + ] + }, + "observabilityPlan": { + "description": "This is the plan for observability of workflow's calls.\n\nCurrently, only Langfuse is supported.", + "oneOf": [ + { + "$ref": "#/components/schemas/LangfuseObservabilityPlan", + "title": "Langfuse" + } + ], + "allOf": [ + { + "$ref": "#/components/schemas/LangfuseObservabilityPlan" + } + ] + }, + "backgroundSound": { + "description": "This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.\nYou can also provide a custom sound by providing a URL to an audio file.", + "oneOf": [ + { + "type": "string", + "enum": [ + "off", "office" ], "example": "office" @@ -19879,10 +22228,6 @@ "$ref": "#/components/schemas/CreateTogetherAICredentialDTO", "title": "TogetherAICredential" }, - { - "$ref": "#/components/schemas/CreateTrieveCredentialDTO", - "title": "TrieveCredential" - }, { "$ref": "#/components/schemas/CreateTwilioCredentialDTO", "title": "TwilioCredential" @@ -19903,6 +22248,10 @@ "$ref": "#/components/schemas/CreateXAiCredentialDTO", "title": "XAiCredential" }, + { + "$ref": "#/components/schemas/CreateMicrosoftCredentialDTO", + "title": "MicrosoftCredential" + }, { "$ref": "#/components/schemas/CreateGoogleCalendarOAuth2ClientCredentialDTO", "title": "GoogleCalendarOAuth2ClientCredential" @@ -19987,12 +22336,12 @@ "webhook": "#/components/schemas/CreateWebhookCredentialDTO", "custom-credential": "#/components/schemas/CreateCustomCredentialDTO", "xai": "#/components/schemas/CreateXAiCredentialDTO", + "microsoft": "#/components/schemas/CreateMicrosoftCredentialDTO", "neuphonic": "#/components/schemas/CreateNeuphonicCredentialDTO", "hume": "#/components/schemas/CreateHumeCredentialDTO", "mistral": "#/components/schemas/CreateMistralCredentialDTO", "speechmatics": "#/components/schemas/CreateSpeechmaticsCredentialDTO", "soniox": "#/components/schemas/CreateSonioxCredentialDTO", - "trieve": "#/components/schemas/CreateTrieveCredentialDTO", "google.calendar.oauth2-client": "#/components/schemas/CreateGoogleCalendarOAuth2ClientCredentialDTO", "google.calendar.oauth2-authorization": "#/components/schemas/CreateGoogleCalendarOAuth2AuthorizationCredentialDTO", "google.sheets.oauth2-authorization": "#/components/schemas/CreateGoogleSheetsOAuth2AuthorizationCredentialDTO", @@ -20272,6 +22621,18 @@ } ] }, + "model": { + "type": "string", + "description": "White-label Vapi models are selected by `version`, not a model name, so\n`model` is optional here (the runtime already accepts a version-only Vapi\npayload). Overriding the required `ModelBase.model`: the declared type stays\n`string` to match the base (avoids TS2416) and the `= undefined!` initializer\nsatisfies TS2612 for the field override, while `@IsOptional` +\n`@ApiPropertyOptional` make validation and the generated OpenAPI schema treat\nit as optional (so `VapiModel.required` is `['provider']`)." + }, + "version": { + "type": "string", + "description": "Vapi-managed model version (update channel). When set, this is a Vapi-managed\nLLM routed by the registry; when absent, this is the legacy workflow form\nbelow (`steps` / `workflow`).", + "enum": [ + "latest", + "1" + ] + }, "provider": { "type": "string", "enum": [ @@ -20290,22 +22651,12 @@ } ] }, - "model": { - "type": "string", - "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b" - }, "temperature": { "type": "number", - "description": "This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.", + "description": "This is the temperature that will be used for calls. Default is 0.5.", "minimum": 0, "maximum": 2 }, - "maxTokens": { - "type": "number", - "description": "This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.", - "minimum": 50, - "maximum": 10000 - }, "emotionRecognitionEnabled": { "type": "boolean", "description": "This determines whether we detect user's emotion while they speak and send it as an additional info to model.\n\nDefault `false` because the model is usually are good at understanding the user's emotion from text.\n\n@default false" @@ -20317,8 +22668,7 @@ } }, "required": [ - "provider", - "model" + "provider" ] }, "XaiModel": { @@ -20455,7 +22805,10 @@ "grok-2", "grok-3", "grok-4-fast-reasoning", - "grok-4-fast-non-reasoning" + "grok-4-fast-non-reasoning", + "grok-4.20-0309-reasoning", + "grok-4.20-0309-non-reasoning", + "grok-4.3" ] }, "provider": { @@ -20466,7 +22819,7 @@ }, "temperature": { "type": "number", - "description": "This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.", + "description": "This is the temperature that will be used for calls. Default is 0.5.", "minimum": 0, "maximum": 2 }, @@ -20789,6 +23142,14 @@ { "$ref": "#/components/schemas/FallbackInworldVoice", "title": "Inworld" + }, + { + "$ref": "#/components/schemas/FallbackXaiVoice", + "title": "xAI" + }, + { + "$ref": "#/components/schemas/FallbackMicrosoftVoice", + "title": "Microsoft" } ] } @@ -20980,6 +23341,8 @@ "type": "string", "description": "This is the model that will be used. This is optional and will default to the correct model for the voiceId.", "enum": [ + "sonic-3.5", + "sonic-3.5-2026-05-04", "sonic-3", "sonic-3-2026-01-12", "sonic-3-2025-10-27", @@ -22827,25 +25190,25 @@ "enum": [ "Clara", "Godfrey", + "Elliot", + "Savannah", + "Nico", + "Kai", + "Emma", + "Sagar", + "Neil", "Layla", "Sid", "Gustavo", - "Elliot", "Kylie", "Rohan", "Lily", - "Savannah", "Hana", "Neha", "Cole", "Harry", "Paige", "Spencer", - "Nico", - "Kai", - "Emma", - "Sagar", - "Neil", "Naina", "Leah", "Tara", @@ -22857,6 +25220,31 @@ "Zoe" ] }, + "version": { + "description": "The Vapi voice routing generation. `latest` auto-updates to the newest generation; version 1 uses legacy mappings; version 2 can use xAI-backed voices when available. When omitted, Version 1 is used. Accepts the string channel ('latest', '1', '2'); legacy numeric values (1, 2) are also accepted and coerced to their string form.", + "enum": [ + "1", + "2", + "latest" + ], + "oneOf": [ + { + "type": "string", + "enum": [ + "1", + "2", + "latest" + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + } + ] + }, "speed": { "type": "number", "description": "This is the speed multiplier that will be used.\n\n@default 1", @@ -22864,6 +25252,69 @@ "maximum": 2, "default": 1 }, + "language": { + "type": "string", + "description": "Language for Vapi voice synthesis. For Version 2, omit this field or set `auto` for automatic language detection. Version 1 supports legacy Vapi language values.", + "enum": [ + "en-US", + "en-GB", + "en-AU", + "en-CA", + "ja", + "zh", + "de", + "hi", + "fr-FR", + "fr-CA", + "ko", + "pt-BR", + "pt-PT", + "it", + "es-ES", + "es-MX", + "id", + "nl", + "tr", + "fil", + "pl", + "sv", + "bg", + "ro", + "ar-SA", + "ar-AE", + "cs", + "el", + "fi", + "hr", + "ms", + "sk", + "da", + "ta", + "uk", + "ru", + "hu", + "no", + "vi", + "auto", + "en", + "ar", + "ar-EG", + "bn", + "es", + "fr", + "gu", + "he", + "ka", + "kn", + "ml", + "mr", + "pa", + "pt", + "te", + "th", + "tl" + ] + }, "pronunciationDictionary": { "description": "List of pronunciation dictionary locators for custom word pronunciations.", "type": "array", @@ -22878,14 +25329,6 @@ "$ref": "#/components/schemas/ChunkPlan" } ] - }, - "fallbackPlan": { - "description": "This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", - "allOf": [ - { - "$ref": "#/components/schemas/FallbackPlan" - } - ] } }, "required": [ @@ -23402,6 +25845,248 @@ "voiceId" ] }, + "XaiVoice": { + "type": "object", + "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, + "provider": { + "type": "string", + "description": "This is the voice provider that will be used.", + "enum": [ + "xai" + ] + }, + "voiceId": { + "type": "string", + "description": "Built-in voices: eve, ara, rex, sal, leo. Cloned voice IDs are also accepted.", + "maxLength": 120, + "title": "xAI Voice ID", + "enum": [ + "eve", + "ara", + "rex", + "sal", + "leo" + ], + "example": "eve" + }, + "language": { + "type": "string", + "description": "BCP-47 language code for xAI TTS synthesis.", + "enum": [ + "auto", + "en", + "ar-EG", + "ar-SA", + "ar-AE", + "bn", + "zh", + "fr", + "de", + "hi", + "id", + "it", + "ja", + "ko", + "pt-BR", + "pt-PT", + "ru", + "es-MX", + "es-ES", + "tr", + "vi" + ], + "default": "en" + }, + "speed": { + "type": "number", + "description": "Speed multiplier for xAI TTS synthesis.", + "minimum": 0.7, + "maximum": 1.5, + "default": 1.1 + }, + "chunkPlan": { + "description": "This is the plan for chunking the model output before it is sent to the voice provider.", + "allOf": [ + { + "$ref": "#/components/schemas/ChunkPlan" + } + ] + }, + "fallbackPlan": { + "description": "This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", + "allOf": [ + { + "$ref": "#/components/schemas/FallbackPlan" + } + ] + } + }, + "required": [ + "provider", + "voiceId" + ] + }, + "MicrosoftVoice": { + "type": "object", + "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, + "provider": { + "type": "string", + "description": "This is the voice provider that will be used.", + "enum": [ + "microsoft" + ] + }, + "voiceId": { + "type": "string", + "description": "MAI-Voice-2 voice ID. Built-in voices listed in enum.", + "enum": [ + "de-DE-Klaus:MAI-Voice-2", + "de-DE-Mia:MAI-Voice-2", + "en-AU-Lisa:MAI-Voice-2", + "en-US-Ethan:MAI-Voice-2", + "en-US-Grant:MAI-Voice-2", + "en-US-Harper:MAI-Voice-2", + "en-US-Iris:MAI-Voice-2", + "en-US-Jasper:MAI-Voice-2", + "en-US-Olivia:MAI-Voice-2", + "es-ES-Marta:MAI-Voice-2", + "es-MX-Alejo:MAI-Voice-2", + "es-MX-Valeria:MAI-Voice-2", + "fr-FR-Marc:MAI-Voice-2", + "fr-FR-Soleil:MAI-Voice-2", + "hi-IN-Arjun:MAI-Voice-2", + "hi-IN-Dhruv:MAI-Voice-2", + "hi-IN-Kavya:MAI-Voice-2", + "hi-IN-Priya:MAI-Voice-2", + "hu-HU-Bence:MAI-Voice-2", + "hu-HU-Levente:MAI-Voice-2", + "hu-HU-Lilla:MAI-Voice-2", + "hu-HU-Réka:MAI-Voice-2", + "it-IT-Luca:MAI-Voice-2", + "it-IT-Rosa:MAI-Voice-2", + "ko-KR-Hana:MAI-Voice-2", + "ko-KR-Junho:MAI-Voice-2", + "nl-NL-Fleur:MAI-Voice-2", + "nl-NL-Sander:MAI-Voice-2", + "pt-BR-Caio:MAI-Voice-2", + "pt-BR-Luana:MAI-Voice-2", + "pt-BR-Pedro:MAI-Voice-2", + "pt-BR-Rafael:MAI-Voice-2", + "pt-PT-Rui:MAI-Voice-2", + "ro-RO-Andrei:MAI-Voice-2", + "ro-RO-Elena:MAI-Voice-2", + "ro-RO-Ioana:MAI-Voice-2", + "ro-RO-Radu:MAI-Voice-2", + "ru-RU-Lev:MAI-Voice-2", + "ru-RU-Masha:MAI-Voice-2", + "th-TH-Krit:MAI-Voice-2", + "th-TH-Nattapong:MAI-Voice-2", + "tr-TR-Aydin:MAI-Voice-2", + "tr-TR-Elif:MAI-Voice-2", + "zh-CN-Bo:MAI-Voice-2", + "zh-CN-Lan:MAI-Voice-2", + "zh-CN-Mei:MAI-Voice-2" + ], + "example": "en-US-Ethan:MAI-Voice-2" + }, + "style": { + "type": "string", + "description": "Speaking style applied via mstts:express-as on every request. Unknown styles are ignored by Azure and fall back to neutral.", + "enum": [ + "adventurous", + "angry", + "caring", + "cheerful", + "confused", + "curious", + "determined", + "disappointed", + "disgusted", + "embarrassed", + "empathy", + "encouraging", + "excited", + "fearful", + "friendly", + "happy", + "hopeful", + "jealous", + "joyful", + "nostalgic", + "reflective", + "regretful", + "relieved", + "sad", + "serious", + "shouting", + "softvoice", + "surprised", + "whispering" + ], + "example": "happy" + }, + "styleDegree": { + "type": "number", + "description": "Style intensity (0.01–2). Default 1 = the predefined style strength. Only applies when `style` is set.", + "minimum": 0.01, + "maximum": 2, + "default": 1 + }, + "role": { + "type": "string", + "description": "Role-play (age/gender imitation). Requires `style` to be set; ignored otherwise.", + "enum": [ + "Girl", + "Boy", + "YoungAdultFemale", + "YoungAdultMale", + "OlderAdultFemale", + "OlderAdultMale", + "SeniorFemale", + "SeniorMale" + ], + "example": "YoungAdultFemale" + }, + "chunkPlan": { + "description": "This is the plan for chunking the model output before it is sent to the voice provider.", + "allOf": [ + { + "$ref": "#/components/schemas/ChunkPlan" + } + ] + }, + "speed": { + "type": "number", + "description": "This is the speed multiplier that will be used.", + "minimum": 0.5, + "maximum": 2 + }, + "fallbackPlan": { + "description": "This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", + "allOf": [ + { + "$ref": "#/components/schemas/FallbackPlan" + } + ] + } + }, + "required": [ + "provider", + "voiceId" + ] + }, "FallbackAzureVoice": { "type": "object", "properties": { @@ -23480,6 +26165,8 @@ "type": "string", "description": "This is the model that will be used. This is optional and will default to the correct model for the voiceId.", "enum": [ + "sonic-3.5", + "sonic-3.5-2026-05-04", "sonic-3", "sonic-3-2026-01-12", "sonic-3-2025-10-27", @@ -25080,25 +27767,25 @@ "enum": [ "Clara", "Godfrey", + "Elliot", + "Savannah", + "Nico", + "Kai", + "Emma", + "Sagar", + "Neil", "Layla", "Sid", "Gustavo", - "Elliot", "Kylie", "Rohan", "Lily", - "Savannah", "Hana", "Neha", "Cole", "Harry", "Paige", "Spencer", - "Nico", - "Kai", - "Emma", - "Sagar", - "Neil", "Naina", "Leah", "Tara", @@ -25110,6 +27797,31 @@ "Zoe" ] }, + "version": { + "description": "The Vapi voice routing generation. `latest` auto-updates to the newest generation; version 1 uses legacy mappings; version 2 can use xAI-backed voices when available. When omitted, Version 1 is used. Accepts the string channel ('latest', '1', '2'); legacy numeric values (1, 2) are also accepted and coerced to their string form.", + "enum": [ + "1", + "2", + "latest" + ], + "oneOf": [ + { + "type": "string", + "enum": [ + "1", + "2", + "latest" + ] + }, + { + "type": "number", + "enum": [ + 1, + 2 + ] + } + ] + }, "speed": { "type": "number", "description": "This is the speed multiplier that will be used.\n\n@default 1", @@ -25117,6 +27829,69 @@ "maximum": 2, "default": 1 }, + "language": { + "type": "string", + "description": "Language for Vapi voice synthesis. For Version 2, omit this field or set `auto` for automatic language detection. Version 1 supports legacy Vapi language values.", + "enum": [ + "en-US", + "en-GB", + "en-AU", + "en-CA", + "ja", + "zh", + "de", + "hi", + "fr-FR", + "fr-CA", + "ko", + "pt-BR", + "pt-PT", + "it", + "es-ES", + "es-MX", + "id", + "nl", + "tr", + "fil", + "pl", + "sv", + "bg", + "ro", + "ar-SA", + "ar-AE", + "cs", + "el", + "fi", + "hr", + "ms", + "sk", + "da", + "ta", + "uk", + "ru", + "hu", + "no", + "vi", + "auto", + "en", + "ar", + "ar-EG", + "bn", + "es", + "fr", + "gu", + "he", + "ka", + "kn", + "ml", + "mr", + "pa", + "pt", + "te", + "th", + "tl" + ] + }, "pronunciationDictionary": { "description": "List of pronunciation dictionary locators for custom word pronunciations.", "type": "array", @@ -25288,6 +28063,232 @@ "voiceId" ] }, + "FallbackXaiVoice": { + "type": "object", + "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, + "provider": { + "type": "string", + "description": "This is the voice provider that will be used.", + "enum": [ + "xai" + ] + }, + "voiceId": { + "type": "string", + "description": "Built-in voices: eve, ara, rex, sal, leo. Cloned voice IDs are also accepted.", + "maxLength": 120, + "title": "xAI Voice ID", + "enum": [ + "eve", + "ara", + "rex", + "sal", + "leo" + ], + "example": "eve" + }, + "language": { + "type": "string", + "description": "BCP-47 language code for xAI TTS synthesis.", + "enum": [ + "auto", + "en", + "ar-EG", + "ar-SA", + "ar-AE", + "bn", + "zh", + "fr", + "de", + "hi", + "id", + "it", + "ja", + "ko", + "pt-BR", + "pt-PT", + "ru", + "es-MX", + "es-ES", + "tr", + "vi" + ], + "default": "en" + }, + "speed": { + "type": "number", + "description": "Speed multiplier for xAI TTS synthesis.", + "minimum": 0.7, + "maximum": 1.5, + "default": 1.1 + }, + "chunkPlan": { + "description": "This is the plan for chunking the model output before it is sent to the voice provider.", + "allOf": [ + { + "$ref": "#/components/schemas/ChunkPlan" + } + ] + } + }, + "required": [ + "provider", + "voiceId" + ] + }, + "FallbackMicrosoftVoice": { + "type": "object", + "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, + "provider": { + "type": "string", + "description": "This is the voice provider that will be used.", + "enum": [ + "microsoft" + ] + }, + "voiceId": { + "type": "string", + "description": "MAI-Voice-2 voice ID. Built-in voices listed in enum.", + "enum": [ + "de-DE-Klaus:MAI-Voice-2", + "de-DE-Mia:MAI-Voice-2", + "en-AU-Lisa:MAI-Voice-2", + "en-US-Ethan:MAI-Voice-2", + "en-US-Grant:MAI-Voice-2", + "en-US-Harper:MAI-Voice-2", + "en-US-Iris:MAI-Voice-2", + "en-US-Jasper:MAI-Voice-2", + "en-US-Olivia:MAI-Voice-2", + "es-ES-Marta:MAI-Voice-2", + "es-MX-Alejo:MAI-Voice-2", + "es-MX-Valeria:MAI-Voice-2", + "fr-FR-Marc:MAI-Voice-2", + "fr-FR-Soleil:MAI-Voice-2", + "hi-IN-Arjun:MAI-Voice-2", + "hi-IN-Dhruv:MAI-Voice-2", + "hi-IN-Kavya:MAI-Voice-2", + "hi-IN-Priya:MAI-Voice-2", + "hu-HU-Bence:MAI-Voice-2", + "hu-HU-Levente:MAI-Voice-2", + "hu-HU-Lilla:MAI-Voice-2", + "hu-HU-Réka:MAI-Voice-2", + "it-IT-Luca:MAI-Voice-2", + "it-IT-Rosa:MAI-Voice-2", + "ko-KR-Hana:MAI-Voice-2", + "ko-KR-Junho:MAI-Voice-2", + "nl-NL-Fleur:MAI-Voice-2", + "nl-NL-Sander:MAI-Voice-2", + "pt-BR-Caio:MAI-Voice-2", + "pt-BR-Luana:MAI-Voice-2", + "pt-BR-Pedro:MAI-Voice-2", + "pt-BR-Rafael:MAI-Voice-2", + "pt-PT-Rui:MAI-Voice-2", + "ro-RO-Andrei:MAI-Voice-2", + "ro-RO-Elena:MAI-Voice-2", + "ro-RO-Ioana:MAI-Voice-2", + "ro-RO-Radu:MAI-Voice-2", + "ru-RU-Lev:MAI-Voice-2", + "ru-RU-Masha:MAI-Voice-2", + "th-TH-Krit:MAI-Voice-2", + "th-TH-Nattapong:MAI-Voice-2", + "tr-TR-Aydin:MAI-Voice-2", + "tr-TR-Elif:MAI-Voice-2", + "zh-CN-Bo:MAI-Voice-2", + "zh-CN-Lan:MAI-Voice-2", + "zh-CN-Mei:MAI-Voice-2" + ], + "example": "en-US-Ethan:MAI-Voice-2" + }, + "style": { + "type": "string", + "description": "Speaking style applied via mstts:express-as on every request. Unknown styles are ignored by Azure and fall back to neutral.", + "enum": [ + "adventurous", + "angry", + "caring", + "cheerful", + "confused", + "curious", + "determined", + "disappointed", + "disgusted", + "embarrassed", + "empathy", + "encouraging", + "excited", + "fearful", + "friendly", + "happy", + "hopeful", + "jealous", + "joyful", + "nostalgic", + "reflective", + "regretful", + "relieved", + "sad", + "serious", + "shouting", + "softvoice", + "surprised", + "whispering" + ], + "example": "happy" + }, + "styleDegree": { + "type": "number", + "description": "Style intensity (0.01–2). Default 1 = the predefined style strength. Only applies when `style` is set.", + "minimum": 0.01, + "maximum": 2, + "default": 1 + }, + "role": { + "type": "string", + "description": "Role-play (age/gender imitation). Requires `style` to be set; ignored otherwise.", + "enum": [ + "Girl", + "Boy", + "YoungAdultFemale", + "YoungAdultMale", + "OlderAdultFemale", + "OlderAdultMale", + "SeniorFemale", + "SeniorMale" + ], + "example": "YoungAdultFemale" + }, + "speed": { + "type": "number", + "description": "This is the speed multiplier that will be used.", + "minimum": 0.5, + "maximum": 2 + }, + "chunkPlan": { + "description": "This is the plan for chunking the model output before it is sent to the voice provider.", + "allOf": [ + { + "$ref": "#/components/schemas/ChunkPlan" + } + ] + } + }, + "required": [ + "provider", + "voiceId" + ] + }, "TransportConfigurationTwilio": { "type": "object", "properties": { @@ -25364,6 +28365,7 @@ "enum": [ "us-east-1", "us-west-2", + "eu-central-1", "eu-west-1", "eu-west-3", "ap-northeast-1", @@ -25605,7 +28607,10 @@ "gpt-4-1106-preview", "gpt-4-0613", "gpt-35-turbo-0125", - "gpt-35-turbo-1106" + "gpt-35-turbo-1106", + "gpt-4o", + "gpt-4.1", + "gpt-5.4-mini-2026-03-17" ], "example": [ "gpt-4-0125-preview", @@ -25636,7 +28641,10 @@ "gpt-4-1106-preview", "gpt-4-0613", "gpt-35-turbo-0125", - "gpt-35-turbo-1106" + "gpt-35-turbo-1106", + "gpt-4o", + "gpt-4.1", + "gpt-5.4-mini-2026-03-17" ] } }, @@ -25673,7 +28681,7 @@ "properties": { "ip": { "type": "string", - "description": "This is the address of the gateway. It can be an IPv4 address like 1.1.1.1 or a fully qualified domain name like my-sip-trunk.pstn.twilio.com." + "description": "This is the address of the gateway. Inbound gateways require an IPv4 address like 1.1.1.1. Outbound-only gateways can also use a fully qualified domain name like my-sip-trunk.pstn.twilio.com." }, "port": { "type": "number", @@ -25748,10 +28756,6 @@ } } }, - "SbcConfiguration": { - "type": "object", - "properties": {} - }, "CreateByoSipTrunkCredentialDTO": { "type": "object", "properties": { @@ -25791,14 +28795,6 @@ "description": "This can be used to enable the SIP diversion header for authenticating the calling number if the SIP trunk supports it. This is an advanced property.", "maxLength": 10000 }, - "sbcConfiguration": { - "description": "This is an advanced configuration for enterprise deployments. This uses the onprem SBC to trunk into the SIP trunk's `gateways`, rather than the managed SBC provided by Vapi.", - "allOf": [ - { - "$ref": "#/components/schemas/SbcConfiguration" - } - ] - }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -25823,6 +28819,10 @@ "type": "string", "description": "This is not returned in the API." }, + "apiUrl": { + "type": "string", + "description": "This can be used to point to an onprem Cartesia instance. Defaults to api.cartesia.ai." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -26070,6 +29070,15 @@ "maxLength": 10000, "description": "This is not returned in the API." }, + "apiUrl": { + "type": "string", + "enum": [ + "https://api.elevenlabs.io", + "https://api.eu.residency.elevenlabs.io" + ], + "description": "ElevenLabs-only API environment for this key: the global endpoint or the EU data residency endpoint. If omitted on create, Vapi detects it automatically. If set to null on update, Vapi clears the saved endpoint and re-detects it with the saved API key.", + "nullable": true + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -27249,6 +30258,14 @@ { "$ref": "#/components/schemas/SonioxTranscriber", "title": "SonioxTranscriber" + }, + { + "$ref": "#/components/schemas/XaiTranscriber", + "title": "XaiTranscriber" + }, + { + "$ref": "#/components/schemas/VapiTranscriber", + "title": "VapiTranscriber" } ] }, @@ -27318,6 +30335,10 @@ { "$ref": "#/components/schemas/XaiModel", "title": "XAI" + }, + { + "$ref": "#/components/schemas/VapiModel", + "title": "Vapi" } ] }, @@ -27395,6 +30416,14 @@ { "$ref": "#/components/schemas/MinimaxVoice", "title": "MinimaxVoice" + }, + { + "$ref": "#/components/schemas/XaiVoice", + "title": "XaiVoice" + }, + { + "$ref": "#/components/schemas/MicrosoftVoice", + "title": "MicrosoftVoice" } ] }, @@ -27807,10 +30836,6 @@ "$ref": "#/components/schemas/CreateTogetherAICredentialDTO", "title": "TogetherAICredential" }, - { - "$ref": "#/components/schemas/CreateTrieveCredentialDTO", - "title": "TrieveCredential" - }, { "$ref": "#/components/schemas/CreateTwilioCredentialDTO", "title": "TwilioCredential" @@ -27831,6 +30856,10 @@ "$ref": "#/components/schemas/CreateXAiCredentialDTO", "title": "XAiCredential" }, + { + "$ref": "#/components/schemas/CreateMicrosoftCredentialDTO", + "title": "MicrosoftCredential" + }, { "$ref": "#/components/schemas/CreateGoogleCalendarOAuth2ClientCredentialDTO", "title": "GoogleCalendarOAuth2ClientCredential" @@ -27915,12 +30944,12 @@ "webhook": "#/components/schemas/CreateWebhookCredentialDTO", "custom-credential": "#/components/schemas/CreateCustomCredentialDTO", "xai": "#/components/schemas/CreateXAiCredentialDTO", + "microsoft": "#/components/schemas/CreateMicrosoftCredentialDTO", "neuphonic": "#/components/schemas/CreateNeuphonicCredentialDTO", "hume": "#/components/schemas/CreateHumeCredentialDTO", "mistral": "#/components/schemas/CreateMistralCredentialDTO", "speechmatics": "#/components/schemas/CreateSpeechmaticsCredentialDTO", "soniox": "#/components/schemas/CreateSonioxCredentialDTO", - "trieve": "#/components/schemas/CreateTrieveCredentialDTO", "google.calendar.oauth2-client": "#/components/schemas/CreateGoogleCalendarOAuth2ClientCredentialDTO", "google.calendar.oauth2-authorization": "#/components/schemas/CreateGoogleCalendarOAuth2AuthorizationCredentialDTO", "google.sheets.oauth2-authorization": "#/components/schemas/CreateGoogleSheetsOAuth2AuthorizationCredentialDTO", @@ -28219,6 +31248,14 @@ { "$ref": "#/components/schemas/SonioxTranscriber", "title": "SonioxTranscriber" + }, + { + "$ref": "#/components/schemas/XaiTranscriber", + "title": "XaiTranscriber" + }, + { + "$ref": "#/components/schemas/VapiTranscriber", + "title": "VapiTranscriber" } ] }, @@ -28288,6 +31325,10 @@ { "$ref": "#/components/schemas/XaiModel", "title": "XAI" + }, + { + "$ref": "#/components/schemas/VapiModel", + "title": "Vapi" } ] }, @@ -28365,6 +31406,14 @@ { "$ref": "#/components/schemas/MinimaxVoice", "title": "MinimaxVoice" + }, + { + "$ref": "#/components/schemas/XaiVoice", + "title": "XaiVoice" + }, + { + "$ref": "#/components/schemas/MicrosoftVoice", + "title": "MicrosoftVoice" } ] }, @@ -28777,10 +31826,6 @@ "$ref": "#/components/schemas/CreateTogetherAICredentialDTO", "title": "TogetherAICredential" }, - { - "$ref": "#/components/schemas/CreateTrieveCredentialDTO", - "title": "TrieveCredential" - }, { "$ref": "#/components/schemas/CreateTwilioCredentialDTO", "title": "TwilioCredential" @@ -28801,6 +31846,10 @@ "$ref": "#/components/schemas/CreateXAiCredentialDTO", "title": "XAiCredential" }, + { + "$ref": "#/components/schemas/CreateMicrosoftCredentialDTO", + "title": "MicrosoftCredential" + }, { "$ref": "#/components/schemas/CreateGoogleCalendarOAuth2ClientCredentialDTO", "title": "GoogleCalendarOAuth2ClientCredential" @@ -28885,12 +31934,12 @@ "webhook": "#/components/schemas/CreateWebhookCredentialDTO", "custom-credential": "#/components/schemas/CreateCustomCredentialDTO", "xai": "#/components/schemas/CreateXAiCredentialDTO", + "microsoft": "#/components/schemas/CreateMicrosoftCredentialDTO", "neuphonic": "#/components/schemas/CreateNeuphonicCredentialDTO", "hume": "#/components/schemas/CreateHumeCredentialDTO", "mistral": "#/components/schemas/CreateMistralCredentialDTO", "speechmatics": "#/components/schemas/CreateSpeechmaticsCredentialDTO", "soniox": "#/components/schemas/CreateSonioxCredentialDTO", - "trieve": "#/components/schemas/CreateTrieveCredentialDTO", "google.calendar.oauth2-client": "#/components/schemas/CreateGoogleCalendarOAuth2ClientCredentialDTO", "google.calendar.oauth2-authorization": "#/components/schemas/CreateGoogleCalendarOAuth2AuthorizationCredentialDTO", "google.sheets.oauth2-authorization": "#/components/schemas/CreateGoogleSheetsOAuth2AuthorizationCredentialDTO", @@ -29086,6 +32135,14 @@ { "$ref": "#/components/schemas/SonioxTranscriber", "title": "SonioxTranscriber" + }, + { + "$ref": "#/components/schemas/XaiTranscriber", + "title": "XaiTranscriber" + }, + { + "$ref": "#/components/schemas/VapiTranscriber", + "title": "VapiTranscriber" } ] }, @@ -29155,6 +32212,10 @@ { "$ref": "#/components/schemas/XaiModel", "title": "XAI" + }, + { + "$ref": "#/components/schemas/VapiModel", + "title": "Vapi" } ] }, @@ -29232,6 +32293,14 @@ { "$ref": "#/components/schemas/MinimaxVoice", "title": "MinimaxVoice" + }, + { + "$ref": "#/components/schemas/XaiVoice", + "title": "XaiVoice" + }, + { + "$ref": "#/components/schemas/MicrosoftVoice", + "title": "MicrosoftVoice" } ] }, @@ -29644,10 +32713,6 @@ "$ref": "#/components/schemas/CreateTogetherAICredentialDTO", "title": "TogetherAICredential" }, - { - "$ref": "#/components/schemas/CreateTrieveCredentialDTO", - "title": "TrieveCredential" - }, { "$ref": "#/components/schemas/CreateTwilioCredentialDTO", "title": "TwilioCredential" @@ -29668,6 +32733,10 @@ "$ref": "#/components/schemas/CreateXAiCredentialDTO", "title": "XAiCredential" }, + { + "$ref": "#/components/schemas/CreateMicrosoftCredentialDTO", + "title": "MicrosoftCredential" + }, { "$ref": "#/components/schemas/CreateGoogleCalendarOAuth2ClientCredentialDTO", "title": "GoogleCalendarOAuth2ClientCredential" @@ -29752,12 +32821,12 @@ "webhook": "#/components/schemas/CreateWebhookCredentialDTO", "custom-credential": "#/components/schemas/CreateCustomCredentialDTO", "xai": "#/components/schemas/CreateXAiCredentialDTO", + "microsoft": "#/components/schemas/CreateMicrosoftCredentialDTO", "neuphonic": "#/components/schemas/CreateNeuphonicCredentialDTO", "hume": "#/components/schemas/CreateHumeCredentialDTO", "mistral": "#/components/schemas/CreateMistralCredentialDTO", "speechmatics": "#/components/schemas/CreateSpeechmaticsCredentialDTO", "soniox": "#/components/schemas/CreateSonioxCredentialDTO", - "trieve": "#/components/schemas/CreateTrieveCredentialDTO", "google.calendar.oauth2-client": "#/components/schemas/CreateGoogleCalendarOAuth2ClientCredentialDTO", "google.calendar.oauth2-authorization": "#/components/schemas/CreateGoogleCalendarOAuth2AuthorizationCredentialDTO", "google.sheets.oauth2-authorization": "#/components/schemas/CreateGoogleSheetsOAuth2AuthorizationCredentialDTO", @@ -29936,6 +33005,23 @@ "currentPage": { "type": "number" }, + "totalPages": { + "type": "number" + }, + "hasNextPage": { + "type": "boolean" + }, + "nextCursor": { + "type": "string", + "description": "Opaque cursor for the next page under keyset pagination (PRO-3163). Pass it\nback as the `cursor` query param to fetch the next page without an OFFSET\nscan. Present only when a further page likely exists." + }, + "sortOrder": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + }, "itemsBeyondRetention": { "type": "boolean" }, @@ -30043,6 +33129,14 @@ { "$ref": "#/components/schemas/SonioxTranscriber", "title": "SonioxTranscriber" + }, + { + "$ref": "#/components/schemas/XaiTranscriber", + "title": "XaiTranscriber" + }, + { + "$ref": "#/components/schemas/VapiTranscriber", + "title": "VapiTranscriber" } ] }, @@ -30112,6 +33206,10 @@ { "$ref": "#/components/schemas/XaiModel", "title": "XAI" + }, + { + "$ref": "#/components/schemas/VapiModel", + "title": "Vapi" } ] }, @@ -30189,6 +33287,14 @@ { "$ref": "#/components/schemas/MinimaxVoice", "title": "MinimaxVoice" + }, + { + "$ref": "#/components/schemas/XaiVoice", + "title": "XaiVoice" + }, + { + "$ref": "#/components/schemas/MicrosoftVoice", + "title": "MicrosoftVoice" } ] }, @@ -30601,10 +33707,6 @@ "$ref": "#/components/schemas/CreateTogetherAICredentialDTO", "title": "TogetherAICredential" }, - { - "$ref": "#/components/schemas/CreateTrieveCredentialDTO", - "title": "TrieveCredential" - }, { "$ref": "#/components/schemas/CreateTwilioCredentialDTO", "title": "TwilioCredential" @@ -30625,6 +33727,10 @@ "$ref": "#/components/schemas/CreateXAiCredentialDTO", "title": "XAiCredential" }, + { + "$ref": "#/components/schemas/CreateMicrosoftCredentialDTO", + "title": "MicrosoftCredential" + }, { "$ref": "#/components/schemas/CreateGoogleCalendarOAuth2ClientCredentialDTO", "title": "GoogleCalendarOAuth2ClientCredential" @@ -30709,12 +33815,12 @@ "webhook": "#/components/schemas/CreateWebhookCredentialDTO", "custom-credential": "#/components/schemas/CreateCustomCredentialDTO", "xai": "#/components/schemas/CreateXAiCredentialDTO", + "microsoft": "#/components/schemas/CreateMicrosoftCredentialDTO", "neuphonic": "#/components/schemas/CreateNeuphonicCredentialDTO", "hume": "#/components/schemas/CreateHumeCredentialDTO", "mistral": "#/components/schemas/CreateMistralCredentialDTO", "speechmatics": "#/components/schemas/CreateSpeechmaticsCredentialDTO", "soniox": "#/components/schemas/CreateSonioxCredentialDTO", - "trieve": "#/components/schemas/CreateTrieveCredentialDTO", "google.calendar.oauth2-client": "#/components/schemas/CreateGoogleCalendarOAuth2ClientCredentialDTO", "google.calendar.oauth2-authorization": "#/components/schemas/CreateGoogleCalendarOAuth2AuthorizationCredentialDTO", "google.sheets.oauth2-authorization": "#/components/schemas/CreateGoogleSheetsOAuth2AuthorizationCredentialDTO", @@ -31026,6 +34132,14 @@ { "$ref": "#/components/schemas/SonioxTranscriber", "title": "SonioxTranscriber" + }, + { + "$ref": "#/components/schemas/XaiTranscriber", + "title": "XaiTranscriber" + }, + { + "$ref": "#/components/schemas/VapiTranscriber", + "title": "VapiTranscriber" } ] }, @@ -31103,6 +34217,14 @@ { "$ref": "#/components/schemas/MinimaxVoice", "title": "MinimaxVoice" + }, + { + "$ref": "#/components/schemas/XaiVoice", + "title": "XaiVoice" + }, + { + "$ref": "#/components/schemas/MicrosoftVoice", + "title": "MicrosoftVoice" } ] }, @@ -31124,7 +34246,7 @@ "description": "This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.\nYou can also provide a custom sound by providing a URL to an audio file.", "oneOf": [ { - "type": "enum", + "type": "string", "enum": [ "off", "office" @@ -31331,10 +34453,6 @@ "$ref": "#/components/schemas/CreateTogetherAICredentialDTO", "title": "TogetherAICredential" }, - { - "$ref": "#/components/schemas/CreateTrieveCredentialDTO", - "title": "TrieveCredential" - }, { "$ref": "#/components/schemas/CreateTwilioCredentialDTO", "title": "TwilioCredential" @@ -31355,6 +34473,10 @@ "$ref": "#/components/schemas/CreateXAiCredentialDTO", "title": "XAiCredential" }, + { + "$ref": "#/components/schemas/CreateMicrosoftCredentialDTO", + "title": "MicrosoftCredential" + }, { "$ref": "#/components/schemas/CreateGoogleCalendarOAuth2ClientCredentialDTO", "title": "GoogleCalendarOAuth2ClientCredential" @@ -31439,12 +34561,12 @@ "webhook": "#/components/schemas/CreateWebhookCredentialDTO", "custom-credential": "#/components/schemas/CreateCustomCredentialDTO", "xai": "#/components/schemas/CreateXAiCredentialDTO", + "microsoft": "#/components/schemas/CreateMicrosoftCredentialDTO", "neuphonic": "#/components/schemas/CreateNeuphonicCredentialDTO", "hume": "#/components/schemas/CreateHumeCredentialDTO", "mistral": "#/components/schemas/CreateMistralCredentialDTO", "speechmatics": "#/components/schemas/CreateSpeechmaticsCredentialDTO", "soniox": "#/components/schemas/CreateSonioxCredentialDTO", - "trieve": "#/components/schemas/CreateTrieveCredentialDTO", "google.calendar.oauth2-client": "#/components/schemas/CreateGoogleCalendarOAuth2ClientCredentialDTO", "google.calendar.oauth2-authorization": "#/components/schemas/CreateGoogleCalendarOAuth2AuthorizationCredentialDTO", "google.sheets.oauth2-authorization": "#/components/schemas/CreateGoogleSheetsOAuth2AuthorizationCredentialDTO", @@ -31709,6 +34831,14 @@ { "$ref": "#/components/schemas/SonioxTranscriber", "title": "SonioxTranscriber" + }, + { + "$ref": "#/components/schemas/XaiTranscriber", + "title": "XaiTranscriber" + }, + { + "$ref": "#/components/schemas/VapiTranscriber", + "title": "VapiTranscriber" } ] }, @@ -31786,6 +34916,14 @@ { "$ref": "#/components/schemas/MinimaxVoice", "title": "MinimaxVoice" + }, + { + "$ref": "#/components/schemas/XaiVoice", + "title": "XaiVoice" + }, + { + "$ref": "#/components/schemas/MicrosoftVoice", + "title": "MicrosoftVoice" } ] }, @@ -31807,7 +34945,7 @@ "description": "This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.\nYou can also provide a custom sound by providing a URL to an audio file.", "oneOf": [ { - "type": "enum", + "type": "string", "enum": [ "off", "office" @@ -32014,10 +35152,6 @@ "$ref": "#/components/schemas/CreateTogetherAICredentialDTO", "title": "TogetherAICredential" }, - { - "$ref": "#/components/schemas/CreateTrieveCredentialDTO", - "title": "TrieveCredential" - }, { "$ref": "#/components/schemas/CreateTwilioCredentialDTO", "title": "TwilioCredential" @@ -32038,6 +35172,10 @@ "$ref": "#/components/schemas/CreateXAiCredentialDTO", "title": "XAiCredential" }, + { + "$ref": "#/components/schemas/CreateMicrosoftCredentialDTO", + "title": "MicrosoftCredential" + }, { "$ref": "#/components/schemas/CreateGoogleCalendarOAuth2ClientCredentialDTO", "title": "GoogleCalendarOAuth2ClientCredential" @@ -32122,12 +35260,12 @@ "webhook": "#/components/schemas/CreateWebhookCredentialDTO", "custom-credential": "#/components/schemas/CreateCustomCredentialDTO", "xai": "#/components/schemas/CreateXAiCredentialDTO", + "microsoft": "#/components/schemas/CreateMicrosoftCredentialDTO", "neuphonic": "#/components/schemas/CreateNeuphonicCredentialDTO", "hume": "#/components/schemas/CreateHumeCredentialDTO", "mistral": "#/components/schemas/CreateMistralCredentialDTO", "speechmatics": "#/components/schemas/CreateSpeechmaticsCredentialDTO", "soniox": "#/components/schemas/CreateSonioxCredentialDTO", - "trieve": "#/components/schemas/CreateTrieveCredentialDTO", "google.calendar.oauth2-client": "#/components/schemas/CreateGoogleCalendarOAuth2ClientCredentialDTO", "google.calendar.oauth2-authorization": "#/components/schemas/CreateGoogleCalendarOAuth2AuthorizationCredentialDTO", "google.sheets.oauth2-authorization": "#/components/schemas/CreateGoogleSheetsOAuth2AuthorizationCredentialDTO", @@ -32374,6 +35512,14 @@ { "$ref": "#/components/schemas/SonioxTranscriber", "title": "SonioxTranscriber" + }, + { + "$ref": "#/components/schemas/XaiTranscriber", + "title": "XaiTranscriber" + }, + { + "$ref": "#/components/schemas/VapiTranscriber", + "title": "VapiTranscriber" } ] }, @@ -32451,6 +35597,14 @@ { "$ref": "#/components/schemas/MinimaxVoice", "title": "MinimaxVoice" + }, + { + "$ref": "#/components/schemas/XaiVoice", + "title": "XaiVoice" + }, + { + "$ref": "#/components/schemas/MicrosoftVoice", + "title": "MicrosoftVoice" } ] }, @@ -32472,7 +35626,7 @@ "description": "This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.\nYou can also provide a custom sound by providing a URL to an audio file.", "oneOf": [ { - "type": "enum", + "type": "string", "enum": [ "off", "office" @@ -32679,10 +35833,6 @@ "$ref": "#/components/schemas/CreateTogetherAICredentialDTO", "title": "TogetherAICredential" }, - { - "$ref": "#/components/schemas/CreateTrieveCredentialDTO", - "title": "TrieveCredential" - }, { "$ref": "#/components/schemas/CreateTwilioCredentialDTO", "title": "TwilioCredential" @@ -32703,6 +35853,10 @@ "$ref": "#/components/schemas/CreateXAiCredentialDTO", "title": "XAiCredential" }, + { + "$ref": "#/components/schemas/CreateMicrosoftCredentialDTO", + "title": "MicrosoftCredential" + }, { "$ref": "#/components/schemas/CreateGoogleCalendarOAuth2ClientCredentialDTO", "title": "GoogleCalendarOAuth2ClientCredential" @@ -32787,12 +35941,12 @@ "webhook": "#/components/schemas/CreateWebhookCredentialDTO", "custom-credential": "#/components/schemas/CreateCustomCredentialDTO", "xai": "#/components/schemas/CreateXAiCredentialDTO", + "microsoft": "#/components/schemas/CreateMicrosoftCredentialDTO", "neuphonic": "#/components/schemas/CreateNeuphonicCredentialDTO", "hume": "#/components/schemas/CreateHumeCredentialDTO", "mistral": "#/components/schemas/CreateMistralCredentialDTO", "speechmatics": "#/components/schemas/CreateSpeechmaticsCredentialDTO", "soniox": "#/components/schemas/CreateSonioxCredentialDTO", - "trieve": "#/components/schemas/CreateTrieveCredentialDTO", "google.calendar.oauth2-client": "#/components/schemas/CreateGoogleCalendarOAuth2ClientCredentialDTO", "google.calendar.oauth2-authorization": "#/components/schemas/CreateGoogleCalendarOAuth2AuthorizationCredentialDTO", "google.sheets.oauth2-authorization": "#/components/schemas/CreateGoogleSheetsOAuth2AuthorizationCredentialDTO", @@ -32807,157 +35961,935 @@ } } }, - "voicemailDetection": { - "description": "This is the voicemail detection plan for the workflow.", - "oneOf": [ - { - "type": "string", - "enum": [ - "off" - ] - }, - { - "$ref": "#/components/schemas/GoogleVoicemailDetectionPlan", - "title": "Google" - }, - { - "$ref": "#/components/schemas/OpenAIVoicemailDetectionPlan", - "title": "OpenAI" - }, - { - "$ref": "#/components/schemas/TwilioVoicemailDetectionPlan", - "title": "Twilio" - }, - { - "$ref": "#/components/schemas/VapiVoicemailDetectionPlan", - "title": "Vapi" - } + "voicemailDetection": { + "description": "This is the voicemail detection plan for the workflow.", + "oneOf": [ + { + "type": "string", + "enum": [ + "off" + ] + }, + { + "$ref": "#/components/schemas/GoogleVoicemailDetectionPlan", + "title": "Google" + }, + { + "$ref": "#/components/schemas/OpenAIVoicemailDetectionPlan", + "title": "OpenAI" + }, + { + "$ref": "#/components/schemas/TwilioVoicemailDetectionPlan", + "title": "Twilio" + }, + { + "$ref": "#/components/schemas/VapiVoicemailDetectionPlan", + "title": "Vapi" + } + ] + }, + "maxDurationSeconds": { + "type": "number", + "description": "This is the maximum duration of the call in seconds.\n\nAfter this duration, the call will automatically end.\n\nDefault is 1800 (30 minutes), max is 43200 (12 hours), and min is 10 seconds.", + "minimum": 10, + "maximum": 43200, + "example": 600 + }, + "name": { + "type": "string", + "maxLength": 80 + }, + "edges": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Edge" + } + }, + "globalPrompt": { + "type": "string", + "maxLength": 5000 + }, + "server": { + "description": "This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema.\n\nThe order of precedence is:\n\n1. tool.server\n2. workflow.server / assistant.server\n3. phoneNumber.server\n4. org.server", + "allOf": [ + { + "$ref": "#/components/schemas/Server" + } + ] + }, + "compliancePlan": { + "description": "This is the compliance plan for the workflow. It allows you to configure HIPAA and other compliance settings.", + "allOf": [ + { + "$ref": "#/components/schemas/CompliancePlan" + } + ] + }, + "analysisPlan": { + "description": "This is the plan for analysis of workflow's calls. Stored in `call.analysis`.", + "allOf": [ + { + "$ref": "#/components/schemas/AnalysisPlan" + } + ] + }, + "artifactPlan": { + "description": "This is the plan for artifacts generated during workflow's calls. Stored in `call.artifact`.", + "allOf": [ + { + "$ref": "#/components/schemas/ArtifactPlan" + } + ] + }, + "startSpeakingPlan": { + "description": "This is the plan for when the workflow nodes should start talking.\n\nYou should configure this if you're running into these issues:\n- The assistant is too slow to start talking after the customer is done speaking.\n- The assistant is too fast to start talking after the customer is done speaking.\n- The assistant is so fast that it's actually interrupting the customer.", + "allOf": [ + { + "$ref": "#/components/schemas/StartSpeakingPlan" + } + ] + }, + "stopSpeakingPlan": { + "description": "This is the plan for when workflow nodes should stop talking on customer interruption.\n\nYou should configure this if you're running into these issues:\n- The assistant is too slow to recognize customer's interruption.\n- The assistant is too fast to recognize customer's interruption.\n- The assistant is getting interrupted by phrases that are just acknowledgments.\n- The assistant is getting interrupted by background noises.\n- The assistant is not properly stopping -- it starts talking right after getting interrupted.", + "allOf": [ + { + "$ref": "#/components/schemas/StopSpeakingPlan" + } + ] + }, + "monitorPlan": { + "description": "This is the plan for real-time monitoring of the workflow's calls.\n\nUsage:\n- To enable live listening of the workflow's calls, set `monitorPlan.listenEnabled` to `true`.\n- To enable live control of the workflow's calls, set `monitorPlan.controlEnabled` to `true`.", + "allOf": [ + { + "$ref": "#/components/schemas/MonitorPlan" + } + ] + }, + "backgroundSpeechDenoisingPlan": { + "description": "This enables filtering of noise and background speech while the user is talking.\n\nFeatures:\n- Smart denoising using Krisp\n- Fourier denoising\n\nBoth can be used together. Order of precedence:\n- Smart denoising\n- Fourier denoising", + "allOf": [ + { + "$ref": "#/components/schemas/BackgroundSpeechDenoisingPlan" + } + ] + }, + "credentialIds": { + "description": "These are the credentials that will be used for the workflow calls. By default, all the credentials are available for use in the call but you can provide a subset using this.", + "type": "array", + "items": { + "type": "string" + } + }, + "keypadInputPlan": { + "description": "This is the plan for keypad input handling during workflow calls.", + "allOf": [ + { + "$ref": "#/components/schemas/KeypadInputPlan" + } + ] + }, + "voicemailMessage": { + "type": "string", + "description": "This is the message that the assistant will say if the call is forwarded to voicemail.\n\nIf unspecified, it will hang up.", + "maxLength": 1000 + } + } + }, + "SubscriptionLimits": { + "type": "object", + "properties": { + "concurrencyBlocked": { + "type": "boolean", + "description": "True if this call was blocked by the Call Concurrency limit", + "default": false + }, + "concurrencyLimit": { + "type": "number", + "description": "Account Call Concurrency limit" + }, + "remainingConcurrentCalls": { + "type": "number", + "description": "Incremental number of concurrent calls that will be allowed, including this call" + } + } + }, + "UserMessage": { + "type": "object", + "properties": { + "role": { + "type": "string", + "description": "The role of the user in the conversation." + }, + "message": { + "type": "string", + "description": "The message content from the user." + }, + "time": { + "type": "number", + "description": "The timestamp when the message was sent." + }, + "endTime": { + "type": "number", + "description": "The timestamp when the message ended." + }, + "secondsFromStart": { + "type": "number", + "description": "The number of seconds from the start of the conversation." + }, + "duration": { + "type": "number", + "description": "The duration of the message in seconds." + }, + "isFiltered": { + "type": "boolean", + "description": "Indicates if the message was filtered for security reasons." + }, + "detectedThreats": { + "description": "List of detected security threats if the message was filtered.", + "type": "array", + "items": { + "type": "string" + } + }, + "originalMessage": { + "type": "string", + "description": "The original message before filtering (only included if content was filtered)." + }, + "metadata": { + "type": "object", + "description": "The metadata associated with the message. Currently used to store the transcriber's word level confidence." + }, + "speakerLabel": { + "type": "string", + "description": "Stable speaker label for diarized user speakers (e.g., \"Speaker 1\")." + } + }, + "required": [ + "role", + "message", + "time", + "endTime", + "secondsFromStart" + ] + }, + "SystemMessage": { + "type": "object", + "properties": { + "role": { + "type": "string", + "description": "The role of the system in the conversation." + }, + "message": { + "type": "string", + "description": "The message content from the system." + }, + "time": { + "type": "number", + "description": "The timestamp when the message was sent." + }, + "secondsFromStart": { + "type": "number", + "description": "The number of seconds from the start of the conversation." + } + }, + "required": [ + "role", + "message", + "time", + "secondsFromStart" + ] + }, + "BotMessage": { + "type": "object", + "properties": { + "role": { + "type": "string", + "description": "The role of the bot in the conversation." + }, + "message": { + "type": "string", + "description": "The message content from the bot." + }, + "time": { + "type": "number", + "description": "The timestamp when the message was sent." + }, + "endTime": { + "type": "number", + "description": "The timestamp when the message ended." + }, + "secondsFromStart": { + "type": "number", + "description": "The number of seconds from the start of the conversation." + }, + "source": { + "type": "string", + "description": "The source of the message." + }, + "duration": { + "type": "number", + "description": "The duration of the message in seconds." + }, + "assistantName": { + "type": "string", + "description": "The name of the assistant that produced this message. In a squad or\nhandoff call this is the specific sub-agent active when the message was\nspoken, letting the transcript label each message by speaker." + }, + "assistantId": { + "type": "string", + "description": "The ID of the assistant that produced this message. Stable reference for\nthe assistant named in `assistantName`." + } + }, + "required": [ + "role", + "message", + "time", + "endTime", + "secondsFromStart" + ] + }, + "ToolCallMessage": { + "type": "object", + "properties": { + "role": { + "type": "string", + "description": "The role of the tool call in the conversation." + }, + "toolCalls": { + "description": "The list of tool calls made during the conversation.", + "type": "array", + "items": { + "type": "object" + } + }, + "message": { + "type": "string", + "description": "The message content for the tool call." + }, + "time": { + "type": "number", + "description": "The timestamp when the message was sent." + }, + "secondsFromStart": { + "type": "number", + "description": "The number of seconds from the start of the conversation." + } + }, + "required": [ + "role", + "toolCalls", + "message", + "time", + "secondsFromStart" + ] + }, + "ToolCallResultMessageWarning": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The kind of warning. Currently:\n- `oversized-tool-response`: the tool's serialized response exceeded the\n recommended size and is likely to bloat the model context, increasing\n latency and risking truncation of earlier instructions.", + "enum": [ + "oversized-tool-response" + ] + }, + "tokenCount": { + "type": "number", + "description": "The estimated number of tokens in the serialized tool response." + }, + "threshold": { + "type": "number", + "description": "The threshold (in tokens) above which the warning is raised." + } + }, + "required": [ + "type", + "tokenCount", + "threshold" + ] + }, + "ToolCallResultMessage": { + "type": "object", + "properties": { + "role": { + "type": "string", + "description": "The role of the tool call result in the conversation." + }, + "toolCallId": { + "type": "string", + "description": "The ID of the tool call." + }, + "name": { + "type": "string", + "description": "The name of the tool that returned the result." + }, + "result": { + "type": "string", + "description": "The result of the tool call in JSON format." + }, + "time": { + "type": "number", + "description": "The timestamp when the message was sent." + }, + "secondsFromStart": { + "type": "number", + "description": "The number of seconds from the start of the conversation." + }, + "metadata": { + "type": "object", + "description": "The metadata for the tool call result." + }, + "warnings": { + "description": "Warnings raised for this tool call result, e.g. when the response is\nlarger than recommended for voice AI context windows.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ToolCallResultMessageWarning" + } + } + }, + "required": [ + "role", + "toolCallId", + "name", + "result", + "time", + "secondsFromStart" + ] + }, + "TransportCost": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the type of cost, always 'transport' for this class.", + "enum": [ + "transport" + ] + }, + "provider": { + "type": "string", + "enum": [ + "daily", + "vapi.websocket", + "twilio", + "vonage", + "telnyx", + "vapi.sip" + ] + }, + "minutes": { + "type": "number", + "description": "This is the minutes of `transport` usage. This should match `call.endedAt` - `call.startedAt`." + }, + "cost": { + "type": "number", + "description": "This is the cost of the component in USD." + } + }, + "required": [ + "type", + "minutes", + "cost" + ] + }, + "TranscriberCost": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the type of cost, always 'transcriber' for this class.", + "enum": [ + "transcriber" + ] + }, + "transcriber": { + "type": "object", + "description": "This is the transcriber that was used during the call.\n\nThis matches one of the below:\n- `call.assistant.transcriber`,\n- `call.assistantId->transcriber`,\n- `call.squad[n].assistant.transcriber`,\n- `call.squad[n].assistantId->transcriber`,\n- `call.squadId->[n].assistant.transcriber`,\n- `call.squadId->[n].assistantId->transcriber`." + }, + "minutes": { + "type": "number", + "description": "This is the minutes of `transcriber` usage. This should match `call.endedAt` - `call.startedAt` for single assistant calls, while squad calls will have multiple transcriber costs one for each assistant that was used." + }, + "cost": { + "type": "number", + "description": "This is the cost of the component in USD." + } + }, + "required": [ + "type", + "transcriber", + "minutes", + "cost" + ] + }, + "ModelCost": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the type of cost, always 'model' for this class.", + "enum": [ + "model" ] }, - "maxDurationSeconds": { + "model": { + "type": "object", + "description": "This is the model that was used during the call.\n\nThis matches one of the following:\n- `call.assistant.model`,\n- `call.assistantId->model`,\n- `call.squad[n].assistant.model`,\n- `call.squad[n].assistantId->model`,\n- `call.squadId->[n].assistant.model`,\n- `call.squadId->[n].assistantId->model`." + }, + "promptTokens": { "type": "number", - "description": "This is the maximum duration of the call in seconds.\n\nAfter this duration, the call will automatically end.\n\nDefault is 1800 (30 minutes), max is 43200 (12 hours), and min is 10 seconds.", - "minimum": 10, - "maximum": 43200, - "example": 600 + "description": "This is the number of prompt tokens used in the call. These should be total prompt tokens used in the call for single assistant calls, while squad calls will have multiple model costs one for each assistant that was used." }, - "name": { + "completionTokens": { + "type": "number", + "description": "This is the number of completion tokens generated in the call. These should be total completion tokens used in the call for single assistant calls, while squad calls will have multiple model costs one for each assistant that was used." + }, + "cachedPromptTokens": { + "type": "number", + "description": "This is the number of cached prompt tokens used in the call. This is only applicable to certain providers (e.g., OpenAI, Azure OpenAI) that support prompt caching. Cached tokens are billed at a discounted rate." + }, + "cost": { + "type": "number", + "description": "This is the cost of the component in USD." + } + }, + "required": [ + "type", + "model", + "promptTokens", + "completionTokens", + "cost" + ] + }, + "VoiceCost": { + "type": "object", + "properties": { + "type": { "type": "string", - "maxLength": 80 + "description": "This is the type of cost, always 'voice' for this class.", + "enum": [ + "voice" + ] }, - "edges": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Edge" - } + "voice": { + "type": "object", + "description": "This is the voice that was used during the call.\n\nThis matches one of the following:\n- `call.assistant.voice`,\n- `call.assistantId->voice`,\n- `call.squad[n].assistant.voice`,\n- `call.squad[n].assistantId->voice`,\n- `call.squadId->[n].assistant.voice`,\n- `call.squadId->[n].assistantId->voice`." }, - "globalPrompt": { + "characters": { + "type": "number", + "description": "This is the number of characters that were generated during the call. These should be total characters used in the call for single assistant calls, while squad calls will have multiple voice costs one for each assistant that was used." + }, + "cost": { + "type": "number", + "description": "This is the cost of the component in USD." + } + }, + "required": [ + "type", + "voice", + "characters", + "cost" + ] + }, + "ChatCost": { + "type": "object", + "properties": { + "type": { "type": "string", - "maxLength": 5000 + "description": "This is the type of cost, always 'chat' for this class.", + "enum": [ + "chat" + ] }, - "server": { - "description": "This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema.\n\nThe order of precedence is:\n\n1. tool.server\n2. workflow.server / assistant.server\n3. phoneNumber.server\n4. org.server", - "allOf": [ - { - "$ref": "#/components/schemas/Server" - } + "cost": { + "type": "number", + "description": "This is the cost of the component in USD." + } + }, + "required": [ + "type", + "cost" + ] + }, + "VapiCost": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the type of cost, always 'vapi' for this class.", + "enum": [ + "vapi" ] }, - "compliancePlan": { - "description": "This is the compliance plan for the workflow. It allows you to configure HIPAA and other compliance settings.", - "allOf": [ - { - "$ref": "#/components/schemas/CompliancePlan" - } + "subType": { + "type": "string", + "description": "This is the sub type of the cost.", + "enum": [ + "normal", + "overage" ] }, - "analysisPlan": { - "description": "This is the plan for analysis of workflow's calls. Stored in `call.analysis`.", - "allOf": [ - { - "$ref": "#/components/schemas/AnalysisPlan" - } + "minutes": { + "type": "number", + "description": "This is the minutes of Vapi usage. This should match `call.endedAt` - `call.startedAt`." + }, + "cost": { + "type": "number", + "description": "This is the cost of the component in USD." + } + }, + "required": [ + "type", + "subType", + "minutes", + "cost" + ] + }, + "VoicemailDetectionCost": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the type of cost, always 'voicemail-detection' for this class.", + "enum": [ + "voicemail-detection" ] }, - "artifactPlan": { - "description": "This is the plan for artifacts generated during workflow's calls. Stored in `call.artifact`.", - "allOf": [ - { - "$ref": "#/components/schemas/ArtifactPlan" - } + "model": { + "type": "object", + "description": "This is the model that was used to perform the analysis." + }, + "provider": { + "type": "string", + "description": "This is the provider that was used to detect the voicemail.", + "enum": [ + "twilio", + "google", + "openai", + "vapi" ] }, - "startSpeakingPlan": { - "description": "This is the plan for when the workflow nodes should start talking.\n\nYou should configure this if you're running into these issues:\n- The assistant is too slow to start talking after the customer is done speaking.\n- The assistant is too fast to start talking after the customer is done speaking.\n- The assistant is so fast that it's actually interrupting the customer.", - "allOf": [ - { - "$ref": "#/components/schemas/StartSpeakingPlan" - } + "promptTextTokens": { + "type": "number", + "description": "This is the number of prompt text tokens used in the voicemail detection." + }, + "promptAudioTokens": { + "type": "number", + "description": "This is the number of prompt audio tokens used in the voicemail detection." + }, + "completionTextTokens": { + "type": "number", + "description": "This is the number of completion text tokens used in the voicemail detection." + }, + "completionAudioTokens": { + "type": "number", + "description": "This is the number of completion audio tokens used in the voicemail detection." + }, + "cost": { + "type": "number", + "description": "This is the cost of the component in USD." + } + }, + "required": [ + "type", + "model", + "provider", + "promptTextTokens", + "promptAudioTokens", + "completionTextTokens", + "completionAudioTokens", + "cost" + ] + }, + "AnalysisCost": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the type of cost, always 'analysis' for this class.", + "enum": [ + "analysis" ] }, - "stopSpeakingPlan": { - "description": "This is the plan for when workflow nodes should stop talking on customer interruption.\n\nYou should configure this if you're running into these issues:\n- The assistant is too slow to recognize customer's interruption.\n- The assistant is too fast to recognize customer's interruption.\n- The assistant is getting interrupted by phrases that are just acknowledgments.\n- The assistant is getting interrupted by background noises.\n- The assistant is not properly stopping -- it starts talking right after getting interrupted.", - "allOf": [ - { - "$ref": "#/components/schemas/StopSpeakingPlan" - } + "analysisType": { + "type": "string", + "description": "This is the type of analysis performed.", + "enum": [ + "summary", + "structuredData", + "successEvaluation", + "structuredOutput" ] }, - "monitorPlan": { - "description": "This is the plan for real-time monitoring of the workflow's calls.\n\nUsage:\n- To enable live listening of the workflow's calls, set `monitorPlan.listenEnabled` to `true`.\n- To enable live control of the workflow's calls, set `monitorPlan.controlEnabled` to `true`.", - "allOf": [ - { - "$ref": "#/components/schemas/MonitorPlan" - } + "model": { + "type": "object", + "description": "This is the model that was used to perform the analysis." + }, + "promptTokens": { + "type": "number", + "description": "This is the number of prompt tokens used in the analysis." + }, + "completionTokens": { + "type": "number", + "description": "This is the number of completion tokens generated in the analysis." + }, + "cachedPromptTokens": { + "type": "number", + "description": "This is the number of cached prompt tokens used in the analysis. This is only applicable to certain providers (e.g., OpenAI, Azure OpenAI) that support prompt caching. Cached tokens are billed at a discounted rate." + }, + "cost": { + "type": "number", + "description": "This is the cost of the component in USD." + } + }, + "required": [ + "type", + "analysisType", + "model", + "promptTokens", + "completionTokens", + "cost" + ] + }, + "AudioFormat": { + "type": "object", + "properties": { + "sampleRate": { + "type": "number", + "description": "This is the sample rate of the call.\n\n@default 16000", + "minimum": 0, + "maximum": 192000 + }, + "format": { + "type": "object", + "description": "This is the audio format of the call.\n\n@default 'pcm_s16le'", + "enum": [ + "pcm_s16le", + "mulaw" ] }, - "backgroundSpeechDenoisingPlan": { - "description": "This enables filtering of noise and background speech while the user is talking.\n\nFeatures:\n- Smart denoising using Krisp\n- Fourier denoising\n\nBoth can be used together. Order of precedence:\n- Smart denoising\n- Fourier denoising", - "allOf": [ - { - "$ref": "#/components/schemas/BackgroundSpeechDenoisingPlan" - } + "container": { + "type": "string", + "description": "This is the container format of the call.\n\n@default 'raw'", + "enum": [ + "raw" + ] + } + }, + "required": [ + "sampleRate", + "format" + ] + }, + "VapiWebsocketTransport": { + "type": "object", + "properties": { + "conversationType": { + "type": "string", + "description": "This is the conversation type of the call (ie, voice or chat).", + "default": "voice", + "enum": [ + "voice" ] }, - "credentialIds": { - "description": "These are the credentials that will be used for the workflow calls. By default, all the credentials are available for use in the call but you can provide a subset using this.", - "type": "array", - "items": { - "type": "string" - } + "provider": { + "type": "string", + "description": "Vapi websocket transport provider", + "enum": [ + "vapi.websocket" + ] }, - "keypadInputPlan": { - "description": "This is the plan for keypad input handling during workflow calls.", + "audioFormat": { + "description": "This is the audio format of the call. Defaults to 16KHz raw pcm_s16le", "allOf": [ { - "$ref": "#/components/schemas/KeypadInputPlan" + "$ref": "#/components/schemas/AudioFormat" } ] + } + }, + "required": [ + "provider" + ] + }, + "VapiWebCallTransport": { + "type": "object", + "properties": { + "conversationType": { + "type": "string", + "description": "This is the conversation type of the call (ie, voice or chat).", + "default": "voice", + "enum": [ + "voice" + ] }, - "voicemailMessage": { + "provider": { "type": "string", - "description": "This is the message that the assistant will say if the call is forwarded to voicemail.\n\nIf unspecified, it will hang up.", - "maxLength": 1000 + "description": "Vapi web call transport provider", + "enum": [ + "daily" + ] + }, + "roomDeleteOnUserLeaveEnabled": { + "type": "boolean", + "description": "This determines whether the daily room will be deleted and all participants will be kicked once the user leaves the room.\nIf set to `false`, the room will be kept alive even after the user leaves, allowing clients to reconnect to the same room.\nIf set to `true`, the room will be deleted and reconnection will not be allowed.\n\nDefaults to `true`.", + "example": true, + "default": true + }, + "callUrl": { + "type": "string", + "description": "This is the URL of the web call." + }, + "callSipUri": { + "type": "string", + "description": "This is the SIP URI of the web call." } - } + }, + "required": [ + "provider" + ] }, - "SubscriptionLimits": { + "TwilioTransport": { "type": "object", "properties": { - "concurrencyBlocked": { - "type": "boolean", - "description": "True if this call was blocked by the Call Concurrency limit", - "default": false + "conversationType": { + "type": "string", + "description": "This is the conversation type of the call (ie, voice or chat).", + "default": "voice", + "enum": [ + "voice" + ] }, - "concurrencyLimit": { - "type": "number", - "description": "Account Call Concurrency limit" + "provider": { + "type": "string", + "description": "Twilio transport provider", + "enum": [ + "twilio" + ] }, - "remainingConcurrentCalls": { + "accountSid": { + "type": "string", + "description": "This is the account SID of the Twilio account." + }, + "callSid": { + "type": "string", + "description": "This is the call SID of the Twilio call." + }, + "callToken": { + "type": "string", + "description": "This is the call token of the Twilio call." + }, + "forwardedFrom": { + "type": "string", + "description": "This is the phone number from which the call was forwarded.\nUndefined if the call was not forwarded." + } + }, + "required": [ + "provider" + ] + }, + "TelnyxTransport": { + "type": "object", + "properties": { + "conversationType": { + "type": "string", + "description": "This is the conversation type of the call (ie, voice or chat).", + "default": "voice", + "enum": [ + "voice" + ] + }, + "provider": { + "type": "string", + "description": "Telnyx transport provider", + "enum": [ + "telnyx" + ] + }, + "callControlId": { + "type": "string", + "description": "This is the call control ID of the Telnyx call." + }, + "callLegId": { + "type": "string", + "description": "This is the call leg ID of the Telnyx call." + }, + "callSessionId": { + "type": "string", + "description": "This is the call session ID of the Telnyx call." + } + }, + "required": [ + "provider" + ] + }, + "VapiSipTransport": { + "type": "object", + "properties": { + "conversationType": { + "type": "string", + "description": "This is the conversation type of the call (ie, voice or chat).", + "default": "voice", + "enum": [ + "voice" + ] + }, + "provider": { + "type": "string", + "description": "Vapi SIP transport provider", + "enum": [ + "vapi.sip" + ] + }, + "dialTimeout": { "type": "number", - "description": "Incremental number of concurrent calls that will be allowed, including this call" + "description": "This sets the timeout for outbound dial operations in seconds. This is the duration the call will ring before timing out.\n\n@default 60", + "minimum": 1, + "maximum": 600, + "default": 60 + }, + "sbcCallSid": { + "type": "string", + "description": "This is the call SID of the Vapi SIP call." + }, + "callSid": { + "type": "string", + "description": "This is the call ID of the Vapi SIP call." } - } + }, + "required": [ + "provider" + ] + }, + "VonageTransport": { + "type": "object", + "properties": { + "conversationType": { + "type": "string", + "description": "This is the conversation type of the call (ie, voice or chat).", + "default": "voice", + "enum": [ + "voice" + ] + }, + "provider": { + "type": "string", + "description": "Vonage transport provider", + "enum": [ + "vonage" + ] + }, + "conversationUUID": { + "type": "string", + "description": "This is the conversation UUID of the Vonage call." + }, + "callUUID": { + "type": "string", + "description": "This is the call ID of the Vonage call." + } + }, + "required": [ + "provider" + ] }, "AnalysisCostBreakdown": { "type": "object", @@ -33143,6 +37075,86 @@ } } }, + "TransferArtifact": { + "type": "object", + "properties": { + "destination": { + "description": "The transfer destination (phone number or SIP URI).", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "Number" + }, + { + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "Sip" + } + ] + }, + "mode": { + "type": "string", + "description": "The transfer mode (e.g. warm-transfer-experimental, blind-transfer).", + "enum": [ + "blind-transfer", + "blind-transfer-add-summary-to-sip-header", + "warm-transfer-say-message", + "warm-transfer-say-summary", + "warm-transfer-twiml", + "warm-transfer-wait-for-operator-to-speak-first-and-then-say-message", + "warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary", + "warm-transfer-experimental" + ] + }, + "transcript": { + "type": "string", + "description": "Flat-text transcript / announcement preview of the transfer." + }, + "status": { + "type": "string", + "description": "The terminal status of the transfer, rendered as the status line.", + "enum": [ + "connected", + "no-answer", + "busy", + "voicemail", + "failed", + "completed", + "cancelled" + ] + }, + "messages": { + "type": "array", + "description": "The agent↔operator conversation captured during a\nwarm-transfer-experimental, rendered as bubbles.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/UserMessage", + "title": "UserMessage" + }, + { + "$ref": "#/components/schemas/SystemMessage", + "title": "SystemMessage" + }, + { + "$ref": "#/components/schemas/BotMessage", + "title": "BotMessage" + }, + { + "$ref": "#/components/schemas/ToolCallMessage", + "title": "ToolCallMessage" + }, + { + "$ref": "#/components/schemas/ToolCallResultMessage", + "title": "ToolCallResultMessage" + } + ] + } + } + }, + "required": [ + "destination" + ] + }, "Mono": { "type": "object", "properties": { @@ -33353,6 +37365,13 @@ "$ref": "#/components/schemas/OpenAIMessage" } }, + "transfers": { + "description": "These are the transfer records from warm transfers, including destinations, transcripts, and status.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferArtifact" + } + }, "recordingUrl": { "type": "string", "description": "This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.", @@ -33427,13 +37446,6 @@ "type": "object", "description": "These are the scorecards that have been evaluated based on the structured outputs extracted during the call.\nTo enable, set `assistant.artifactPlan.scorecardIds` or `assistant.artifactPlan.scorecards` with the IDs or objects of the scorecards you want to evaluate." }, - "transfers": { - "description": "These are the transfer records from warm transfers, including destinations, transcripts, and status.", - "type": "array", - "items": { - "type": "string" - } - }, "structuredOutputsLastUpdatedAt": { "format": "date-time", "type": "string", @@ -33445,8 +37457,12 @@ "type": "object", "properties": { "type": { - "type": "object", - "description": "This is the type of recording consent." + "type": "string", + "description": "This is the type of recording consent.", + "enum": [ + "stay-on-line", + "verbal" + ] }, "grantedAt": { "format": "date-time", @@ -33805,6 +37821,14 @@ } ] }, + "squadOverrides": { + "description": "These are the overrides applied when the call targets a `squadId`. Mirrors\nthe call-level `squadOverrides` — use this instead of `assistantOverrides`\nwhen the campaign or call is squad-based.", + "allOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides" + } + ] + }, "number": { "type": "string", "description": "This is the number of the customer.", @@ -34010,6 +38034,9 @@ "pipeline-error-inworld-voice-failed", "pipeline-error-minimax-voice-failed", "pipeline-error-wellsaid-voice-failed", + "pipeline-error-xai-voice-failed", + "pipeline-error-microsoft-voice-failed", + "pipeline-error-microsoft-voice-request-canceled", "pipeline-error-tavus-video-failed", "call.in-progress.error-vapifault-openai-voice-failed", "call.in-progress.error-vapifault-cartesia-voice-failed", @@ -34027,6 +38054,8 @@ "call.in-progress.error-vapifault-inworld-voice-failed", "call.in-progress.error-vapifault-minimax-voice-failed", "call.in-progress.error-vapifault-wellsaid-voice-failed", + "call.in-progress.error-vapifault-xai-voice-failed", + "call.in-progress.error-vapifault-microsoft-voice-failed", "call.in-progress.error-vapifault-tavus-video-failed", "pipeline-error-vapi-llm-failed", "pipeline-error-vapi-400-bad-request-validation-failed", @@ -34036,12 +38065,17 @@ "pipeline-error-vapi-500-server-error", "pipeline-error-vapi-503-server-overloaded-error", "call.in-progress.error-providerfault-vapi-llm-failed", + "call.in-progress.error-vapifault-vapi-llm-failed", "call.in-progress.error-vapifault-vapi-400-bad-request-validation-failed", "call.in-progress.error-vapifault-vapi-401-unauthorized", "call.in-progress.error-vapifault-vapi-403-model-access-denied", "call.in-progress.error-vapifault-vapi-429-exceeded-quota", "call.in-progress.error-providerfault-vapi-500-server-error", "call.in-progress.error-providerfault-vapi-503-server-overloaded-error", + "pipeline-error-vapi-transcriber-failed", + "call.in-progress.error-vapifault-vapi-transcriber-failed", + "call.in-progress.error-providerfault-vapi-transcriber-failed", + "call.in-progress.error-providerfault-vapi-voice-failed", "pipeline-error-deepgram-transcriber-failed", "pipeline-error-deepgram-transcriber-api-key-missing", "call.in-progress.error-vapifault-deepgram-transcriber-failed", @@ -34081,6 +38115,18 @@ "call.in-progress.error-vapifault-soniox-transcriber-invalid-config", "call.in-progress.error-vapifault-soniox-transcriber-server-error", "call.in-progress.error-vapifault-soniox-transcriber-failed", + "pipeline-error-xai-transcriber-auth-failed", + "pipeline-error-xai-transcriber-rate-limited", + "pipeline-error-xai-transcriber-invalid-config", + "pipeline-error-xai-transcriber-server-error", + "pipeline-error-xai-transcriber-failed", + "call.in-progress.error-vapifault-xai-transcriber-auth-failed", + "call.in-progress.error-vapifault-xai-transcriber-rate-limited", + "call.in-progress.error-vapifault-xai-transcriber-invalid-config", + "call.in-progress.error-vapifault-xai-transcriber-server-error", + "call.in-progress.error-vapifault-xai-transcriber-failed", + "pipeline-error-cartesia-transcriber-failed", + "call.in-progress.error-vapifault-cartesia-transcriber-failed", "call.in-progress.error-pipeline-no-available-llm-model", "worker-shutdown", "vonage-disconnected", @@ -34516,6 +38562,18 @@ "call.in-progress.error-vapifault-soniox-transcriber-invalid-config", "call.in-progress.error-vapifault-soniox-transcriber-server-error", "call.in-progress.error-vapifault-soniox-transcriber-failed", + "pipeline-error-xai-transcriber-auth-failed", + "pipeline-error-xai-transcriber-rate-limited", + "pipeline-error-xai-transcriber-invalid-config", + "pipeline-error-xai-transcriber-server-error", + "pipeline-error-xai-transcriber-failed", + "call.in-progress.error-vapifault-xai-transcriber-auth-failed", + "call.in-progress.error-vapifault-xai-transcriber-rate-limited", + "call.in-progress.error-vapifault-xai-transcriber-invalid-config", + "call.in-progress.error-vapifault-xai-transcriber-server-error", + "call.in-progress.error-vapifault-xai-transcriber-failed", + "pipeline-error-cartesia-transcriber-failed", + "call.in-progress.error-vapifault-cartesia-transcriber-failed", "call.in-progress.error-warm-transfer-max-duration", "call.in-progress.error-warm-transfer-assistant-cancelled", "call.in-progress.error-warm-transfer-silence-timeout", @@ -34577,6 +38635,35 @@ } ] }, + "transport": { + "description": "This is the transport of the call.", + "oneOf": [ + { + "$ref": "#/components/schemas/VapiWebsocketTransport", + "title": "VapiWebsocketTransport" + }, + { + "$ref": "#/components/schemas/VonageTransport", + "title": "VonageTransport" + }, + { + "$ref": "#/components/schemas/TwilioTransport", + "title": "TwilioTransport" + }, + { + "$ref": "#/components/schemas/VapiSipTransport", + "title": "VapiSipTransport" + }, + { + "$ref": "#/components/schemas/TelnyxTransport", + "title": "TelnyxTransport" + }, + { + "$ref": "#/components/schemas/VapiWebCallTransport", + "title": "VapiWebCallTransport" + } + ] + }, "id": { "type": "string", "description": "This is the unique identifier for the call." @@ -34762,18 +38849,6 @@ "$ref": "#/components/schemas/SchedulePlan" } ] - }, - "transport": { - "type": "object", - "description": "This is the transport of the call." - }, - "subscriptionLimits": { - "description": "These are the subscription limits for the org at the time of the call. Includes concurrency limit information.", - "allOf": [ - { - "$ref": "#/components/schemas/SubscriptionLimits" - } - ] } }, "required": [ @@ -34933,6 +39008,35 @@ "CreateCallDTO": { "type": "object", "properties": { + "transport": { + "description": "This is the transport of the call.", + "oneOf": [ + { + "$ref": "#/components/schemas/VapiWebsocketTransport", + "title": "VapiWebsocketTransport" + }, + { + "$ref": "#/components/schemas/VonageTransport", + "title": "VonageTransport" + }, + { + "$ref": "#/components/schemas/TwilioTransport", + "title": "TwilioTransport" + }, + { + "$ref": "#/components/schemas/VapiSipTransport", + "title": "VapiSipTransport" + }, + { + "$ref": "#/components/schemas/TelnyxTransport", + "title": "TelnyxTransport" + }, + { + "$ref": "#/components/schemas/VapiWebCallTransport", + "title": "VapiWebCallTransport" + } + ] + }, "customers": { "description": "This is used to issue batch calls to multiple customers.\n\nOnly relevant for `outboundPhoneCall`. To call a single customer, use `customer` instead.", "type": "array", @@ -34953,10 +39057,6 @@ } ] }, - "transport": { - "type": "object", - "description": "This is the transport of the call." - }, "assistantId": { "type": "string", "description": "This is the assistant ID that will be used for the call. To use a transient assistant, use `assistant` instead.\n\nTo start a call with:\n- Assistant, use `assistantId` or `assistant`\n- Squad, use `squadId` or `squad`\n- Workflow, use `workflowId` or `workflow`" @@ -35101,6 +39201,35 @@ "CreateOutboundCallDTO": { "type": "object", "properties": { + "transport": { + "description": "This is the transport of the call.", + "oneOf": [ + { + "$ref": "#/components/schemas/VapiWebsocketTransport", + "title": "VapiWebsocketTransport" + }, + { + "$ref": "#/components/schemas/VonageTransport", + "title": "VonageTransport" + }, + { + "$ref": "#/components/schemas/TwilioTransport", + "title": "TwilioTransport" + }, + { + "$ref": "#/components/schemas/VapiSipTransport", + "title": "VapiSipTransport" + }, + { + "$ref": "#/components/schemas/TelnyxTransport", + "title": "TelnyxTransport" + }, + { + "$ref": "#/components/schemas/VapiWebCallTransport", + "title": "VapiWebCallTransport" + } + ] + }, "customers": { "description": "This is used to issue batch calls to multiple customers.\n\nOnly relevant for `outboundPhoneCall`. To call a single customer, use `customer` instead.", "type": "array", @@ -35121,10 +39250,6 @@ } ] }, - "transport": { - "type": "object", - "description": "This is the transport of the call." - }, "assistantId": { "type": "string", "description": "This is the assistant ID that will be used for the call. To use a transient assistant, use `assistant` instead.\n\nTo start a call with:\n- Assistant, use `assistantId` or `assistant`\n- Squad, use `squadId` or `squad`\n- Workflow, use `workflowId` or `workflow`" @@ -35333,92 +39458,6 @@ "content" ] }, - "SystemMessage": { - "type": "object", - "properties": { - "role": { - "type": "string", - "description": "The role of the system in the conversation." - }, - "message": { - "type": "string", - "description": "The message content from the system." - }, - "time": { - "type": "number", - "description": "The timestamp when the message was sent." - }, - "secondsFromStart": { - "type": "number", - "description": "The number of seconds from the start of the conversation." - } - }, - "required": [ - "role", - "message", - "time", - "secondsFromStart" - ] - }, - "UserMessage": { - "type": "object", - "properties": { - "role": { - "type": "string", - "description": "The role of the user in the conversation." - }, - "message": { - "type": "string", - "description": "The message content from the user." - }, - "time": { - "type": "number", - "description": "The timestamp when the message was sent." - }, - "endTime": { - "type": "number", - "description": "The timestamp when the message ended." - }, - "secondsFromStart": { - "type": "number", - "description": "The number of seconds from the start of the conversation." - }, - "duration": { - "type": "number", - "description": "The duration of the message in seconds." - }, - "isFiltered": { - "type": "boolean", - "description": "Indicates if the message was filtered for security reasons." - }, - "detectedThreats": { - "description": "List of detected security threats if the message was filtered.", - "type": "array", - "items": { - "type": "string" - } - }, - "originalMessage": { - "type": "string", - "description": "The original message before filtering (only included if content was filtered)." - }, - "metadata": { - "type": "object", - "description": "The metadata associated with the message. Currently used to store the transcriber's word level confidence." - }, - "speakerLabel": { - "type": "string", - "description": "Stable speaker label for diarized user speakers (e.g., \"Speaker 1\")." - } - }, - "required": [ - "role", - "message", - "time", - "endTime", - "secondsFromStart" - ] - }, "ToolCallFunction": { "type": "object", "properties": { @@ -35957,6 +39996,15 @@ "DESC" ] }, + "sortBy": { + "type": "string", + "description": "This is the column to sort by. Defaults to 'createdAt'.", + "enum": [ + "createdAt", + "duration", + "cost" + ] + }, "limit": { "type": "number", "description": "This is the maximum number of items to return. Defaults to 100.", @@ -36555,6 +40603,15 @@ "DESC" ] }, + "sortBy": { + "type": "string", + "description": "This is the column to sort by. Defaults to 'createdAt'.", + "enum": [ + "createdAt", + "duration", + "cost" + ] + }, "limit": { "type": "number", "description": "This is the maximum number of items to return. Defaults to 100.", @@ -36928,11 +40985,44 @@ ] }, "customers": { - "description": "These are the customers that will be called in the campaign. Required if dialPlan is not provided.", + "description": "These are the customers that will be called in the campaign. Required if dialPlan is not provided. Maximum of 10000 customers per campaign.", "type": "array", "items": { "$ref": "#/components/schemas/CreateCustomerDTO" } + }, + "maxConcurrency": { + "type": "number", + "minimum": 1, + "description": "This is the maximum number of concurrent calls that will be made for the campaign. Defaults to 10." + }, + "assistantOverrides": { + "description": "These are the overrides for the assistant's settings and template variables for the campaign. Use this when the campaign targets an `assistantId`.", + "allOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides" + } + ] + }, + "squadOverrides": { + "description": "These are the overrides for the squad and template variables for the campaign. Use this when the campaign targets a `squadId`. Per-contact `squadOverrides` are deep-merged on top of this at dispatch time.", + "allOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides" + } + ] + }, + "server": { + "description": "This is the server (URL, auth headers, timeout, etc.) for the campaign webhooks.", + "allOf": [ + { + "$ref": "#/components/schemas/Server" + } + ] + }, + "duplicateFromCampaignId": { + "type": "string", + "description": "Optional campaign ID to duplicate config from. Provided fields in the request override the source. If `customers` is omitted, contacts are copied from the source." } }, "required": [ @@ -36948,7 +41038,9 @@ "enum": [ "scheduled", "in-progress", - "ended" + "ended", + "cancelled", + "archived" ] }, "endedReason": { @@ -36997,12 +41089,41 @@ ] }, "customers": { - "description": "These are the customers that will be called in the campaign. Required if dialPlan is not provided.", + "description": "These are the customers that will be called in the campaign. Required if dialPlan is not provided. Maximum of 10000 customers per campaign.", "type": "array", "items": { "$ref": "#/components/schemas/CreateCustomerDTO" } }, + "maxConcurrency": { + "type": "number", + "minimum": 1, + "description": "This is the maximum number of concurrent calls that will be made for the campaign. Defaults to 10." + }, + "assistantOverrides": { + "description": "These are the overrides for the assistant's settings and template variables for the campaign. Use this when the campaign targets an `assistantId`.", + "allOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides" + } + ] + }, + "squadOverrides": { + "description": "These are the overrides for the squad and template variables for the campaign. Use this when the campaign targets a `squadId`. Per-contact `squadOverrides` are deep-merged on top of this at dispatch time.", + "allOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides" + } + ] + }, + "server": { + "description": "This is the server (URL, auth headers, timeout, etc.) for the campaign webhooks.", + "allOf": [ + { + "$ref": "#/components/schemas/Server" + } + ] + }, "id": { "type": "string", "description": "This is the unique identifier for the campaign." @@ -37119,9 +41240,10 @@ }, "status": { "type": "string", - "description": "This is the status of the campaign.\nCan only be updated to 'ended' if you want to end the campaign.\nWhen set to 'ended', it will delete all scheduled calls. Calls in progress will be allowed to complete.", + "description": "Set to 'cancelled' to stop the campaign ('ended' is a V1 alias). Scheduled\ncalls are deleted; in-progress calls are allowed to finish.", "enum": [ - "ended" + "ended", + "cancelled" ] } } @@ -37706,6 +41828,15 @@ "DESC" ] }, + "sortBy": { + "type": "string", + "description": "This is the column to sort by. Defaults to 'createdAt'.", + "enum": [ + "createdAt", + "duration", + "cost" + ] + }, "limit": { "type": "number", "description": "This is the maximum number of items to return. Defaults to 100.", @@ -37882,6 +42013,15 @@ "DESC" ] }, + "sortBy": { + "type": "string", + "description": "This is the column to sort by. Defaults to 'createdAt'.", + "enum": [ + "createdAt", + "duration", + "cost" + ] + }, "limit": { "type": "number", "description": "This is the maximum number of items to return. Defaults to 100.", @@ -38288,7 +42428,7 @@ "properties": { "realm": { "type": "string", - "description": "This will be expected in the `realm` field of the `authorization` header of the SIP INVITE. Defaults to sip.vapi.ai." + "description": "This will be expected in the `realm` field of the `authorization` header of the SIP INVITE. Defaults to the SIP realm of the Vapi region serving the request (e.g. `sip.vapi.ai` for US, `sip.eu.vapi.ai` for EU)." }, "username": { "type": "string", @@ -38998,6 +43138,13 @@ ] } }, + "provider": { + "type": "string", + "description": "This is to bring your own phone numbers from your own SIP trunks or Carriers.", + "enum": [ + "byo-phone-number" + ] + }, "numberE164CheckEnabled": { "type": "boolean", "description": "This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it.\n\nUse cases:\n- `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks.\n- `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.\n\nIf `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\\+?[a-zA-Z0-9]+$/`).\n\n@default true (E164 check is enabled)", @@ -39072,6 +43219,13 @@ ] } }, + "provider": { + "type": "string", + "description": "This is to use numbers bought on Twilio.", + "enum": [ + "twilio" + ] + }, "smsEnabled": { "type": "boolean", "description": "Controls whether Vapi sets the messaging webhook URL on the Twilio number during import.\n\nIf set to `false`, Vapi will not update the Twilio messaging URL, leaving it as is.\nIf `true` or omitted (default), Vapi will configure both the voice and messaging URLs.\n\n@default true", @@ -39156,6 +43310,13 @@ ] } }, + "provider": { + "type": "string", + "description": "This is to use numbers bought on Vonage.", + "enum": [ + "vonage" + ] + }, "name": { "type": "string", "description": "This is the name of the phone number. This is just for your own reference.", @@ -39223,6 +43384,12 @@ ] } }, + "provider": { + "type": "string", + "enum": [ + "vapi" + ] + }, "name": { "type": "string", "description": "This is the name of the phone number. This is just for your own reference.", @@ -39294,6 +43461,13 @@ ] } }, + "provider": { + "type": "string", + "description": "This is to use numbers bought on Telnyx.", + "enum": [ + "telnyx" + ] + }, "name": { "type": "string", "description": "This is the name of the phone number. This is just for your own reference.", @@ -39446,7 +43620,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -39475,6 +43649,12 @@ ], "description": "The type of tool. \"apiRequest\" for API request tool." }, + "name": { + "type": "string", + "description": "This is the name of the tool. This will be passed to the model.\n\nMust be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40.", + "maxLength": 40, + "pattern": "/^[a-zA-Z0-9_-]{1,40}$/" + }, "method": { "type": "string", "enum": [ @@ -39537,12 +43717,6 @@ } ] }, - "name": { - "type": "string", - "description": "This is the name of the tool. This will be passed to the model.\n\nMust be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40.", - "maxLength": 40, - "pattern": "/^[a-zA-Z0-9_-]{1,40}$/" - }, "description": { "type": "string", "description": "This is the description of the tool. This will be passed to the model." @@ -39621,7 +43795,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -39744,7 +43918,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -39818,7 +43992,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -39887,7 +44061,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -39992,7 +44166,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -40065,7 +44239,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -40138,7 +44312,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -40226,7 +44400,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -40327,7 +44501,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -40396,7 +44570,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -40490,7 +44664,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -40598,7 +44772,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -40692,7 +44866,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -40768,7 +44942,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -40837,7 +45011,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -40906,7 +45080,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -40975,7 +45149,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -41044,7 +45218,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -41113,7 +45287,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -41200,7 +45374,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -41269,7 +45443,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -41338,7 +45512,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -41407,7 +45581,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -41476,7 +45650,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -41574,7 +45748,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -41649,7 +45823,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -41678,6 +45852,12 @@ ], "description": "The type of tool. \"apiRequest\" for API request tool." }, + "name": { + "type": "string", + "description": "This is the name of the tool. This will be passed to the model.\n\nMust be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40.", + "maxLength": 40, + "pattern": "/^[a-zA-Z0-9_-]{1,40}$/" + }, "method": { "type": "string", "enum": [ @@ -41714,12 +45894,6 @@ "$ref": "#/components/schemas/ToolParameter" } }, - "name": { - "type": "string", - "description": "This is the name of the tool. This will be passed to the model.\n\nMust be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40.", - "maxLength": 40, - "pattern": "/^[a-zA-Z0-9_-]{1,40}$/" - }, "description": { "type": "string", "description": "This is the description of the tool. This will be passed to the model." @@ -41780,7 +45954,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -41881,7 +46055,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -41928,7 +46102,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -42000,7 +46174,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -42086,7 +46260,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -42158,7 +46332,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -42205,7 +46379,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -42281,7 +46455,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -42303,6 +46477,19 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "apiRequest" + ], + "description": "The type of tool. \"apiRequest\" for API request tool." + }, + "name": { + "type": "string", + "description": "This is the name of the tool. This will be passed to the model.\n\nMust be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40.", + "maxLength": 40, + "pattern": "/^[a-zA-Z0-9_-]{1,40}$/" + }, "method": { "type": "string", "enum": [ @@ -42347,12 +46534,6 @@ } ] }, - "name": { - "type": "string", - "description": "This is the name of the tool. This will be passed to the model.\n\nMust be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40.", - "maxLength": 40, - "pattern": "/^[a-zA-Z0-9_-]{1,40}$/" - }, "description": { "type": "string", "description": "This is the description of the tool. This will be passed to the model." @@ -42400,7 +46581,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -42422,6 +46603,13 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "code" + ], + "description": "The type of tool. \"code\" for Code tool." + }, "async": { "type": "boolean", "example": false, @@ -42490,7 +46678,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -42512,6 +46700,13 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "dtmf" + ], + "description": "The type of tool. \"dtmf\" for DTMF tool." + }, "sipInfoDtmfEnabled": { "type": "boolean", "description": "This enables sending DTMF tones via SIP INFO messages instead of RFC 2833 (RTP events). When enabled, DTMF digits will be sent using the SIP INFO method, which can be more reliable in some network configurations. Only relevant when using the `vapi.sip` transport.", @@ -42532,7 +46727,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -42554,6 +46749,13 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "endCall" + ], + "description": "The type of tool. \"endCall\" for End Call tool." + }, "rejectionPlan": { "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", "allOf": [ @@ -42569,7 +46771,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -42591,6 +46793,13 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "function" + ], + "description": "The type of tool. \"function\" for Function tool." + }, "async": { "type": "boolean", "example": false, @@ -42642,7 +46851,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -42664,6 +46873,13 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "ghl" + ], + "description": "The type of tool. \"ghl\" for GHL tool." + }, "rejectionPlan": { "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", "allOf": [ @@ -42682,7 +46898,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -42704,6 +46920,13 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "make" + ], + "description": "The type of tool. \"make\" for Make tool." + }, "rejectionPlan": { "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", "allOf": [ @@ -42722,7 +46945,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -42744,6 +46967,13 @@ ] } }, + "type": { + "type": "string", + "description": "This is the type of the tool.\nWhen you're using handoff tool, we recommend adding this to your system prompt\n---\n# System context\n\nYou are part of a multi-agent system designed to make agent coordination and execution easy. Agents uses two primary abstraction: **Agents** and **Handoffs**. An agent encompasses instructions and tools and can hand off a conversation to another agent when appropriate. Handoffs are achieved by calling a handoff function, generally named `handoff_to_`. Handoffs between agents are handled seamlessly in the background; do not mention or draw attention to these handoffs in your conversation with the user.\n\n# Agent context\n\n{put your agent system prompt here}\n---", + "enum": [ + "handoff" + ] + }, "defaultResult": { "type": "string", "description": "This is the default local tool result message used when no runtime handoff result override is returned." @@ -42791,7 +47021,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -42813,6 +47043,12 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "transferCall" + ] + }, "destinations": { "type": "array", "description": "These are the destinations that the call can be transferred to. If no destinations are provided, server.url will be used to get the transfer destination once the tool is called.", @@ -42848,7 +47084,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -42870,6 +47106,13 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "output" + ], + "description": "The type of tool. \"output\" for Output tool." + }, "rejectionPlan": { "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", "allOf": [ @@ -42885,7 +47128,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -42907,6 +47150,13 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "bash" + ], + "description": "The type of tool. \"bash\" for Bash tool." + }, "subType": { "type": "string", "enum": [ @@ -42945,7 +47195,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -42967,6 +47217,13 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "computer" + ], + "description": "The type of tool. \"computer\" for Computer tool." + }, "subType": { "type": "string", "enum": [ @@ -43017,7 +47274,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -43039,6 +47296,13 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "textEditor" + ], + "description": "The type of tool. \"textEditor\" for Text Editor tool." + }, "subType": { "type": "string", "enum": [ @@ -43077,7 +47341,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -43099,6 +47363,13 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "query" + ], + "description": "The type of tool. \"query\" for Query tool." + }, "knowledgeBases": { "description": "The knowledge bases to query", "type": "array", @@ -43121,7 +47392,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -43143,6 +47414,13 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "google.calendar.event.create" + ], + "description": "The type of tool. \"google.calendar.event.create\" for Google Calendar Create Event tool." + }, "rejectionPlan": { "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", "allOf": [ @@ -43158,7 +47436,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -43180,6 +47458,13 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "google.sheets.row.append" + ], + "description": "The type of tool. \"google.sheets.row.append\" for Google Sheets Row Append tool." + }, "rejectionPlan": { "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", "allOf": [ @@ -43195,7 +47480,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -43217,6 +47502,13 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "google.calendar.availability.check" + ], + "description": "The type of tool. \"google.calendar.availability.check\" for Google Calendar Check Availability tool." + }, "rejectionPlan": { "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", "allOf": [ @@ -43232,7 +47524,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -43254,6 +47546,13 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "slack.message.send" + ], + "description": "The type of tool. \"slack.message.send\" for Slack Send Message tool." + }, "rejectionPlan": { "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", "allOf": [ @@ -43269,7 +47568,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -43291,6 +47590,13 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "sms" + ], + "description": "The type of tool. \"sms\" for Twilio SMS sending tool." + }, "rejectionPlan": { "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", "allOf": [ @@ -43306,7 +47612,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -43328,6 +47634,13 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "mcp" + ], + "description": "The type of tool. \"mcp\" for MCP tool." + }, "server": { "description": "\n This is the server where a `tool-calls` webhook will be sent.\n\n Notes:\n - Webhook is sent to this server when a tool call is made.\n - Webhook contains the call, assistant, and phone number objects.\n - Webhook contains the variables set on the assistant.\n - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.\n - Webhook expects a response with tool call result.", "allOf": [ @@ -43361,7 +47674,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -43383,6 +47696,13 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "gohighlevel.calendar.availability.check" + ], + "description": "The type of tool. \"gohighlevel.calendar.availability.check\" for GoHighLevel Calendar Availability Check tool." + }, "rejectionPlan": { "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", "allOf": [ @@ -43398,7 +47718,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -43420,6 +47740,13 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "gohighlevel.calendar.event.create" + ], + "description": "The type of tool. \"gohighlevel.calendar.event.create\" for GoHighLevel Calendar Event Create tool." + }, "rejectionPlan": { "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", "allOf": [ @@ -43435,7 +47762,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -43457,6 +47784,13 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "gohighlevel.contact.create" + ], + "description": "The type of tool. \"gohighlevel.contact.create\" for GoHighLevel Contact Create tool." + }, "rejectionPlan": { "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", "allOf": [ @@ -43472,7 +47806,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -43494,6 +47828,13 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "gohighlevel.contact.get" + ], + "description": "The type of tool. \"gohighlevel.contact.get\" for GoHighLevel Contact Get tool." + }, "rejectionPlan": { "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", "allOf": [ @@ -43509,7 +47850,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -43531,6 +47872,13 @@ ] } }, + "type": { + "type": "string", + "enum": [ + "sipRequest" + ], + "description": "The type of tool. \"sipRequest\" for SIP request tool." + }, "verb": { "type": "string", "enum": [ @@ -43574,7 +47922,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -43596,6 +47944,13 @@ ] } }, + "type": { + "type": "string", + "description": "The type of tool. \"voicemail\" for Voicemail tool.", + "enum": [ + "voicemail" + ] + }, "beepDetectionEnabled": { "type": "boolean", "description": "This is the flag that enables beep detection for voicemail detection and applies only for twilio based calls.\n\n@default false", @@ -43717,82 +48072,6 @@ } } }, - "TrieveKnowledgeBaseSearchPlan": { - "type": "object", - "properties": { - "topK": { - "type": "number", - "description": "Specifies the number of top chunks to return. This corresponds to the `page_size` parameter in Trieve." - }, - "removeStopWords": { - "type": "boolean", - "description": "If true, stop words (specified in server/src/stop-words.txt in the git repo) will be removed. This will preserve queries that are entirely stop words." - }, - "scoreThreshold": { - "type": "number", - "description": "This is the score threshold to filter out chunks with a score below the threshold for cosine distance metric. For Manhattan Distance, Euclidean Distance, and Dot Product, it will filter out scores above the threshold distance. This threshold applies before weight and bias modifications. If not specified, this defaults to no threshold. A threshold of 0 will default to no threshold." - }, - "searchType": { - "type": "string", - "description": "This is the search method used when searching for relevant chunks from the vector store.", - "enum": [ - "fulltext", - "semantic", - "hybrid", - "bm25" - ] - } - }, - "required": [ - "searchType" - ] - }, - "TrieveKnowledgeBase": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "description": "This knowledge base is provided by Trieve.\n\nTo learn more about Trieve, visit https://trieve.ai.", - "enum": [ - "trieve" - ] - }, - "name": { - "type": "string", - "description": "This is the name of the knowledge base." - }, - "searchPlan": { - "description": "This is the searching plan used when searching for relevant chunks from the vector store.\n\nYou should configure this if you're running into these issues:\n- Too much unnecessary context is being fed as knowledge base context.\n- Not enough relevant context is being fed as knowledge base context.", - "allOf": [ - { - "$ref": "#/components/schemas/TrieveKnowledgeBaseSearchPlan" - } - ] - }, - "createPlan": { - "description": "This is the plan if you want us to create/import a new vector store using Trieve.", - "oneOf": [ - { - "$ref": "#/components/schemas/TrieveKnowledgeBaseImport", - "title": "Import" - } - ] - }, - "id": { - "type": "string", - "description": "This is the id of the knowledge base." - }, - "orgId": { - "type": "string", - "description": "This is the org id of the knowledge base." - } - }, - "required": [ - "provider", - "id", - "orgId" - ] - }, "CustomKnowledgeBase": { "type": "object", "properties": { @@ -43827,71 +48106,16 @@ "orgId" ] }, - "CreateTrieveKnowledgeBaseDTO": { + "UpdateCustomKnowledgeBaseDTO": { "type": "object", "properties": { "provider": { "type": "string", - "description": "This knowledge base is provided by Trieve.\n\nTo learn more about Trieve, visit https://trieve.ai.", + "description": "This knowledge base is bring your own knowledge base implementation.", "enum": [ - "trieve" - ] - }, - "name": { - "type": "string", - "description": "This is the name of the knowledge base." - }, - "searchPlan": { - "description": "This is the searching plan used when searching for relevant chunks from the vector store.\n\nYou should configure this if you're running into these issues:\n- Too much unnecessary context is being fed as knowledge base context.\n- Not enough relevant context is being fed as knowledge base context.", - "allOf": [ - { - "$ref": "#/components/schemas/TrieveKnowledgeBaseSearchPlan" - } - ] - }, - "createPlan": { - "description": "This is the plan if you want us to create/import a new vector store using Trieve.", - "oneOf": [ - { - "$ref": "#/components/schemas/TrieveKnowledgeBaseImport", - "title": "Import" - } - ] - } - }, - "required": [ - "provider" - ] - }, - "UpdateTrieveKnowledgeBaseDTO": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "This is the name of the knowledge base." - }, - "searchPlan": { - "description": "This is the searching plan used when searching for relevant chunks from the vector store.\n\nYou should configure this if you're running into these issues:\n- Too much unnecessary context is being fed as knowledge base context.\n- Not enough relevant context is being fed as knowledge base context.", - "allOf": [ - { - "$ref": "#/components/schemas/TrieveKnowledgeBaseSearchPlan" - } + "custom-knowledge-base" ] }, - "createPlan": { - "description": "This is the plan if you want us to create/import a new vector store using Trieve.", - "oneOf": [ - { - "$ref": "#/components/schemas/TrieveKnowledgeBaseImport", - "title": "Import" - } - ] - } - } - }, - "UpdateCustomKnowledgeBaseDTO": { - "type": "object", - "properties": { "server": { "description": "This is where the knowledge base request will be sent.\n\nRequest Example:\n\nPOST https://{server.url}\nContent-Type: application/json\n\n{\n \"messsage\": {\n \"type\": \"knowledge-base-request\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Why is ocean blue?\"\n }\n ],\n ...other metadata about the call...\n }\n}\n\nResponse Expected:\n```\n{\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"The ocean is blue because water absorbs everything but blue.\",\n }, // YOU CAN RETURN THE EXACT RESPONSE TO SPEAK\n \"documents\": [\n {\n \"content\": \"The ocean is blue primarily because water absorbs colors in the red part of the light spectrum and scatters the blue light, making it more visible to our eyes.\",\n \"similarity\": 1\n },\n {\n \"content\": \"Blue light is scattered more by the water molecules than other colors, enhancing the blue appearance of the ocean.\",\n \"similarity\": .5\n }\n ] // OR, YOU CAN RETURN AN ARRAY OF DOCUMENTS THAT WILL BE SENT TO THE MODEL\n}\n```", "allOf": [ @@ -43902,83 +48126,6 @@ } } }, - "TrieveKnowledgeBaseChunkPlan": { - "type": "object", - "properties": { - "fileIds": { - "description": "These are the file ids that will be used to create the vector store. To upload files, use the `POST /files` endpoint.", - "type": "array", - "items": { - "type": "string" - } - }, - "websites": { - "description": "These are the websites that will be used to create the vector store.", - "type": "array", - "items": { - "type": "string" - } - }, - "targetSplitsPerChunk": { - "type": "number", - "description": "This is an optional field which allows you to specify the number of splits you want per chunk. If not specified, the default 20 is used. However, you may want to use a different number." - }, - "splitDelimiters": { - "description": "This is an optional field which allows you to specify the delimiters to use when splitting the file before chunking the text. If not specified, the default [.!?\\n] are used to split into sentences. However, you may want to use spaces or other delimiters.", - "type": "array", - "items": { - "type": "string" - } - }, - "rebalanceChunks": { - "type": "boolean", - "description": "This is an optional field which allows you to specify whether or not to rebalance the chunks created from the file. If not specified, the default true is used. If true, Trieve will evenly distribute remainder splits across chunks such that 66 splits with a target_splits_per_chunk of 20 will result in 3 chunks with 22 splits each." - } - } - }, - "TrieveKnowledgeBaseCreate": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "This is to create a new dataset on Trieve.", - "enum": [ - "create" - ] - }, - "chunkPlans": { - "description": "These are the chunk plans used to create the dataset.", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrieveKnowledgeBaseChunkPlan" - } - } - }, - "required": [ - "type", - "chunkPlans" - ] - }, - "TrieveKnowledgeBaseImport": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "This is to import an existing dataset from Trieve.", - "enum": [ - "import" - ] - }, - "providerId": { - "type": "string", - "description": "This is the `datasetId` of the dataset on your Trieve account." - } - }, - "required": [ - "type", - "providerId" - ] - }, "StructuredOutput": { "type": "object", "properties": { @@ -45267,6 +49414,11 @@ } ] }, + "path": { + "type": "string", + "description": "Optional dot-notation path to a primitive leaf when evaluating an object structured output.", + "example": "contact.auth_started" + }, "comparator": { "type": "string", "description": "This is the comparison operator to use when evaluating the extracted value against the expected value.\nAvailable operators depend on the structured output's schema type:\n- boolean: '=', '!='\n- string: '=', '!='\n- number/integer: '=', '!=', '>', '<', '>=', '<='", @@ -46002,6 +50154,22 @@ "type": "string", "description": "This is the name of the structured output." }, + "path": { + "type": "string", + "description": "This is the optional dot-notation path evaluated within an object structured output." + }, + "description": { + "type": "string", + "description": "This is the structured output description captured when the evaluation ran." + }, + "schema": { + "description": "This is the structured output schema captured when the evaluation ran.", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] + }, "extractedValue": { "description": "This is the value extracted from the call by the structured output.", "oneOf": [ @@ -46857,6 +51025,10 @@ "format": "date-time", "type": "string", "description": "This is the ISO 8601 date-time string of when the Insight was last updated." + }, + "systemKey": { + "type": "string", + "description": "Stable server-owned identifier for system-created insights." } }, "required": [ @@ -46968,6 +51140,10 @@ "format": "date-time", "type": "string", "description": "This is the ISO 8601 date-time string of when the Insight was last updated." + }, + "systemKey": { + "type": "string", + "description": "Stable server-owned identifier for system-created insights." } }, "required": [ @@ -47094,6 +51270,10 @@ "format": "date-time", "type": "string", "description": "This is the ISO 8601 date-time string of when the Insight was last updated." + }, + "systemKey": { + "type": "string", + "description": "Stable server-owned identifier for system-created insights." } }, "required": [ @@ -47168,6 +51348,10 @@ "format": "date-time", "type": "string", "description": "This is the ISO 8601 date-time string of when the Insight was last updated." + }, + "systemKey": { + "type": "string", + "description": "Stable server-owned identifier for system-created insights." } }, "required": [ @@ -48790,6 +52974,10 @@ "$ref": "#/components/schemas/InsightTimeRangeWithStep" } ] + }, + "assistantId": { + "type": "string", + "description": "Optional runtime assistant scope for dashboards.\nThis is applied to call-table queries without mutating the saved insight." } } }, @@ -48858,6 +53046,10 @@ "format": "date-time", "type": "string", "description": "This is the ISO 8601 date-time string of when the Insight was last updated." + }, + "systemKey": { + "type": "string", + "description": "Stable server-owned identifier for system-created insights." } }, "required": [ @@ -49423,7 +53615,10 @@ "gpt-3.5-turbo-0125:northcentralus", "gpt-3.5-turbo-0125:southcentralus", "gpt-3.5-turbo-1106:canadaeast", - "gpt-3.5-turbo-1106:westus" + "gpt-3.5-turbo-1106:westus", + "gpt-4.1:australiaeast", + "gpt-4o:australiaeast", + "gpt-5.4-mini:australiaeast" ] }, "temperature": { @@ -49534,6 +53729,8 @@ "description": "This is the name of the model. Ex. gpt-4o", "maxLength": 100, "enum": [ + "gemini-3.5-flash", + "gemini-3.1-flash-lite", "gemini-3-flash-preview", "gemini-2.5-pro", "gemini-2.5-flash", @@ -49846,6 +54043,15 @@ "DESC" ] }, + "sortBy": { + "type": "string", + "description": "This is the column to sort by. Defaults to 'createdAt'.", + "enum": [ + "createdAt", + "duration", + "cost" + ] + }, "limit": { "type": "number", "description": "This is the maximum number of items to return. Defaults to 100.", @@ -50237,6 +54443,15 @@ "DESC" ] }, + "sortBy": { + "type": "string", + "description": "This is the column to sort by. Defaults to 'createdAt'.", + "enum": [ + "createdAt", + "duration", + "cost" + ] + }, "limit": { "type": "number", "description": "This is the maximum number of items to return. Defaults to 100.", @@ -51023,12 +55238,21 @@ } }, "role": { - "enum": [ - "admin", - "editor", - "viewer" - ], - "type": "string" + "pattern": "ORG_ROLE_OR_CUSTOM_ROLE_PATTERN", + "oneOf": [ + { + "type": "string", + "enum": [ + "admin", + "editor", + "viewer" + ] + }, + { + "type": "string", + "pattern": "^org-[a-z0-9-]+$" + } + ] }, "redirectTo": { "type": "string" @@ -51046,12 +55270,21 @@ "type": "string" }, "role": { - "enum": [ - "admin", - "editor", - "viewer" - ], - "type": "string" + "pattern": "ORG_ROLE_OR_CUSTOM_ROLE_PATTERN", + "oneOf": [ + { + "type": "string", + "enum": [ + "admin", + "editor", + "viewer" + ] + }, + { + "type": "string", + "pattern": "^org-[a-z0-9-]+$" + } + ] } }, "required": [ @@ -51346,6 +55579,7 @@ "enum": [ "us-east-1", "us-west-2", + "eu-central-1", "eu-west-1", "eu-west-3", "ap-northeast-1", @@ -51670,7 +55904,10 @@ "gpt-4-1106-preview", "gpt-4-0613", "gpt-35-turbo-0125", - "gpt-35-turbo-1106" + "gpt-35-turbo-1106", + "gpt-4o", + "gpt-4.1", + "gpt-5.4-mini-2026-03-17" ], "example": [ "gpt-4-0125-preview", @@ -51701,7 +55938,10 @@ "gpt-4-1106-preview", "gpt-4-0613", "gpt-35-turbo-0125", - "gpt-35-turbo-1106" + "gpt-35-turbo-1106", + "gpt-4o", + "gpt-4.1", + "gpt-5.4-mini-2026-03-17" ] } }, @@ -51789,88 +56029,84 @@ "minLength": 1, "maxLength": 40 }, - "gateways": { - "description": "This is the list of SIP trunk's gateways.", - "type": "array", - "items": { - "$ref": "#/components/schemas/SipTrunkGateway" - } - }, - "outboundAuthenticationPlan": { - "description": "This can be used to configure the outbound authentication if required by the SIP trunk.", - "allOf": [ - { - "$ref": "#/components/schemas/SipTrunkOutboundAuthenticationPlan" - } - ] - }, - "outboundLeadingPlusEnabled": { - "type": "boolean", - "description": "This ensures the outbound origination attempts have a leading plus. Defaults to false to match conventional telecom behavior.\n\nUsage:\n- Vonage/Twilio requires leading plus for all outbound calls. Set this to true.\n\n@default false" - }, - "techPrefix": { - "type": "string", - "description": "This can be used to configure the tech prefix on outbound calls. This is an advanced property.", - "maxLength": 10000 - }, - "sipDiversionHeader": { - "type": "string", - "description": "This can be used to enable the SIP diversion header for authenticating the calling number if the SIP trunk supports it. This is an advanced property.", - "maxLength": 10000 - }, - "sbcConfiguration": { - "description": "This is an advanced configuration for enterprise deployments. This uses the onprem SBC to trunk into the SIP trunk's `gateways`, rather than the managed SBC provided by Vapi.", - "allOf": [ - { - "$ref": "#/components/schemas/SbcConfiguration" - } - ] - } - }, - "required": [ - "id", - "orgId", - "createdAt", - "updatedAt", - "gateways" - ] - }, - "CartesiaCredential": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "enum": [ - "cartesia" - ] - }, - "apiKey": { - "type": "string", - "description": "This is not returned in the API." - }, - "id": { - "type": "string", - "description": "This is the unique identifier for the credential." - }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." - }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." - }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." - }, - "name": { + "gateways": { + "description": "This is the list of SIP trunk's gateways.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SipTrunkGateway" + } + }, + "outboundAuthenticationPlan": { + "description": "This can be used to configure the outbound authentication if required by the SIP trunk.", + "allOf": [ + { + "$ref": "#/components/schemas/SipTrunkOutboundAuthenticationPlan" + } + ] + }, + "outboundLeadingPlusEnabled": { + "type": "boolean", + "description": "This ensures the outbound origination attempts have a leading plus. Defaults to false to match conventional telecom behavior.\n\nUsage:\n- Vonage/Twilio requires leading plus for all outbound calls. Set this to true.\n\n@default false" + }, + "techPrefix": { + "type": "string", + "description": "This can be used to configure the tech prefix on outbound calls. This is an advanced property.", + "maxLength": 10000 + }, + "sipDiversionHeader": { + "type": "string", + "description": "This can be used to enable the SIP diversion header for authenticating the calling number if the SIP trunk supports it. This is an advanced property.", + "maxLength": 10000 + } + }, + "required": [ + "id", + "orgId", + "createdAt", + "updatedAt", + "gateways" + ] + }, + "CartesiaCredential": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "cartesia" + ] + }, + "apiKey": { + "type": "string", + "description": "This is not returned in the API." + }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + }, + "apiUrl": { "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 + "description": "This can be used to point to an onprem Cartesia instance. Defaults to api.cartesia.ai." } }, "required": [ @@ -52239,6 +56475,15 @@ "maxLength": 10000, "description": "This is not returned in the API." }, + "apiUrl": { + "type": "string", + "enum": [ + "https://api.elevenlabs.io", + "https://api.eu.residency.elevenlabs.io" + ], + "description": "ElevenLabs-only API environment for this key: the global endpoint or the EU data residency endpoint. If omitted on create, Vapi detects it automatically. If set to null on update, Vapi clears the saved endpoint and re-detects it with the saved API key.", + "nullable": true + }, "id": { "type": "string", "description": "This is the unique identifier for the credential." @@ -52785,6 +57030,60 @@ "updatedAt" ] }, + "MicrosoftCredential": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "microsoft" + ] + }, + "apiKey": { + "type": "string", + "description": "This is not returned in the API.", + "maxLength": 10000 + }, + "region": { + "type": "string", + "description": "Azure region for the Speech resource. Defaults to `eastus` when omitted. MAI-Voice-2 is preview and region-limited.", + "maxLength": 64, + "example": "eastus" + }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + } + }, + "required": [ + "provider", + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" + ] + }, "MistralCredential": { "type": "object", "properties": { @@ -53347,6 +57646,10 @@ "type": "string", "description": "This is not returned in the API." }, + "apiUrl": { + "type": "string", + "description": "Custom Soniox WebSocket endpoint (e.g. EU server wss://stt-rt.eu.soniox.com/transcribe-websocket). Defaults to the region-appropriate endpoint when omitted." + }, "id": { "type": "string", "description": "This is the unique identifier for the credential." @@ -53573,53 +57876,6 @@ "updatedAt" ] }, - "TrieveCredential": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "enum": [ - "trieve" - ] - }, - "apiKey": { - "type": "string", - "description": "This is not returned in the API." - }, - "id": { - "type": "string", - "description": "This is the unique identifier for the credential." - }, - "orgId": { - "type": "string", - "description": "This is the unique identifier for the org that this credential belongs to." - }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the credential was created." - }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "This is the ISO 8601 date-time string of when the assistant was last updated." - }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 - } - }, - "required": [ - "provider", - "apiKey", - "id", - "orgId", - "createdAt", - "updatedAt" - ] - }, "TwilioCredential": { "type": "object", "properties": { @@ -54507,19 +58763,25 @@ "apiKey" ] }, - "CreateMistralCredentialDTO": { + "CreateMicrosoftCredentialDTO": { "type": "object", "properties": { "provider": { "type": "string", "enum": [ - "mistral" + "microsoft" ] }, "apiKey": { "type": "string", - "maxLength": 100, - "description": "This is not returned in the API." + "description": "This is not returned in the API.", + "maxLength": 10000 + }, + "region": { + "type": "string", + "description": "Azure region for the Speech resource. Defaults to `eastus` when omitted. MAI-Voice-2 is preview and region-limited.", + "maxLength": 64, + "example": "eastus" }, "name": { "type": "string", @@ -54533,17 +58795,18 @@ "apiKey" ] }, - "CreateNeuphonicCredentialDTO": { + "CreateMistralCredentialDTO": { "type": "object", "properties": { "provider": { "type": "string", "enum": [ - "neuphonic" + "mistral" ] }, "apiKey": { "type": "string", + "maxLength": 100, "description": "This is not returned in the API." }, "name": { @@ -54558,18 +58821,17 @@ "apiKey" ] }, - "CreateWellSaidCredentialDTO": { + "CreateNeuphonicCredentialDTO": { "type": "object", "properties": { "provider": { "type": "string", "enum": [ - "wellsaid" + "neuphonic" ] }, "apiKey": { "type": "string", - "maxLength": 10000, "description": "This is not returned in the API." }, "name": { @@ -54584,17 +58846,18 @@ "apiKey" ] }, - "CreateSonioxCredentialDTO": { + "CreateWellSaidCredentialDTO": { "type": "object", "properties": { "provider": { "type": "string", "enum": [ - "soniox" + "wellsaid" ] }, "apiKey": { "type": "string", + "maxLength": 10000, "description": "This is not returned in the API." }, "name": { @@ -54609,19 +58872,23 @@ "apiKey" ] }, - "CreateSpeechmaticsCredentialDTO": { + "CreateSonioxCredentialDTO": { "type": "object", "properties": { "provider": { "type": "string", "enum": [ - "speechmatics" + "soniox" ] }, "apiKey": { "type": "string", "description": "This is not returned in the API." }, + "apiUrl": { + "type": "string", + "description": "Custom Soniox WebSocket endpoint (e.g. EU server wss://stt-rt.eu.soniox.com/transcribe-websocket). Defaults to the region-appropriate endpoint when omitted." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -54634,13 +58901,13 @@ "apiKey" ] }, - "CreateTrieveCredentialDTO": { + "CreateSpeechmaticsCredentialDTO": { "type": "object", "properties": { "provider": { "type": "string", "enum": [ - "trieve" + "speechmatics" ] }, "apiKey": { @@ -54829,6 +59096,12 @@ "UpdateAnthropicCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "anthropic" + ] + }, "apiKey": { "type": "string", "maxLength": 10000, @@ -54845,12 +59118,19 @@ "UpdateAnthropicBedrockCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "anthropic-bedrock" + ] + }, "region": { "type": "string", "description": "AWS region where Bedrock is configured.", "enum": [ "us-east-1", "us-west-2", + "eu-central-1", "eu-west-1", "eu-west-3", "ap-northeast-1", @@ -54879,6 +59159,12 @@ "UpdateAnyscaleCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "anyscale" + ] + }, "apiKey": { "type": "string", "maxLength": 10000, @@ -54895,6 +59181,12 @@ "UpdateAssemblyAICredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "assembly-ai" + ] + }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -54910,6 +59202,12 @@ "UpdateAzureCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "azure" + ] + }, "service": { "type": "string", "description": "This is the service being used in Azure.", @@ -54977,6 +59275,12 @@ "UpdateAzureOpenAICredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "azure-openai" + ] + }, "region": { "type": "string", "enum": [ @@ -55030,7 +59334,10 @@ "gpt-4-1106-preview", "gpt-4-0613", "gpt-35-turbo-0125", - "gpt-35-turbo-1106" + "gpt-35-turbo-1106", + "gpt-4o", + "gpt-4.1", + "gpt-5.4-mini-2026-03-17" ], "example": [ "gpt-4-0125-preview", @@ -55061,7 +59368,10 @@ "gpt-4-1106-preview", "gpt-4-0613", "gpt-35-turbo-0125", - "gpt-35-turbo-1106" + "gpt-35-turbo-1106", + "gpt-4o", + "gpt-4.1", + "gpt-5.4-mini-2026-03-17" ] } }, @@ -55089,6 +59399,13 @@ "UpdateByoSipTrunkCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "description": "This can be used to bring your own SIP trunks or to connect to a Carrier.", + "enum": [ + "byo-sip-trunk" + ] + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -55123,20 +59440,18 @@ "type": "string", "description": "This can be used to enable the SIP diversion header for authenticating the calling number if the SIP trunk supports it. This is an advanced property.", "maxLength": 10000 - }, - "sbcConfiguration": { - "description": "This is an advanced configuration for enterprise deployments. This uses the onprem SBC to trunk into the SIP trunk's `gateways`, rather than the managed SBC provided by Vapi.", - "allOf": [ - { - "$ref": "#/components/schemas/SbcConfiguration" - } - ] } } }, "UpdateCartesiaCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "cartesia" + ] + }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -55146,12 +59461,22 @@ "description": "This is the name of credential. This is just for your reference.", "minLength": 1, "maxLength": 40 + }, + "apiUrl": { + "type": "string", + "description": "This can be used to point to an onprem Cartesia instance. Defaults to api.cartesia.ai." } } }, "UpdateCerebrasCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "cerebras" + ] + }, "apiKey": { "type": "string", "maxLength": 10000, @@ -55168,6 +59493,13 @@ "UpdateCloudflareCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "cloudflare" + ], + "description": "Credential provider. Only allowed value is cloudflare" + }, "accountId": { "type": "string", "description": "Cloudflare Account Id." @@ -55204,6 +59536,12 @@ "UpdateCustomLLMCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "custom-llm" + ] + }, "apiKey": { "type": "string", "maxLength": 10000, @@ -55228,6 +59566,12 @@ "UpdateDeepgramCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "deepgram" + ] + }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -55247,6 +59591,12 @@ "UpdateDeepInfraCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "deepinfra" + ] + }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -55262,6 +59612,12 @@ "UpdateDeepSeekCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "deep-seek" + ] + }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -55277,11 +59633,26 @@ "UpdateElevenLabsCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "11labs" + ] + }, "apiKey": { "type": "string", "maxLength": 10000, "description": "This is not returned in the API." }, + "apiUrl": { + "type": "string", + "enum": [ + "https://api.elevenlabs.io", + "https://api.eu.residency.elevenlabs.io" + ], + "description": "ElevenLabs-only API environment for this key: the global endpoint or the EU data residency endpoint. If omitted on create, Vapi detects it automatically. If set to null on update, Vapi clears the saved endpoint and re-detects it with the saved API key.", + "nullable": true + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -55293,6 +59664,12 @@ "UpdateGcpCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "gcp" + ] + }, "fallbackIndex": { "type": "number", "description": "This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order.", @@ -55325,6 +59702,12 @@ "UpdateGladiaCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "gladia" + ] + }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -55340,6 +59723,12 @@ "UpdateGoHighLevelCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "gohighlevel" + ] + }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -55355,6 +59744,13 @@ "UpdateGoogleCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "description": "This is the key for Gemini in Google AI Studio. Get it from here: https://aistudio.google.com/app/apikey", + "enum": [ + "google" + ] + }, "apiKey": { "type": "string", "maxLength": 10000, @@ -55371,6 +59767,12 @@ "UpdateGroqCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "groq" + ] + }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -55386,6 +59788,12 @@ "UpdateHumeCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "hume" + ] + }, "apiKey": { "type": "string", "maxLength": 10000, @@ -55402,6 +59810,13 @@ "UpdateInflectionAICredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "description": "This is the api key for Pi in InflectionAI's console. Get it from here: https://developers.inflection.ai/keys, billing will need to be setup", + "enum": [ + "inflection-ai" + ] + }, "apiKey": { "type": "string", "maxLength": 10000, @@ -55418,6 +59833,12 @@ "UpdateLangfuseCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "langfuse" + ] + }, "publicKey": { "type": "string", "description": "The public key for Langfuse project. Eg: pk-lf-..." @@ -55441,6 +59862,12 @@ "UpdateLmntCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "lmnt" + ] + }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -55456,6 +59883,12 @@ "UpdateMakeCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "make" + ] + }, "teamId": { "type": "string", "description": "Team ID" @@ -55476,9 +59909,43 @@ } } }, + "UpdateMicrosoftCredentialDTO": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "microsoft" + ] + }, + "apiKey": { + "type": "string", + "description": "This is not returned in the API.", + "maxLength": 10000 + }, + "region": { + "type": "string", + "description": "Azure region for the Speech resource. Defaults to `eastus` when omitted. MAI-Voice-2 is preview and region-limited.", + "maxLength": 64, + "example": "eastus" + }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + } + } + }, "UpdateMistralCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "mistral" + ] + }, "apiKey": { "type": "string", "maxLength": 100, @@ -55495,6 +59962,12 @@ "UpdateNeuphonicCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "neuphonic" + ] + }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -55510,6 +59983,12 @@ "UpdateOpenAICredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "openai" + ] + }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -55525,6 +60004,12 @@ "UpdateOpenRouterCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "openrouter" + ] + }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -55540,6 +60025,12 @@ "UpdatePerplexityAICredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "perplexity-ai" + ] + }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -55555,6 +60046,12 @@ "UpdatePlayHTCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "playht" + ] + }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -55573,6 +60070,12 @@ "UpdateRimeAICredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "rime-ai" + ] + }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -55588,6 +60091,12 @@ "UpdateRunpodCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "runpod" + ] + }, "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -55603,6 +60112,12 @@ "UpdateWellSaidCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "wellsaid" + ] + }, "apiKey": { "type": "string", "maxLength": 10000, @@ -55619,6 +60134,13 @@ "UpdateS3CredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "s3" + ], + "description": "Credential provider. Only allowed value is s3" + }, "awsAccessKeyId": { "type": "string", "description": "AWS access key ID." @@ -55655,21 +60177,12 @@ "UpdateTogetherAICredentialDTO": { "type": "object", "properties": { - "apiKey": { + "provider": { "type": "string", - "description": "This is not returned in the API." + "enum": [ + "together-ai" + ] }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 - } - } - }, - "UpdateTrieveCredentialDTO": { - "type": "object", - "properties": { "apiKey": { "type": "string", "description": "This is not returned in the API." @@ -55685,6 +60198,12 @@ "UpdateTwilioCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "twilio" + ] + }, "authToken": { "type": "string", "description": "This is not returned in the API." @@ -55711,6 +60230,12 @@ "UpdateVonageCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "vonage" + ] + }, "apiSecret": { "type": "string", "description": "This is not returned in the API." @@ -55729,6 +60254,12 @@ "UpdateWebhookCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "webhook" + ] + }, "authenticationPlan": { "description": "This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication.", "oneOf": [ @@ -55762,6 +60293,12 @@ "UpdateCustomCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "custom-credential" + ] + }, "authenticationPlan": { "description": "This is the authentication plan. Supports OAuth2 RFC 6749, HMAC signing, and Bearer authentication.", "oneOf": [ @@ -55814,6 +60351,13 @@ "UpdateXAiCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "description": "This is the api key for Grok in XAi's console. Get it from here: https://console.x.ai", + "enum": [ + "xai" + ] + }, "apiKey": { "type": "string", "maxLength": 10000, @@ -55830,6 +60374,12 @@ "UpdateGoogleCalendarOAuth2ClientCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "google.calendar.oauth2-client" + ] + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -55841,6 +60391,12 @@ "UpdateGoogleCalendarOAuth2AuthorizationCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "google.calendar.oauth2-authorization" + ] + }, "authorizationId": { "type": "string", "description": "The authorization ID for the OAuth2 authorization" @@ -55856,6 +60412,12 @@ "UpdateGoogleSheetsOAuth2AuthorizationCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "google.sheets.oauth2-authorization" + ] + }, "authorizationId": { "type": "string", "description": "The authorization ID for the OAuth2 authorization" @@ -55871,6 +60433,12 @@ "UpdateSlackOAuth2AuthorizationCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "slack.oauth2-authorization" + ] + }, "authorizationId": { "type": "string", "description": "The authorization ID for the OAuth2 authorization" @@ -55886,6 +60454,12 @@ "UpdateGoHighLevelMCPCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "ghl.oauth2-authorization" + ] + }, "authenticationSession": { "description": "This is the authentication session for the credential.", "allOf": [ @@ -55905,6 +60479,12 @@ "UpdateInworldCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "inworld" + ] + }, "apiKey": { "type": "string", "description": "This is the Inworld Basic (Base64) authentication token. This is not returned in the API.", @@ -55921,6 +60501,12 @@ "UpdateEmailCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "email" + ] + }, "email": { "type": "string", "description": "The recipient email address for alerts" @@ -55936,6 +60522,12 @@ "UpdateSlackWebhookCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "slack-webhook" + ] + }, "webhookUrl": { "type": "string", "description": "Slack incoming webhook URL. See https://api.slack.com/messaging/webhooks for setup instructions. This is not returned in the API." @@ -55951,10 +60543,20 @@ "UpdateSonioxCredentialDTO": { "type": "object", "properties": { + "provider": { + "type": "string", + "enum": [ + "soniox" + ] + }, "apiKey": { "type": "string", "description": "This is not returned in the API." }, + "apiUrl": { + "type": "string", + "description": "Custom Soniox WebSocket endpoint (e.g. EU server wss://stt-rt.eu.soniox.com/transcribe-websocket). Defaults to the region-appropriate endpoint when omitted." + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -57095,7 +61697,9 @@ "inworld", "minimax", "wellsaid", - "orpheus" + "orpheus", + "xai", + "microsoft" ] }, "providerId": { @@ -57215,7 +61819,9 @@ "inworld", "minimax", "wellsaid", - "orpheus" + "orpheus", + "xai", + "microsoft" ], "items": { "type": "string", @@ -57238,7 +61844,9 @@ "inworld", "minimax", "wellsaid", - "orpheus" + "orpheus", + "xai", + "microsoft" ] } } @@ -57455,6 +62063,16 @@ "VoiceLibraryVoiceResponse": { "type": "object", "properties": { + "age": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, "voiceId": { "type": "string" }, @@ -57470,9 +62088,6 @@ "gender": { "type": "string" }, - "age": { - "type": "object" - }, "accent": { "type": "string" } @@ -59931,6 +64546,9 @@ "pipeline-error-inworld-voice-failed", "pipeline-error-minimax-voice-failed", "pipeline-error-wellsaid-voice-failed", + "pipeline-error-xai-voice-failed", + "pipeline-error-microsoft-voice-failed", + "pipeline-error-microsoft-voice-request-canceled", "pipeline-error-tavus-video-failed", "call.in-progress.error-vapifault-openai-voice-failed", "call.in-progress.error-vapifault-cartesia-voice-failed", @@ -59948,6 +64566,8 @@ "call.in-progress.error-vapifault-inworld-voice-failed", "call.in-progress.error-vapifault-minimax-voice-failed", "call.in-progress.error-vapifault-wellsaid-voice-failed", + "call.in-progress.error-vapifault-xai-voice-failed", + "call.in-progress.error-vapifault-microsoft-voice-failed", "call.in-progress.error-vapifault-tavus-video-failed", "pipeline-error-vapi-llm-failed", "pipeline-error-vapi-400-bad-request-validation-failed", @@ -59957,12 +64577,17 @@ "pipeline-error-vapi-500-server-error", "pipeline-error-vapi-503-server-overloaded-error", "call.in-progress.error-providerfault-vapi-llm-failed", + "call.in-progress.error-vapifault-vapi-llm-failed", "call.in-progress.error-vapifault-vapi-400-bad-request-validation-failed", "call.in-progress.error-vapifault-vapi-401-unauthorized", "call.in-progress.error-vapifault-vapi-403-model-access-denied", "call.in-progress.error-vapifault-vapi-429-exceeded-quota", "call.in-progress.error-providerfault-vapi-500-server-error", "call.in-progress.error-providerfault-vapi-503-server-overloaded-error", + "pipeline-error-vapi-transcriber-failed", + "call.in-progress.error-vapifault-vapi-transcriber-failed", + "call.in-progress.error-providerfault-vapi-transcriber-failed", + "call.in-progress.error-providerfault-vapi-voice-failed", "pipeline-error-deepgram-transcriber-failed", "pipeline-error-deepgram-transcriber-api-key-missing", "call.in-progress.error-vapifault-deepgram-transcriber-failed", @@ -60002,6 +64627,18 @@ "call.in-progress.error-vapifault-soniox-transcriber-invalid-config", "call.in-progress.error-vapifault-soniox-transcriber-server-error", "call.in-progress.error-vapifault-soniox-transcriber-failed", + "pipeline-error-xai-transcriber-auth-failed", + "pipeline-error-xai-transcriber-rate-limited", + "pipeline-error-xai-transcriber-invalid-config", + "pipeline-error-xai-transcriber-server-error", + "pipeline-error-xai-transcriber-failed", + "call.in-progress.error-vapifault-xai-transcriber-auth-failed", + "call.in-progress.error-vapifault-xai-transcriber-rate-limited", + "call.in-progress.error-vapifault-xai-transcriber-invalid-config", + "call.in-progress.error-vapifault-xai-transcriber-server-error", + "call.in-progress.error-vapifault-xai-transcriber-failed", + "pipeline-error-cartesia-transcriber-failed", + "call.in-progress.error-vapifault-cartesia-transcriber-failed", "call.in-progress.error-pipeline-no-available-llm-model", "worker-shutdown", "vonage-disconnected", @@ -60437,6 +65074,18 @@ "call.in-progress.error-vapifault-soniox-transcriber-invalid-config", "call.in-progress.error-vapifault-soniox-transcriber-server-error", "call.in-progress.error-vapifault-soniox-transcriber-failed", + "pipeline-error-xai-transcriber-auth-failed", + "pipeline-error-xai-transcriber-rate-limited", + "pipeline-error-xai-transcriber-invalid-config", + "pipeline-error-xai-transcriber-server-error", + "pipeline-error-xai-transcriber-failed", + "call.in-progress.error-vapifault-xai-transcriber-auth-failed", + "call.in-progress.error-vapifault-xai-transcriber-rate-limited", + "call.in-progress.error-vapifault-xai-transcriber-invalid-config", + "call.in-progress.error-vapifault-xai-transcriber-server-error", + "call.in-progress.error-vapifault-xai-transcriber-failed", + "pipeline-error-cartesia-transcriber-failed", + "call.in-progress.error-vapifault-cartesia-transcriber-failed", "call.in-progress.error-warm-transfer-max-duration", "call.in-progress.error-warm-transfer-assistant-cancelled", "call.in-progress.error-warm-transfer-silence-timeout", @@ -61310,6 +65959,9 @@ "pipeline-error-inworld-voice-failed", "pipeline-error-minimax-voice-failed", "pipeline-error-wellsaid-voice-failed", + "pipeline-error-xai-voice-failed", + "pipeline-error-microsoft-voice-failed", + "pipeline-error-microsoft-voice-request-canceled", "pipeline-error-tavus-video-failed", "call.in-progress.error-vapifault-openai-voice-failed", "call.in-progress.error-vapifault-cartesia-voice-failed", @@ -61327,6 +65979,8 @@ "call.in-progress.error-vapifault-inworld-voice-failed", "call.in-progress.error-vapifault-minimax-voice-failed", "call.in-progress.error-vapifault-wellsaid-voice-failed", + "call.in-progress.error-vapifault-xai-voice-failed", + "call.in-progress.error-vapifault-microsoft-voice-failed", "call.in-progress.error-vapifault-tavus-video-failed", "pipeline-error-vapi-llm-failed", "pipeline-error-vapi-400-bad-request-validation-failed", @@ -61336,12 +65990,17 @@ "pipeline-error-vapi-500-server-error", "pipeline-error-vapi-503-server-overloaded-error", "call.in-progress.error-providerfault-vapi-llm-failed", + "call.in-progress.error-vapifault-vapi-llm-failed", "call.in-progress.error-vapifault-vapi-400-bad-request-validation-failed", "call.in-progress.error-vapifault-vapi-401-unauthorized", "call.in-progress.error-vapifault-vapi-403-model-access-denied", "call.in-progress.error-vapifault-vapi-429-exceeded-quota", "call.in-progress.error-providerfault-vapi-500-server-error", "call.in-progress.error-providerfault-vapi-503-server-overloaded-error", + "pipeline-error-vapi-transcriber-failed", + "call.in-progress.error-vapifault-vapi-transcriber-failed", + "call.in-progress.error-providerfault-vapi-transcriber-failed", + "call.in-progress.error-providerfault-vapi-voice-failed", "pipeline-error-deepgram-transcriber-failed", "pipeline-error-deepgram-transcriber-api-key-missing", "call.in-progress.error-vapifault-deepgram-transcriber-failed", @@ -61381,6 +66040,18 @@ "call.in-progress.error-vapifault-soniox-transcriber-invalid-config", "call.in-progress.error-vapifault-soniox-transcriber-server-error", "call.in-progress.error-vapifault-soniox-transcriber-failed", + "pipeline-error-xai-transcriber-auth-failed", + "pipeline-error-xai-transcriber-rate-limited", + "pipeline-error-xai-transcriber-invalid-config", + "pipeline-error-xai-transcriber-server-error", + "pipeline-error-xai-transcriber-failed", + "call.in-progress.error-vapifault-xai-transcriber-auth-failed", + "call.in-progress.error-vapifault-xai-transcriber-rate-limited", + "call.in-progress.error-vapifault-xai-transcriber-invalid-config", + "call.in-progress.error-vapifault-xai-transcriber-server-error", + "call.in-progress.error-vapifault-xai-transcriber-failed", + "pipeline-error-cartesia-transcriber-failed", + "call.in-progress.error-vapifault-cartesia-transcriber-failed", "call.in-progress.error-pipeline-no-available-llm-model", "worker-shutdown", "vonage-disconnected", @@ -61816,6 +66487,18 @@ "call.in-progress.error-vapifault-soniox-transcriber-invalid-config", "call.in-progress.error-vapifault-soniox-transcriber-server-error", "call.in-progress.error-vapifault-soniox-transcriber-failed", + "pipeline-error-xai-transcriber-auth-failed", + "pipeline-error-xai-transcriber-rate-limited", + "pipeline-error-xai-transcriber-invalid-config", + "pipeline-error-xai-transcriber-server-error", + "pipeline-error-xai-transcriber-failed", + "call.in-progress.error-vapifault-xai-transcriber-auth-failed", + "call.in-progress.error-vapifault-xai-transcriber-rate-limited", + "call.in-progress.error-vapifault-xai-transcriber-invalid-config", + "call.in-progress.error-vapifault-xai-transcriber-server-error", + "call.in-progress.error-vapifault-xai-transcriber-failed", + "pipeline-error-cartesia-transcriber-failed", + "call.in-progress.error-vapifault-cartesia-transcriber-failed", "call.in-progress.error-warm-transfer-max-duration", "call.in-progress.error-warm-transfer-assistant-cancelled", "call.in-progress.error-warm-transfer-silence-timeout", @@ -62000,46 +66683,239 @@ }, "type": { "type": "string", - "description": "This is the type of the message. \"tool-calls\" is sent to call a tool.", + "description": "This is the type of the message. \"tool-calls\" is sent to call a tool.", + "enum": [ + "tool-calls" + ] + }, + "toolWithToolCallList": { + "type": "array", + "description": "This is the list of tools calls that the model is requesting along with the original tool configuration.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/FunctionToolWithToolCall", + "title": "FunctionToolWithToolCall" + }, + { + "$ref": "#/components/schemas/GhlToolWithToolCall", + "title": "GhlToolWithToolCall" + }, + { + "$ref": "#/components/schemas/MakeToolWithToolCall", + "title": "MakeToolWithToolCall" + }, + { + "$ref": "#/components/schemas/BashToolWithToolCall", + "title": "BashToolWithToolCall" + }, + { + "$ref": "#/components/schemas/ComputerToolWithToolCall", + "title": "ComputerToolWithToolCall" + }, + { + "$ref": "#/components/schemas/TextEditorToolWithToolCall", + "title": "TextEditorToolWithToolCall" + }, + { + "$ref": "#/components/schemas/GoogleCalendarCreateEventToolWithToolCall", + "title": "GoogleCalendarCreateEventToolWithToolCall" + } + ] + } + }, + "timestamp": { + "type": "number", + "description": "This is the timestamp of the message." + }, + "artifact": { + "description": "This is a live version of the `call.artifact`.\n\nThis matches what is stored on `call.artifact` after the call.", + "allOf": [ + { + "$ref": "#/components/schemas/Artifact" + } + ] + }, + "assistant": { + "description": "This is the assistant that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateAssistantDTO" + } + ] + }, + "customer": { + "description": "This is the customer that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateCustomerDTO" + } + ] + }, + "call": { + "description": "This is the call that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/Call" + } + ] + }, + "chat": { + "description": "This is the chat object.", + "allOf": [ + { + "$ref": "#/components/schemas/Chat" + } + ] + }, + "toolCallList": { + "description": "This is the list of tool calls that the model is requesting.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ToolCall" + } + } + }, + "required": [ + "toolWithToolCallList", + "toolCallList" + ] + }, + "ServerMessageTransferDestinationRequest": { + "type": "object", + "properties": { + "phoneNumber": { + "description": "This is the phone number that the message is associated with.", + "oneOf": [ + { + "$ref": "#/components/schemas/CreateByoPhoneNumberDTO", + "title": "ByoPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateTwilioPhoneNumberDTO", + "title": "TwilioPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateVonagePhoneNumberDTO", + "title": "VonagePhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateVapiPhoneNumberDTO", + "title": "VapiPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateTelnyxPhoneNumberDTO", + "title": "TelnyxPhoneNumber" + } + ] + }, + "type": { + "type": "string", + "description": "This is the type of the message. \"transfer-destination-request\" is sent when the model is requesting transfer but destination is unknown.", + "enum": [ + "transfer-destination-request" + ] + }, + "timestamp": { + "type": "number", + "description": "This is the timestamp of the message." + }, + "artifact": { + "description": "This is a live version of the `call.artifact`.\n\nThis matches what is stored on `call.artifact` after the call.", + "allOf": [ + { + "$ref": "#/components/schemas/Artifact" + } + ] + }, + "assistant": { + "description": "This is the assistant that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateAssistantDTO" + } + ] + }, + "customer": { + "description": "This is the customer that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateCustomerDTO" + } + ] + }, + "call": { + "description": "This is the call that the message is associated with.", + "allOf": [ + { + "$ref": "#/components/schemas/Call" + } + ] + }, + "chat": { + "description": "This is the chat object.", + "allOf": [ + { + "$ref": "#/components/schemas/Chat" + } + ] + } + }, + "required": [ + "type" + ] + }, + "ServerMessageTransferUpdate": { + "type": "object", + "properties": { + "phoneNumber": { + "description": "This is the phone number that the message is associated with.", + "oneOf": [ + { + "$ref": "#/components/schemas/CreateByoPhoneNumberDTO", + "title": "ByoPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateTwilioPhoneNumberDTO", + "title": "TwilioPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateVonagePhoneNumberDTO", + "title": "VonagePhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateVapiPhoneNumberDTO", + "title": "VapiPhoneNumber" + }, + { + "$ref": "#/components/schemas/CreateTelnyxPhoneNumberDTO", + "title": "TelnyxPhoneNumber" + } + ] + }, + "type": { + "type": "string", + "description": "This is the type of the message. \"transfer-update\" is sent whenever a transfer happens.", "enum": [ - "tool-calls" + "transfer-update" ] }, - "toolWithToolCallList": { - "type": "array", - "description": "This is the list of tools calls that the model is requesting along with the original tool configuration.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/FunctionToolWithToolCall", - "title": "FunctionToolWithToolCall" - }, - { - "$ref": "#/components/schemas/GhlToolWithToolCall", - "title": "GhlToolWithToolCall" - }, - { - "$ref": "#/components/schemas/MakeToolWithToolCall", - "title": "MakeToolWithToolCall" - }, - { - "$ref": "#/components/schemas/BashToolWithToolCall", - "title": "BashToolWithToolCall" - }, - { - "$ref": "#/components/schemas/ComputerToolWithToolCall", - "title": "ComputerToolWithToolCall" - }, - { - "$ref": "#/components/schemas/TextEditorToolWithToolCall", - "title": "TextEditorToolWithToolCall" - }, - { - "$ref": "#/components/schemas/GoogleCalendarCreateEventToolWithToolCall", - "title": "GoogleCalendarCreateEventToolWithToolCall" - } - ] - } + "destination": { + "description": "This is the destination of the transfer.", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationAssistant", + "title": "Assistant" + }, + { + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "Number" + }, + { + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "Sip" + } + ] }, "timestamp": { "type": "number", @@ -62085,20 +66961,36 @@ } ] }, - "toolCallList": { - "description": "This is the list of tool calls that the model is requesting.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ToolCall" - } + "toAssistant": { + "description": "This is the assistant that the call is being transferred to. This is only sent if `destination.type` is \"assistant\".", + "allOf": [ + { + "$ref": "#/components/schemas/CreateAssistantDTO" + } + ] + }, + "fromAssistant": { + "description": "This is the assistant that the call is being transferred from. This is only sent if `destination.type` is \"assistant\".", + "allOf": [ + { + "$ref": "#/components/schemas/CreateAssistantDTO" + } + ] + }, + "toStepRecord": { + "type": "object", + "description": "This is the step that the conversation moved to." + }, + "fromStepRecord": { + "type": "object", + "description": "This is the step that the conversation moved from. =" } }, "required": [ - "toolWithToolCallList", - "toolCallList" + "type" ] }, - "ServerMessageTransferDestinationRequest": { + "ServerMessageTranscript": { "type": "object", "properties": { "phoneNumber": { @@ -62128,9 +67020,10 @@ }, "type": { "type": "string", - "description": "This is the type of the message. \"transfer-destination-request\" is sent when the model is requesting transfer but destination is unknown.", + "description": "This is the type of the message. \"transcript\" is sent as transcriber outputs partial or final transcript.", "enum": [ - "transfer-destination-request" + "transcript", + "transcript[transcriptType=\"final\"]" ] }, "timestamp": { @@ -62176,13 +67069,51 @@ "$ref": "#/components/schemas/Chat" } ] + }, + "role": { + "type": "string", + "description": "This is the role for which the transcript is for.", + "enum": [ + "assistant", + "user" + ] + }, + "transcriptType": { + "type": "string", + "description": "This is the type of the transcript.", + "enum": [ + "partial", + "final" + ] + }, + "transcript": { + "type": "string", + "description": "This is the transcript content." + }, + "isFiltered": { + "type": "boolean", + "description": "Indicates if the transcript was filtered for security reasons." + }, + "detectedThreats": { + "description": "List of detected security threats if the transcript was filtered.", + "type": "array", + "items": { + "type": "string" + } + }, + "originalTranscript": { + "type": "string", + "description": "The original transcript before filtering (only included if content was filtered)." } }, "required": [ - "type" + "type", + "role", + "transcriptType", + "transcript" ] }, - "ServerMessageTransferUpdate": { + "ServerMessageUserInterrupted": { "type": "object", "properties": { "phoneNumber": { @@ -62212,27 +67143,14 @@ }, "type": { "type": "string", - "description": "This is the type of the message. \"transfer-update\" is sent whenever a transfer happens.", + "description": "This is the type of the message. \"user-interrupted\" is sent when the user interrupts the assistant.", "enum": [ - "transfer-update" + "user-interrupted" ] }, - "destination": { - "description": "This is the destination of the transfer.", - "oneOf": [ - { - "$ref": "#/components/schemas/TransferDestinationAssistant", - "title": "Assistant" - }, - { - "$ref": "#/components/schemas/TransferDestinationNumber", - "title": "Number" - }, - { - "$ref": "#/components/schemas/TransferDestinationSip", - "title": "Sip" - } - ] + "turnId": { + "type": "string", + "description": "This is the turnId of the LLM response that was interrupted. Matches the turnId\non model-output messages so clients can discard the interrupted turn's tokens." }, "timestamp": { "type": "number", @@ -62277,37 +67195,13 @@ "$ref": "#/components/schemas/Chat" } ] - }, - "toAssistant": { - "description": "This is the assistant that the call is being transferred to. This is only sent if `destination.type` is \"assistant\".", - "allOf": [ - { - "$ref": "#/components/schemas/CreateAssistantDTO" - } - ] - }, - "fromAssistant": { - "description": "This is the assistant that the call is being transferred from. This is only sent if `destination.type` is \"assistant\".", - "allOf": [ - { - "$ref": "#/components/schemas/CreateAssistantDTO" - } - ] - }, - "toStepRecord": { - "type": "object", - "description": "This is the step that the conversation moved to." - }, - "fromStepRecord": { - "type": "object", - "description": "This is the step that the conversation moved from. =" } }, "required": [ "type" ] }, - "ServerMessageTranscript": { + "ServerMessageLanguageChangeDetected": { "type": "object", "properties": { "phoneNumber": { @@ -62337,10 +67231,9 @@ }, "type": { "type": "string", - "description": "This is the type of the message. \"transcript\" is sent as transcriber outputs partial or final transcript.", + "description": "This is the type of the message. \"language-change-detected\" is sent when the transcriber is automatically switched based on the detected language.", "enum": [ - "transcript", - "transcript[transcriptType=\"final\"]" + "language-change-detected" ] }, "timestamp": { @@ -62387,50 +67280,17 @@ } ] }, - "role": { - "type": "string", - "description": "This is the role for which the transcript is for.", - "enum": [ - "assistant", - "user" - ] - }, - "transcriptType": { - "type": "string", - "description": "This is the type of the transcript.", - "enum": [ - "partial", - "final" - ] - }, - "transcript": { - "type": "string", - "description": "This is the transcript content." - }, - "isFiltered": { - "type": "boolean", - "description": "Indicates if the transcript was filtered for security reasons." - }, - "detectedThreats": { - "description": "List of detected security threats if the transcript was filtered.", - "type": "array", - "items": { - "type": "string" - } - }, - "originalTranscript": { + "language": { "type": "string", - "description": "The original transcript before filtering (only included if content was filtered)." + "description": "This is the language the transcriber is switched to." } }, "required": [ "type", - "role", - "transcriptType", - "transcript" + "language" ] }, - "ServerMessageUserInterrupted": { + "ServerMessageVoiceInput": { "type": "object", "properties": { "phoneNumber": { @@ -62460,15 +67320,11 @@ }, "type": { "type": "string", - "description": "This is the type of the message. \"user-interrupted\" is sent when the user interrupts the assistant.", + "description": "This is the type of the message. \"voice-input\" is sent when a generation is requested from voice provider.", "enum": [ - "user-interrupted" + "voice-input" ] }, - "turnId": { - "type": "string", - "description": "This is the turnId of the LLM response that was interrupted. Matches the turnId\non model-output messages so clients can discard the interrupted turn's tokens." - }, "timestamp": { "type": "number", "description": "This is the timestamp of the message." @@ -62512,13 +67368,18 @@ "$ref": "#/components/schemas/Chat" } ] + }, + "input": { + "type": "string", + "description": "This is the voice input content" } }, "required": [ - "type" + "type", + "input" ] }, - "ServerMessageLanguageChangeDetected": { + "ServerMessageAssistantSpeech": { "type": "object", "properties": { "phoneNumber": { @@ -62548,11 +67409,44 @@ }, "type": { "type": "string", - "description": "This is the type of the message. \"language-change-detected\" is sent when the transcriber is automatically switched based on the detected language.", + "description": "This is the type of the message. \"assistant-speech\" is sent as assistant audio is being played.", "enum": [ - "language-change-detected" + "assistant.speechStarted" ] }, + "text": { + "type": "string", + "description": "The full assistant text for the current turn. This is the complete text,\nnot an incremental delta — consumers should use `timing` metadata (e.g.\n`wordsSpoken`) to determine which portion has been spoken so far." + }, + "turn": { + "type": "number", + "description": "This is the turn number of the assistant speech event (0-indexed)." + }, + "source": { + "type": "string", + "description": "Indicates how the text was sourced.", + "enum": [ + "model", + "force-say", + "custom-voice" + ] + }, + "timing": { + "description": "Optional timing metadata. Shape depends on `timing.type`:\n\n- `word-alignment` (ElevenLabs): per-character timing at playback\n cadence. words[] includes space entries. Best consumed by tracking\n a running character count: join timing.words, add to a char cursor,\n and highlight text up to that position. No interpolation needed.\n\n- `word-progress` (Minimax with voice.subtitleType: 'word'): cursor-\n based word count per TTS segment. Use wordsSpoken as the anchor,\n interpolate forward using segmentDurationMs or timing.words until\n the next event arrives.\n\nWhen absent, the event is a text-only fallback for providers without\nword-level timing (e.g. Cartesia, Deepgram, Azure). Text emits once\nper TTS chunk when audio is playing. Optionally interpolate a word\ncursor at ~3.5 words/sec between events for approximate tracking.", + "oneOf": [ + { + "$ref": "#/components/schemas/AssistantSpeechWordAlignmentTiming", + "title": "WordAlignmentTiming" + }, + { + "$ref": "#/components/schemas/AssistantSpeechWordProgressTiming", + "title": "WordProgressTiming" + } + ], + "discriminator": { + "propertyName": "type" + } + }, "timestamp": { "type": "number", "description": "This is the timestamp of the message." @@ -62596,18 +67490,14 @@ "$ref": "#/components/schemas/Chat" } ] - }, - "language": { - "type": "string", - "description": "This is the language the transcriber is switched to." } }, "required": [ "type", - "language" + "text" ] }, - "ServerMessageVoiceInput": { + "ServerMessageVoiceRequest": { "type": "object", "properties": { "phoneNumber": { @@ -62637,9 +67527,9 @@ }, "type": { "type": "string", - "description": "This is the type of the message. \"voice-input\" is sent when a generation is requested from voice provider.", + "description": "This is the type of the message. \"voice-request\" is sent when using `assistant.voice={ \"type\": \"custom-voice\" }`.\n\nHere is what the request will look like:\n\nPOST https://{assistant.voice.server.url}\nContent-Type: application/json\n\n{\n \"messsage\": {\n \"type\": \"voice-request\",\n \"text\": \"Hello, world!\",\n \"sampleRate\": 24000,\n ...other metadata about the call...\n }\n}\n\nThe expected response is 1-channel 16-bit raw PCM audio at the sample rate specified in the request. Here is how the response will be piped to the transport:\n```\nresponse.on('data', (chunk: Buffer) => {\n outputStream.write(chunk);\n});\n```", "enum": [ - "voice-input" + "voice-request" ] }, "timestamp": { @@ -62686,17 +67576,22 @@ } ] }, - "input": { + "text": { "type": "string", - "description": "This is the voice input content" + "description": "This is the text to be synthesized." + }, + "sampleRate": { + "type": "number", + "description": "This is the sample rate to be synthesized." } }, "required": [ "type", - "input" + "text", + "sampleRate" ] }, - "ServerMessageAssistantSpeech": { + "ServerMessageCallEndpointingRequest": { "type": "object", "properties": { "phoneNumber": { @@ -62726,42 +67621,44 @@ }, "type": { "type": "string", - "description": "This is the type of the message. \"assistant-speech\" is sent as assistant audio is being played.", + "description": "This is the type of the message. \"call.endpointing.request\" is sent when using `assistant.startSpeakingPlan.smartEndpointingPlan={ \"provider\": \"custom-endpointing-model\" }`.\n\nHere is what the request will look like:\n\nPOST https://{assistant.startSpeakingPlan.smartEndpointingPlan.server.url}\nContent-Type: application/json\n\n{\n \"message\": {\n \"type\": \"call.endpointing.request\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"message\": \"Hello, how are you?\",\n \"time\": 1234567890,\n \"secondsFromStart\": 0\n }\n ],\n ...other metadata about the call...\n }\n}\n\nThe expected response:\n{\n \"timeoutSeconds\": 0.5\n}", "enum": [ - "assistant.speechStarted" + "call.endpointing.request" ] }, - "text": { - "type": "string", - "description": "The full assistant text for the current turn. This is the complete text,\nnot an incremental delta — consumers should use `timing` metadata (e.g.\n`wordsSpoken`) to determine which portion has been spoken so far." - }, - "turn": { - "type": "number", - "description": "This is the turn number of the assistant speech event (0-indexed)." - }, - "source": { - "type": "string", - "description": "Indicates how the text was sourced.", - "enum": [ - "model", - "force-say", - "custom-voice" - ] + "messages": { + "type": "array", + "description": "This is the conversation history at the time of the endpointing request.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/UserMessage", + "title": "UserMessage" + }, + { + "$ref": "#/components/schemas/SystemMessage", + "title": "SystemMessage" + }, + { + "$ref": "#/components/schemas/BotMessage", + "title": "BotMessage" + }, + { + "$ref": "#/components/schemas/ToolCallMessage", + "title": "ToolCallMessage" + }, + { + "$ref": "#/components/schemas/ToolCallResultMessage", + "title": "ToolCallResultMessage" + } + ] + } }, - "timing": { - "description": "Optional timing metadata. Shape depends on `timing.type`:\n\n- `word-alignment` (ElevenLabs): per-character timing at playback\n cadence. words[] includes space entries. Best consumed by tracking\n a running character count: join timing.words, add to a char cursor,\n and highlight text up to that position. No interpolation needed.\n\n- `word-progress` (Minimax with voice.subtitleType: 'word'): cursor-\n based word count per TTS segment. Use wordsSpoken as the anchor,\n interpolate forward using segmentDurationMs or timing.words until\n the next event arrives.\n\nWhen absent, the event is a text-only fallback for providers without\nword-level timing (e.g. Cartesia, Deepgram, Azure). Text emits once\nper TTS chunk when audio is playing. Optionally interpolate a word\ncursor at ~3.5 words/sec between events for approximate tracking.", - "oneOf": [ - { - "$ref": "#/components/schemas/AssistantSpeechWordAlignmentTiming", - "title": "WordAlignmentTiming" - }, - { - "$ref": "#/components/schemas/AssistantSpeechWordProgressTiming", - "title": "WordProgressTiming" - } - ], - "discriminator": { - "propertyName": "type" + "messagesOpenAIFormatted": { + "description": "This is just `messages` formatted for OpenAI.", + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAIMessage" } }, "timestamp": { @@ -62811,10 +67708,10 @@ }, "required": [ "type", - "text" + "messagesOpenAIFormatted" ] }, - "ServerMessageVoiceRequest": { + "ServerMessageChatCreated": { "type": "object", "properties": { "phoneNumber": { @@ -62844,9 +67741,9 @@ }, "type": { "type": "string", - "description": "This is the type of the message. \"voice-request\" is sent when using `assistant.voice={ \"type\": \"custom-voice\" }`.\n\nHere is what the request will look like:\n\nPOST https://{assistant.voice.server.url}\nContent-Type: application/json\n\n{\n \"messsage\": {\n \"type\": \"voice-request\",\n \"text\": \"Hello, world!\",\n \"sampleRate\": 24000,\n ...other metadata about the call...\n }\n}\n\nThe expected response is 1-channel 16-bit raw PCM audio at the sample rate specified in the request. Here is how the response will be piped to the transport:\n```\nresponse.on('data', (chunk: Buffer) => {\n outputStream.write(chunk);\n});\n```", + "description": "This is the type of the message. \"chat.created\" is sent when a new chat is created.", "enum": [ - "voice-request" + "chat.created" ] }, "timestamp": { @@ -62886,29 +67783,20 @@ ] }, "chat": { - "description": "This is the chat object.", + "description": "This is the chat that was created.", "allOf": [ { "$ref": "#/components/schemas/Chat" } ] - }, - "text": { - "type": "string", - "description": "This is the text to be synthesized." - }, - "sampleRate": { - "type": "number", - "description": "This is the sample rate to be synthesized." } }, "required": [ "type", - "text", - "sampleRate" + "chat" ] }, - "ServerMessageCallEndpointingRequest": { + "ServerMessageChatDeleted": { "type": "object", "properties": { "phoneNumber": { @@ -62938,46 +67826,11 @@ }, "type": { "type": "string", - "description": "This is the type of the message. \"call.endpointing.request\" is sent when using `assistant.startSpeakingPlan.smartEndpointingPlan={ \"provider\": \"custom-endpointing-model\" }`.\n\nHere is what the request will look like:\n\nPOST https://{assistant.startSpeakingPlan.smartEndpointingPlan.server.url}\nContent-Type: application/json\n\n{\n \"message\": {\n \"type\": \"call.endpointing.request\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"message\": \"Hello, how are you?\",\n \"time\": 1234567890,\n \"secondsFromStart\": 0\n }\n ],\n ...other metadata about the call...\n }\n}\n\nThe expected response:\n{\n \"timeoutSeconds\": 0.5\n}", + "description": "This is the type of the message. \"chat.deleted\" is sent when a chat is deleted.", "enum": [ - "call.endpointing.request" + "chat.deleted" ] }, - "messages": { - "type": "array", - "description": "This is the conversation history at the time of the endpointing request.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/UserMessage", - "title": "UserMessage" - }, - { - "$ref": "#/components/schemas/SystemMessage", - "title": "SystemMessage" - }, - { - "$ref": "#/components/schemas/BotMessage", - "title": "BotMessage" - }, - { - "$ref": "#/components/schemas/ToolCallMessage", - "title": "ToolCallMessage" - }, - { - "$ref": "#/components/schemas/ToolCallResultMessage", - "title": "ToolCallResultMessage" - } - ] - } - }, - "messagesOpenAIFormatted": { - "description": "This is just `messages` formatted for OpenAI.", - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAIMessage" - } - }, "timestamp": { "type": "number", "description": "This is the timestamp of the message." @@ -63015,7 +67868,7 @@ ] }, "chat": { - "description": "This is the chat object.", + "description": "This is the chat that was deleted.", "allOf": [ { "$ref": "#/components/schemas/Chat" @@ -63025,10 +67878,10 @@ }, "required": [ "type", - "messagesOpenAIFormatted" + "chat" ] }, - "ServerMessageChatCreated": { + "ServerMessageSessionCreated": { "type": "object", "properties": { "phoneNumber": { @@ -63058,9 +67911,9 @@ }, "type": { "type": "string", - "description": "This is the type of the message. \"chat.created\" is sent when a new chat is created.", + "description": "This is the type of the message. \"session.created\" is sent when a new session is created.", "enum": [ - "chat.created" + "session.created" ] }, "timestamp": { @@ -63100,105 +67953,28 @@ ] }, "chat": { - "description": "This is the chat that was created.", + "description": "This is the chat object.", "allOf": [ { "$ref": "#/components/schemas/Chat" } ] - } - }, - "required": [ - "type", - "chat" - ] - }, - "ServerMessageChatDeleted": { - "type": "object", - "properties": { - "phoneNumber": { - "description": "This is the phone number that the message is associated with.", - "oneOf": [ - { - "$ref": "#/components/schemas/CreateByoPhoneNumberDTO", - "title": "ByoPhoneNumber" - }, - { - "$ref": "#/components/schemas/CreateTwilioPhoneNumberDTO", - "title": "TwilioPhoneNumber" - }, - { - "$ref": "#/components/schemas/CreateVonagePhoneNumberDTO", - "title": "VonagePhoneNumber" - }, - { - "$ref": "#/components/schemas/CreateVapiPhoneNumberDTO", - "title": "VapiPhoneNumber" - }, - { - "$ref": "#/components/schemas/CreateTelnyxPhoneNumberDTO", - "title": "TelnyxPhoneNumber" - } - ] - }, - "type": { - "type": "string", - "description": "This is the type of the message. \"chat.deleted\" is sent when a chat is deleted.", - "enum": [ - "chat.deleted" - ] - }, - "timestamp": { - "type": "number", - "description": "This is the timestamp of the message." - }, - "artifact": { - "description": "This is a live version of the `call.artifact`.\n\nThis matches what is stored on `call.artifact` after the call.", - "allOf": [ - { - "$ref": "#/components/schemas/Artifact" - } - ] - }, - "assistant": { - "description": "This is the assistant that the message is associated with.", - "allOf": [ - { - "$ref": "#/components/schemas/CreateAssistantDTO" - } - ] - }, - "customer": { - "description": "This is the customer that the message is associated with.", - "allOf": [ - { - "$ref": "#/components/schemas/CreateCustomerDTO" - } - ] }, - "call": { - "description": "This is the call that the message is associated with.", - "allOf": [ - { - "$ref": "#/components/schemas/Call" - } - ] - }, - "chat": { - "description": "This is the chat that was deleted.", + "session": { + "description": "This is the session that was created.", "allOf": [ { - "$ref": "#/components/schemas/Chat" + "$ref": "#/components/schemas/Session" } ] } }, "required": [ "type", - "chat" + "session" ] }, - "ServerMessageSessionCreated": { + "ServerMessageSessionUpdated": { "type": "object", "properties": { "phoneNumber": { @@ -63228,9 +68004,9 @@ }, "type": { "type": "string", - "description": "This is the type of the message. \"session.created\" is sent when a new session is created.", + "description": "This is the type of the message. \"session.updated\" is sent when a session is updated.", "enum": [ - "session.created" + "session.updated" ] }, "timestamp": { @@ -63278,7 +68054,7 @@ ] }, "session": { - "description": "This is the session that was created.", + "description": "This is the session that was updated.", "allOf": [ { "$ref": "#/components/schemas/Session" @@ -63291,7 +68067,7 @@ "session" ] }, - "ServerMessageSessionUpdated": { + "ServerMessageSessionDeleted": { "type": "object", "properties": { "phoneNumber": { @@ -63321,9 +68097,9 @@ }, "type": { "type": "string", - "description": "This is the type of the message. \"session.updated\" is sent when a session is updated.", + "description": "This is the type of the message. \"session.deleted\" is sent when a session is deleted.", "enum": [ - "session.updated" + "session.deleted" ] }, "timestamp": { @@ -63371,7 +68147,7 @@ ] }, "session": { - "description": "This is the session that was updated.", + "description": "This is the session that was deleted.", "allOf": [ { "$ref": "#/components/schemas/Session" @@ -63384,7 +68160,7 @@ "session" ] }, - "ServerMessageSessionDeleted": { + "ServerMessageCallDeleted": { "type": "object", "properties": { "phoneNumber": { @@ -63414,9 +68190,9 @@ }, "type": { "type": "string", - "description": "This is the type of the message. \"session.deleted\" is sent when a session is deleted.", + "description": "This is the type of the message. \"call.deleted\" is sent when a call is deleted.", "enum": [ - "session.deleted" + "call.deleted" ] }, "timestamp": { @@ -63462,22 +68238,13 @@ "$ref": "#/components/schemas/Chat" } ] - }, - "session": { - "description": "This is the session that was deleted.", - "allOf": [ - { - "$ref": "#/components/schemas/Session" - } - ] } }, "required": [ - "type", - "session" + "type" ] }, - "ServerMessageCallDeleted": { + "ServerMessageCallDeleteFailed": { "type": "object", "properties": { "phoneNumber": { @@ -63509,7 +68276,7 @@ "type": "string", "description": "This is the type of the message. \"call.deleted\" is sent when a call is deleted.", "enum": [ - "call.deleted" + "call.delete.failed" ] }, "timestamp": { @@ -63561,7 +68328,55 @@ "type" ] }, - "ServerMessageCallDeleteFailed": { + "CampaignContact": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "campaignId": { + "type": "string" + }, + "orgId": { + "type": "string" + }, + "customerId": { + "type": "string" + }, + "number": { + "type": "string", + "minLength": 3, + "maxLength": 40 + }, + "name": { + "type": "string", + "maxLength": 40 + }, + "assistantOverrides": { + "$ref": "#/components/schemas/AssistantOverrides" + }, + "squadOverrides": { + "description": "Use this when the campaign targets a `squadId`. Mirrors the call-level `squadOverrides` field. Merged with the campaign-level squadOverrides at dispatch time.", + "allOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides" + } + ] + }, + "createdAt": { + "format": "date-time", + "type": "string" + } + }, + "required": [ + "id", + "campaignId", + "orgId", + "number", + "createdAt" + ] + }, + "ServerMessageCampaignPredial": { "type": "object", "properties": { "phoneNumber": { @@ -63591,9 +68406,21 @@ }, "type": { "type": "string", - "description": "This is the type of the message. \"call.deleted\" is sent when a call is deleted.", + "description": "This is the type of the message. \"campaign.predial\" is sent to the campaign's server before each contact is dialed, so the server can decide whether the contact is eligible to be called.", "enum": [ - "call.delete.failed" + "campaign.predial" + ] + }, + "campaignId": { + "type": "string", + "description": "This is the ID of the campaign the contact belongs to." + }, + "contact": { + "description": "This is the contact that is about to be dialed.", + "allOf": [ + { + "$ref": "#/components/schemas/CampaignContact" + } ] }, "timestamp": { @@ -63642,7 +68469,9 @@ } }, "required": [ - "type" + "type", + "campaignId", + "contact" ] }, "ServerMessage": { @@ -63758,6 +68587,10 @@ { "$ref": "#/components/schemas/ServerMessageCallDeleteFailed", "title": "CallDeleteFailed" + }, + { + "$ref": "#/components/schemas/ServerMessageCampaignPredial", + "title": "CampaignPredial" } ] } @@ -64040,6 +68873,18 @@ "timeoutSeconds" ] }, + "ServerMessageResponseCampaignPredial": { + "type": "object", + "properties": { + "eligible": { + "type": "boolean", + "description": "This is whether the contact is eligible to be dialed. When `false` — or when the server is unreachable, errors, or times out — the contact is skipped and not called." + } + }, + "required": [ + "eligible" + ] + }, "ServerMessageResponse": { "type": "object", "properties": { @@ -64073,6 +68918,10 @@ { "$ref": "#/components/schemas/ServerMessageResponseCallEndpointingRequest", "title": "CallEndpointingRequest" + }, + { + "$ref": "#/components/schemas/ServerMessageResponseCampaignPredial", + "title": "CampaignPredial" } ] } @@ -64279,397 +69128,6 @@ "message" ] }, - "BotMessage": { - "type": "object", - "properties": { - "role": { - "type": "string", - "description": "The role of the bot in the conversation." - }, - "message": { - "type": "string", - "description": "The message content from the bot." - }, - "time": { - "type": "number", - "description": "The timestamp when the message was sent." - }, - "endTime": { - "type": "number", - "description": "The timestamp when the message ended." - }, - "secondsFromStart": { - "type": "number", - "description": "The number of seconds from the start of the conversation." - }, - "source": { - "type": "string", - "description": "The source of the message." - }, - "duration": { - "type": "number", - "description": "The duration of the message in seconds." - } - }, - "required": [ - "role", - "message", - "time", - "endTime", - "secondsFromStart" - ] - }, - "ToolCallMessage": { - "type": "object", - "properties": { - "role": { - "type": "string", - "description": "The role of the tool call in the conversation." - }, - "toolCalls": { - "description": "The list of tool calls made during the conversation.", - "type": "array", - "items": { - "type": "object" - } - }, - "message": { - "type": "string", - "description": "The message content for the tool call." - }, - "time": { - "type": "number", - "description": "The timestamp when the message was sent." - }, - "secondsFromStart": { - "type": "number", - "description": "The number of seconds from the start of the conversation." - } - }, - "required": [ - "role", - "toolCalls", - "message", - "time", - "secondsFromStart" - ] - }, - "ToolCallResultMessage": { - "type": "object", - "properties": { - "role": { - "type": "string", - "description": "The role of the tool call result in the conversation." - }, - "toolCallId": { - "type": "string", - "description": "The ID of the tool call." - }, - "name": { - "type": "string", - "description": "The name of the tool that returned the result." - }, - "result": { - "type": "string", - "description": "The result of the tool call in JSON format." - }, - "time": { - "type": "number", - "description": "The timestamp when the message was sent." - }, - "secondsFromStart": { - "type": "number", - "description": "The number of seconds from the start of the conversation." - }, - "metadata": { - "type": "object", - "description": "The metadata for the tool call result." - } - }, - "required": [ - "role", - "toolCallId", - "name", - "result", - "time", - "secondsFromStart" - ] - }, - "TransportCost": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "This is the type of cost, always 'transport' for this class.", - "enum": [ - "transport" - ] - }, - "provider": { - "type": "string", - "enum": [ - "daily", - "vapi.websocket", - "twilio", - "vonage", - "telnyx", - "vapi.sip" - ] - }, - "minutes": { - "type": "number", - "description": "This is the minutes of `transport` usage. This should match `call.endedAt` - `call.startedAt`." - }, - "cost": { - "type": "number", - "description": "This is the cost of the component in USD." - } - }, - "required": [ - "type", - "minutes", - "cost" - ] - }, - "TranscriberCost": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "This is the type of cost, always 'transcriber' for this class.", - "enum": [ - "transcriber" - ] - }, - "transcriber": { - "type": "object", - "description": "This is the transcriber that was used during the call.\n\nThis matches one of the below:\n- `call.assistant.transcriber`,\n- `call.assistantId->transcriber`,\n- `call.squad[n].assistant.transcriber`,\n- `call.squad[n].assistantId->transcriber`,\n- `call.squadId->[n].assistant.transcriber`,\n- `call.squadId->[n].assistantId->transcriber`." - }, - "minutes": { - "type": "number", - "description": "This is the minutes of `transcriber` usage. This should match `call.endedAt` - `call.startedAt` for single assistant calls, while squad calls will have multiple transcriber costs one for each assistant that was used." - }, - "cost": { - "type": "number", - "description": "This is the cost of the component in USD." - } - }, - "required": [ - "type", - "transcriber", - "minutes", - "cost" - ] - }, - "ModelCost": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "This is the type of cost, always 'model' for this class.", - "enum": [ - "model" - ] - }, - "model": { - "type": "object", - "description": "This is the model that was used during the call.\n\nThis matches one of the following:\n- `call.assistant.model`,\n- `call.assistantId->model`,\n- `call.squad[n].assistant.model`,\n- `call.squad[n].assistantId->model`,\n- `call.squadId->[n].assistant.model`,\n- `call.squadId->[n].assistantId->model`." - }, - "promptTokens": { - "type": "number", - "description": "This is the number of prompt tokens used in the call. These should be total prompt tokens used in the call for single assistant calls, while squad calls will have multiple model costs one for each assistant that was used." - }, - "completionTokens": { - "type": "number", - "description": "This is the number of completion tokens generated in the call. These should be total completion tokens used in the call for single assistant calls, while squad calls will have multiple model costs one for each assistant that was used." - }, - "cachedPromptTokens": { - "type": "number", - "description": "This is the number of cached prompt tokens used in the call. This is only applicable to certain providers (e.g., OpenAI, Azure OpenAI) that support prompt caching. Cached tokens are billed at a discounted rate." - }, - "cost": { - "type": "number", - "description": "This is the cost of the component in USD." - } - }, - "required": [ - "type", - "model", - "promptTokens", - "completionTokens", - "cost" - ] - }, - "VoiceCost": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "This is the type of cost, always 'voice' for this class.", - "enum": [ - "voice" - ] - }, - "voice": { - "type": "object", - "description": "This is the voice that was used during the call.\n\nThis matches one of the following:\n- `call.assistant.voice`,\n- `call.assistantId->voice`,\n- `call.squad[n].assistant.voice`,\n- `call.squad[n].assistantId->voice`,\n- `call.squadId->[n].assistant.voice`,\n- `call.squadId->[n].assistantId->voice`." - }, - "characters": { - "type": "number", - "description": "This is the number of characters that were generated during the call. These should be total characters used in the call for single assistant calls, while squad calls will have multiple voice costs one for each assistant that was used." - }, - "cost": { - "type": "number", - "description": "This is the cost of the component in USD." - } - }, - "required": [ - "type", - "voice", - "characters", - "cost" - ] - }, - "VapiCost": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "This is the type of cost, always 'vapi' for this class.", - "enum": [ - "vapi" - ] - }, - "subType": { - "type": "string", - "description": "This is the sub type of the cost.", - "enum": [ - "normal", - "overage" - ] - }, - "minutes": { - "type": "number", - "description": "This is the minutes of Vapi usage. This should match `call.endedAt` - `call.startedAt`." - }, - "cost": { - "type": "number", - "description": "This is the cost of the component in USD." - } - }, - "required": [ - "type", - "subType", - "minutes", - "cost" - ] - }, - "AnalysisCost": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "This is the type of cost, always 'analysis' for this class.", - "enum": [ - "analysis" - ] - }, - "analysisType": { - "type": "string", - "description": "This is the type of analysis performed.", - "enum": [ - "summary", - "structuredData", - "successEvaluation", - "structuredOutput" - ] - }, - "model": { - "type": "object", - "description": "This is the model that was used to perform the analysis." - }, - "promptTokens": { - "type": "number", - "description": "This is the number of prompt tokens used in the analysis." - }, - "completionTokens": { - "type": "number", - "description": "This is the number of completion tokens generated in the analysis." - }, - "cachedPromptTokens": { - "type": "number", - "description": "This is the number of cached prompt tokens used in the analysis. This is only applicable to certain providers (e.g., OpenAI, Azure OpenAI) that support prompt caching. Cached tokens are billed at a discounted rate." - }, - "cost": { - "type": "number", - "description": "This is the cost of the component in USD." - } - }, - "required": [ - "type", - "analysisType", - "model", - "promptTokens", - "completionTokens", - "cost" - ] - }, - "VoicemailDetectionCost": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "This is the type of cost, always 'voicemail-detection' for this class.", - "enum": [ - "voicemail-detection" - ] - }, - "model": { - "type": "object", - "description": "This is the model that was used to perform the analysis." - }, - "provider": { - "type": "string", - "description": "This is the provider that was used to detect the voicemail.", - "enum": [ - "twilio", - "google", - "openai", - "vapi" - ] - }, - "promptTextTokens": { - "type": "number", - "description": "This is the number of prompt text tokens used in the voicemail detection." - }, - "promptAudioTokens": { - "type": "number", - "description": "This is the number of prompt audio tokens used in the voicemail detection." - }, - "completionTextTokens": { - "type": "number", - "description": "This is the number of completion text tokens used in the voicemail detection." - }, - "completionAudioTokens": { - "type": "number", - "description": "This is the number of completion audio tokens used in the voicemail detection." - }, - "cost": { - "type": "number", - "description": "This is the cost of the component in USD." - } - }, - "required": [ - "type", - "model", - "provider", - "promptTextTokens", - "promptAudioTokens", - "completionTextTokens", - "completionAudioTokens", - "cost" - ] - }, "KnowledgeBaseCost": { "type": "object", "properties": { @@ -64705,26 +69163,6 @@ "cost" ] }, - "ChatCost": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "This is the type of cost, always 'chat' for this class.", - "enum": [ - "chat" - ] - }, - "cost": { - "type": "number", - "description": "This is the cost of the component in USD." - } - }, - "required": [ - "type", - "cost" - ] - }, "SessionCost": { "type": "object", "properties": { @@ -64750,7 +69188,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -64837,7 +69275,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -64892,7 +69330,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -64947,7 +69385,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -65023,7 +69461,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -65113,7 +69551,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -65189,7 +69627,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -65240,7 +69678,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -65291,7 +69729,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -65342,7 +69780,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -65393,7 +69831,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ { @@ -65444,7 +69882,7 @@ "properties": { "messages": { "type": "array", - "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "description": "Messages spoken while the tool is running. Multiple request-start messages are variants. For request-response-delayed, same timing means variants and different timings mean staged updates.", "items": { "oneOf": [ {