diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index 9044bc121..ecb32b45e 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -862,6 +862,15 @@ "type": "string" } }, + { + "name": "squadId", + "required": false, + "in": "query", + "description": "This is the unique identifier for the squad that will be used for the chat.", + "schema": { + "type": "string" + } + }, { "name": "workflowId", "required": false, @@ -1019,7 +1028,7 @@ "post": { "operationId": "ChatController_createChat", "summary": "Create Chat", - "description": "Creates a new chat. Requires at least one of: assistantId/assistant, sessionId, or previousChatId. Note: sessionId and previousChatId are mutually exclusive.", + "description": "Creates a new chat with optional SMS delivery via transport field. Requires at least one of: assistantId/assistant, sessionId, or previousChatId. Note: sessionId and previousChatId are mutually exclusive. Transport field enables SMS delivery with two modes: (1) New conversation - provide transport.phoneNumberId and transport.customer to create a new session, (2) Existing conversation - provide sessionId to use existing session data. Cannot specify both sessionId and transport fields together. The transport.useLLMGeneratedMessageForOutbound flag controls whether input is processed by LLM (true, default) or forwarded directly as SMS (false).", "parameters": [], "requestBody": { "required": true, @@ -1573,6 +1582,15 @@ "type": "string" } }, + { + "name": "squadId", + "required": false, + "in": "query", + "description": "This is the ID of the squad to filter sessions by.", + "schema": { + "type": "string" + } + }, { "name": "workflowId", "required": false, @@ -3858,58 +3876,252 @@ ] } }, - "/provider/{provider}/{resourceName}": { + "/eval": { "post": { - "operationId": "ProviderResourceController_createProviderResource", - "summary": "Create Provider Resource", + "operationId": "EvalController_create", + "summary": "Create Eval", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/CreateEvalDTO", + "title": "CreateEvalDTO" + } + ] + } + } + } + }, + "responses": { + "201": { + "description": "" + } + }, + "tags": [ + "Eval" + ], + "security": [ + { + "bearer": [] + } + ] + }, + "get": { + "operationId": "EvalController_getPaginated", + "summary": "Get Evals with pagination", "parameters": [ { - "name": "content-type", - "required": true, - "in": "header", + "name": "id", + "required": false, + "in": "query", "schema": { "type": "string" } }, { - "name": "provider", - "required": true, - "in": "path", - "description": "The provider (e.g., 11labs)", + "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": [ - "11labs" + "ASC", + "DESC" ], "type": "string" } }, { - "name": "resourceName", - "required": true, - "in": "path", - "description": "The resource name (e.g., pronunciation-dictionary)", + "name": "limit", + "required": false, + "in": "query", + "description": "This is the maximum number of items to return. Defaults to 100.", "schema": { - "enum": [ - "pronunciation-dictionary" - ], + "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": { - "201": { - "description": "Successfully created provider resource", + "200": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProviderResource" + "$ref": "#/components/schemas/EvalPaginatedResponse" } } } } }, "tags": [ - "Provider Resources" + "Eval" + ], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/eval/{id}": { + "patch": { + "operationId": "EvalController_update", + "summary": "Update Eval", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/UpdateEvalDTO", + "title": "UpdateEvalDTO" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Eval" + ], + "security": [ + { + "bearer": [] + } + ] + }, + "delete": { + "operationId": "EvalController_remove", + "summary": "Delete Eval", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Eval" ], "security": [ { @@ -3918,43 +4130,381 @@ ] }, "get": { - "operationId": "ProviderResourceController_getProviderResourcesPaginated", - "summary": "List Provider Resources", + "operationId": "EvalController_get", + "summary": "Get Eval", "parameters": [ { - "name": "provider", + "name": "id", "required": true, "in": "path", - "description": "The provider (e.g., 11labs)", "schema": { - "enum": [ - "11labs" - ], "type": "string" } - }, + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Eval" + ], + "security": [ { - "name": "resourceName", + "bearer": [] + } + ] + } + }, + "/eval/run/{id}": { + "delete": { + "operationId": "EvalController_removeRun", + "summary": "Delete Eval Run", + "parameters": [ + { + "name": "id", "required": true, "in": "path", - "description": "The resource name (e.g., pronunciation-dictionary)", "schema": { - "enum": [ - "pronunciation-dictionary" - ], "type": "string" } - }, + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Eval" + ], + "security": [ + { + "bearer": [] + } + ] + }, + "get": { + "operationId": "EvalController_getRun", + "summary": "Get Eval Run", + "parameters": [ { "name": "id", - "required": false, - "in": "query", + "required": true, + "in": "path", "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalRun" + } + } + } + } + }, + "tags": [ + "Eval" + ], + "security": [ + { + "bearer": [] + } + ] + } + }, + "/eval/run": { + "post": { + "operationId": "EvalController_run", + "summary": "Run Eval", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEvalRunDTO" + } + } + } + }, + "responses": { + "200": { + "description": "" }, + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Eval" + ], + "security": [ { - "name": "resourceId", + "bearer": [] + } + ] + }, + "get": { + "operationId": "EvalController_getRunsPaginated", + "summary": "Get Eval Runs with pagination", + "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": "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": [] + } + ] + } + }, + "/provider/{provider}/{resourceName}": { + "post": { + "operationId": "ProviderResourceController_createProviderResource", + "summary": "Create Provider Resource", + "parameters": [ + { + "name": "content-type", + "required": true, + "in": "header", + "schema": { + "type": "string" + } + }, + { + "name": "provider", + "required": true, + "in": "path", + "description": "The provider (e.g., 11labs)", + "schema": { + "enum": [ + "11labs" + ], + "type": "string" + } + }, + { + "name": "resourceName", + "required": true, + "in": "path", + "description": "The resource name (e.g., pronunciation-dictionary)", + "schema": { + "enum": [ + "pronunciation-dictionary" + ], + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "Successfully created provider resource", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProviderResource" + } + } + } + } + }, + "tags": [ + "Provider Resources" + ], + "security": [ + { + "bearer": [] + } + ] + }, + "get": { + "operationId": "ProviderResourceController_getProviderResourcesPaginated", + "summary": "List Provider Resources", + "parameters": [ + { + "name": "provider", + "required": true, + "in": "path", + "description": "The provider (e.g., 11labs)", + "schema": { + "enum": [ + "11labs" + ], + "type": "string" + } + }, + { + "name": "resourceName", + "required": true, + "in": "path", + "description": "The resource name (e.g., pronunciation-dictionary)", + "schema": { + "enum": [ + "pronunciation-dictionary" + ], + "type": "string" + } + }, + { + "name": "id", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "resourceId", "required": false, "in": "query", "schema": { @@ -4442,26 +4992,26 @@ }, "endOfTurnConfidenceThreshold": { "type": "number", - "description": "This is the end of turn confidence threshold. The minimum confidence that the end of turn is detected.\n\n@min 0\n@max 1\n@default 0.7", + "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.\n\n@default 160", + "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", - "description": "This is the maximum wait time for word finalization in milliseconds.\n\n@default 160", + "description": "This is the maximum wait time for word finalization in milliseconds.\nNote: Only used if startSpeakingPlan.smartEndpointingPlan is not set.\n@default 160", "minimum": 0, "example": 160 }, "maxTurnSilence": { "type": "number", - "description": "This is the maximum turn silence time in milliseconds.\n\n@default 400", + "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 }, @@ -5184,6 +5734,18 @@ "maximum": 1, "example": 0.4 }, + "preflightThreshold": { + "type": "number", + "example": 0.3 + }, + "eotThreshold": { + "type": "number", + "example": 0.7 + }, + "eotTimeoutMs": { + "type": "number", + "example": 3000 + }, "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", @@ -5762,6 +6324,20 @@ } ] }, + "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" + }, "fallbackPlan": { "description": "This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", "allOf": [ @@ -6216,26 +6792,26 @@ }, "endOfTurnConfidenceThreshold": { "type": "number", - "description": "This is the end of turn confidence threshold. The minimum confidence that the end of turn is detected.\n\n@min 0\n@max 1\n@default 0.7", + "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.\n\n@default 160", + "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", - "description": "This is the maximum wait time for word finalization in milliseconds.\n\n@default 160", + "description": "This is the maximum wait time for word finalization in milliseconds.\nNote: Only used if startSpeakingPlan.smartEndpointingPlan is not set.\n@default 160", "minimum": 0, "example": 160 }, "maxTurnSilence": { "type": "number", - "description": "This is the maximum turn silence time in milliseconds.\n\n@default 400", + "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 }, @@ -6847,6 +7423,18 @@ "maximum": 1, "example": 0.4 }, + "preflightThreshold": { + "type": "number", + "example": 0.3 + }, + "eotThreshold": { + "type": "number", + "example": 0.7 + }, + "eotTimeoutMs": { + "type": "number", + "example": 3000 + }, "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", @@ -7408,6 +7996,20 @@ "$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" } }, "required": [ @@ -11630,6 +12232,7 @@ "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", @@ -13477,6 +14080,216 @@ "name" ] }, + "VoicemailDetectionBackoffPlan": { + "type": "object", + "properties": { + "startAtSeconds": { + "type": "number", + "description": "This is the number of seconds to wait before starting the first retry attempt.", + "minimum": 0, + "default": 5 + }, + "frequencySeconds": { + "type": "number", + "description": "This is the interval in seconds between retry attempts.", + "minimum": 2.5, + "default": 5 + }, + "maxRetries": { + "type": "number", + "description": "This is the maximum number of retry attempts before giving up.", + "minimum": 1, + "maximum": 10, + "default": 6 + } + } + }, + "GoogleVoicemailDetectionPlan": { + "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.", + "enum": [ + "google" + ] + }, + "backoffPlan": { + "description": "This is the backoff plan for the voicemail detection.", + "allOf": [ + { + "$ref": "#/components/schemas/VoicemailDetectionBackoffPlan" + } + ] + }, + "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" + ] + } + }, + "required": [ + "provider" + ] + }, + "OpenAIVoicemailDetectionPlan": { + "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.", + "enum": [ + "openai" + ] + }, + "backoffPlan": { + "description": "This is the backoff plan for the voicemail detection.", + "allOf": [ + { + "$ref": "#/components/schemas/VoicemailDetectionBackoffPlan" + } + ] + }, + "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" + ] + } + }, + "required": [ + "provider" + ] + }, + "TwilioVoicemailDetectionPlan": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "This is the provider to use for voicemail detection.", + "enum": [ + "twilio" + ] + }, + "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": { + "type": "string", + "description": "This is the provider to use for voicemail detection.", + "enum": [ + "vapi" + ] + }, + "backoffPlan": { + "description": "This is the backoff plan for the voicemail detection.", + "allOf": [ + { + "$ref": "#/components/schemas/VoicemailDetectionBackoffPlan" + } + ] + }, + "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" + ] + } + }, + "required": [ + "provider" + ] + }, "AIEdgeCondition": { "type": "object", "properties": { @@ -14077,7 +14890,7 @@ ] }, "smartEndpointingPlan": { - "description": "This is the plan for smart endpointing. Pick between Vapi smart endpointing or LiveKit smart endpointing (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`.", + "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", @@ -14114,7 +14927,7 @@ } }, "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. If both are provided, `smartEndpointingPlan` takes precedence.\nThis plan will also be overridden by any matching `customEndpointingRules`.", + "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/TranscriptionEndpointingPlan" @@ -14866,6 +15679,27 @@ } } }, + "voicemailDetection": { + "description": "This is the voicemail detection plan for the workflow.", + "oneOf": [ + { + "$ref": "#/components/schemas/GoogleVoicemailDetectionPlan", + "title": "Google" + }, + { + "$ref": "#/components/schemas/OpenAIVoicemailDetectionPlan", + "title": "OpenAI" + }, + { + "$ref": "#/components/schemas/TwilioVoicemailDetectionPlan", + "title": "Twilio" + }, + { + "$ref": "#/components/schemas/VapiVoicemailDetectionPlan", + "title": "Vapi" + } + ] + }, "name": { "type": "string", "maxLength": 80 @@ -21695,216 +22529,6 @@ "do" ] }, - "VoicemailDetectionBackoffPlan": { - "type": "object", - "properties": { - "startAtSeconds": { - "type": "number", - "description": "This is the number of seconds to wait before starting the first retry attempt.", - "minimum": 0, - "default": 5 - }, - "frequencySeconds": { - "type": "number", - "description": "This is the interval in seconds between retry attempts.", - "minimum": 2.5, - "default": 5 - }, - "maxRetries": { - "type": "number", - "description": "This is the maximum number of retry attempts before giving up.", - "minimum": 1, - "maximum": 10, - "default": 6 - } - } - }, - "GoogleVoicemailDetectionPlan": { - "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.", - "enum": [ - "google" - ] - }, - "backoffPlan": { - "description": "This is the backoff plan for the voicemail detection.", - "allOf": [ - { - "$ref": "#/components/schemas/VoicemailDetectionBackoffPlan" - } - ] - }, - "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" - ] - } - }, - "required": [ - "provider" - ] - }, - "OpenAIVoicemailDetectionPlan": { - "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.", - "enum": [ - "openai" - ] - }, - "backoffPlan": { - "description": "This is the backoff plan for the voicemail detection.", - "allOf": [ - { - "$ref": "#/components/schemas/VoicemailDetectionBackoffPlan" - } - ] - }, - "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" - ] - } - }, - "required": [ - "provider" - ] - }, - "TwilioVoicemailDetectionPlan": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "description": "This is the provider to use for voicemail detection.", - "enum": [ - "twilio" - ] - }, - "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": { - "type": "string", - "description": "This is the provider to use for voicemail detection.", - "enum": [ - "vapi" - ] - }, - "backoffPlan": { - "description": "This is the backoff plan for the voicemail detection.", - "allOf": [ - { - "$ref": "#/components/schemas/VoicemailDetectionBackoffPlan" - } - ] - }, - "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" - ] - } - }, - "required": [ - "provider" - ] - }, "SQLInjectionSecurityFilter": { "type": "object", "properties": { @@ -25901,6 +26525,27 @@ } } }, + "voicemailDetection": { + "description": "This is the voicemail detection plan for the workflow.", + "oneOf": [ + { + "$ref": "#/components/schemas/GoogleVoicemailDetectionPlan", + "title": "Google" + }, + { + "$ref": "#/components/schemas/OpenAIVoicemailDetectionPlan", + "title": "OpenAI" + }, + { + "$ref": "#/components/schemas/TwilioVoicemailDetectionPlan", + "title": "Twilio" + }, + { + "$ref": "#/components/schemas/VapiVoicemailDetectionPlan", + "title": "Vapi" + } + ] + }, "id": { "type": "string" }, @@ -26500,6 +27145,27 @@ } } }, + "voicemailDetection": { + "description": "This is the voicemail detection plan for the workflow.", + "oneOf": [ + { + "$ref": "#/components/schemas/GoogleVoicemailDetectionPlan", + "title": "Google" + }, + { + "$ref": "#/components/schemas/OpenAIVoicemailDetectionPlan", + "title": "OpenAI" + }, + { + "$ref": "#/components/schemas/TwilioVoicemailDetectionPlan", + "title": "Twilio" + }, + { + "$ref": "#/components/schemas/VapiVoicemailDetectionPlan", + "title": "Vapi" + } + ] + }, "name": { "type": "string", "maxLength": 80 @@ -27081,6 +27747,27 @@ } } }, + "voicemailDetection": { + "description": "This is the voicemail detection plan for the workflow.", + "oneOf": [ + { + "$ref": "#/components/schemas/GoogleVoicemailDetectionPlan", + "title": "Google" + }, + { + "$ref": "#/components/schemas/OpenAIVoicemailDetectionPlan", + "title": "OpenAI" + }, + { + "$ref": "#/components/schemas/TwilioVoicemailDetectionPlan", + "title": "Twilio" + }, + { + "$ref": "#/components/schemas/VapiVoicemailDetectionPlan", + "title": "Vapi" + } + ] + }, "name": { "type": "string", "maxLength": 80 @@ -28079,6 +28766,7 @@ "call.in-progress.error-providerfault-vapi-500-server-error", "call.in-progress.error-providerfault-vapi-503-server-overloaded-error", "pipeline-error-deepgram-transcriber-failed", + "pipeline-error-deepgram-transcriber-api-key-missing", "call.in-progress.error-vapifault-deepgram-transcriber-failed", "pipeline-error-gladia-transcriber-failed", "call.in-progress.error-vapifault-gladia-transcriber-failed", @@ -29333,6 +30021,18 @@ } ] }, + "squadId": { + "type": "string", + "description": "This is the squad that will be used for the chat. To use a transient squad, use `squad` instead." + }, + "squad": { + "description": "This is the squad that will be used for the chat. To use an existing squad, use `squadId` instead.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateSquadDTO" + } + ] + }, "name": { "type": "string", "description": "This is the name of the chat. This is just for your own reference.", @@ -29499,6 +30199,38 @@ "updatedAt" ] }, + "TwilioSMSChatTransport": { + "type": "object", + "properties": { + "phoneNumberId": { + "type": "string", + "description": "This is the phone number that will be used to send the SMS.\nIf provided, will create a new session. If not provided, uses existing session's phoneNumberId.\nThe phone number must have SMS enabled and belong to your organization." + }, + "customer": { + "description": "This is the customer who will receive the SMS.\nIf provided, will create a new session. If not provided, uses existing session's customer.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateCustomerDTO" + } + ] + }, + "useLLMGeneratedMessageForOutbound": { + "type": "boolean", + "description": "Whether to use LLM-generated messages for outbound SMS.\nWhen true (default), input is processed by the assistant for a response.\nWhen false, the input text is forwarded directly as the SMS message without LLM processing.\nUseful for sending pre-defined messages or notifications.", + "default": true + }, + "type": { + "type": "string", + "description": "The type of transport to use for sending the chat response.\nCurrently supports 'twilio.sms' for SMS delivery via Twilio.", + "enum": [ + "twilio.sms" + ] + } + }, + "required": [ + "type" + ] + }, "CreateChatDTO": { "type": "object", "properties": { @@ -29522,6 +30254,18 @@ } ] }, + "squadId": { + "type": "string", + "description": "This is the squad that will be used for the chat. To use a transient squad, use `squad` instead." + }, + "squad": { + "description": "This is the squad that will be used for the chat. To use an existing squad, use `squadId` instead.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateSquadDTO" + } + ] + }, "name": { "type": "string", "description": "This is the name of the chat. This is just for your own reference.", @@ -29585,6 +30329,14 @@ "previousChatId": { "type": "string", "description": "This is the ID of the chat that will be used as context for the new chat.\nThe messages from the previous chat will be used as context.\nMutually exclusive with sessionId." + }, + "transport": { + "description": "This is used to send the chat through a transport like SMS.\nIf transport.phoneNumberId and transport.customer are provided, creates a new session.\nIf sessionId is provided without transport fields, uses existing session data.\nCannot specify both sessionId and transport fields (phoneNumberId/customer) together.", + "allOf": [ + { + "$ref": "#/components/schemas/TwilioSMSChatTransport" + } + ] } }, "required": [ @@ -29598,6 +30350,10 @@ "type": "string", "description": "This is the unique identifier for the assistant that will be used for the chat." }, + "squadId": { + "type": "string", + "description": "This is the unique identifier for the squad that will be used for the chat." + }, "workflowId": { "type": "string", "description": "This is the unique identifier for the workflow that will be used for the chat." @@ -29735,166 +30491,186 @@ } ] }, - "name": { - "type": "string", - "description": "This is the name of the chat. This is just for your own reference.", - "maxLength": 40 - }, - "sessionId": { - "type": "string", - "description": "This is the ID of the session that will be used for the chat.\nMutually exclusive with previousChatId." - }, - "input": { - "description": "This is the input text for the chat.\nCan be a string or an array of chat messages.\nThis field is REQUIRED for chat creation.", - "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": [ - "Hello, how can you help me?", - [ - { - "role": "user", - "content": "Hello, how can you help me?" - } - ] - ] - }, - "stream": { - "type": "boolean", - "description": "Whether to stream the response or not.", - "default": true - }, - "previousChatId": { - "type": "string", - "description": "This is the ID of the chat that will be used as context for the new chat.\nThe messages from the previous chat will be used as context.\nMutually exclusive with sessionId." - } - }, - "required": [ - "input" - ] - }, - "ChatAssistantOverrides": { - "type": "object", - "properties": { - "variableValues": { - "type": "object", - "description": "Variable values for template substitution", - "example": { - "name": "John", - "company": "ACME Corp" - } - } - } - }, - "CreateWebCustomerDTO": { - "type": "object", - "properties": { - "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 - }, - "extension": { + "squadId": { "type": "string", - "description": "This is the extension that will be dialed after the call is answered.", - "maxLength": 10, - "example": null + "description": "This is the squad that will be used for the chat. To use a transient squad, use `squad` instead." }, - "assistantOverrides": { - "description": "These are the variable values that will be used to replace template variables in the assistant messages.\nOnly variable substitution is supported in web chat - other assistant properties cannot be overridden.", + "squad": { + "description": "This is the squad that will be used for the chat. To use an existing squad, use `squadId` instead.", "allOf": [ { - "$ref": "#/components/schemas/ChatAssistantOverrides" + "$ref": "#/components/schemas/CreateSquadDTO" } ] }, - "number": { - "type": "string", - "description": "This is the number of the customer.", - "minLength": 3, - "maxLength": 40 - }, - "sipUri": { - "type": "string", - "description": "This is the SIP URI of the customer." - }, "name": { "type": "string", - "description": "This is the name of the customer. This is just for your own reference.\n\nFor SIP inbound calls, this is extracted from the `From` SIP header with format `\"Display Name\" `.", - "maxLength": 40 - }, - "email": { - "type": "string", - "description": "This is the email of the customer.", - "maxLength": 40 - }, - "externalId": { - "type": "string", - "description": "This is the external ID of the customer.", + "description": "This is the name of the chat. This is just for your own reference.", "maxLength": 40 - } - } - }, - "CreateWebChatDTO": { - "type": "object", - "properties": { - "assistantId": { - "type": "string", - "description": "The assistant ID to use for this chat" }, "sessionId": { "type": "string", - "description": "This is the ID of the session that will be used for the chat.\nIf provided, the conversation will continue from the previous state.\nIf not provided or expired, a new session will be created." - }, - "assistantOverrides": { - "description": "These are the variable values that will be used to replace template variables in the assistant messages.\nOnly variable substitution is supported in web chat - other assistant properties cannot be overridden.", - "allOf": [ - { - "$ref": "#/components/schemas/ChatAssistantOverrides" - } - ] - }, - "customer": { - "description": "This is the customer information for the chat.\nUsed to automatically manage sessions for repeat customers.", - "allOf": [ - { - "$ref": "#/components/schemas/CreateWebCustomerDTO" - } - ] + "description": "This is the ID of the session that will be used for the chat.\nMutually exclusive with previousChatId." }, "input": { - "description": "This is the input text for the chat.\nCan be a string or an array of chat messages.", + "description": "This is the input text for the chat.\nCan be a string or an array of chat messages.\nThis field is REQUIRED for chat creation.", + "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": [ + "Hello, how can you help me?", + [ + { + "role": "user", + "content": "Hello, how can you help me?" + } + ] + ] + }, + "stream": { + "type": "boolean", + "description": "Whether to stream the response or not.", + "default": true + }, + "previousChatId": { + "type": "string", + "description": "This is the ID of the chat that will be used as context for the new chat.\nThe messages from the previous chat will be used as context.\nMutually exclusive with sessionId." + }, + "transport": { + "description": "This is used to send the chat through a transport like SMS.\nIf transport.phoneNumberId and transport.customer are provided, creates a new session.\nIf sessionId is provided without transport fields, uses existing session data.\nCannot specify both sessionId and transport fields (phoneNumberId/customer) together.", + "allOf": [ + { + "$ref": "#/components/schemas/TwilioSMSChatTransport" + } + ] + } + }, + "required": [ + "input" + ] + }, + "ChatAssistantOverrides": { + "type": "object", + "properties": { + "variableValues": { + "type": "object", + "description": "Variable values for template substitution", + "example": { + "name": "John", + "company": "ACME Corp" + } + } + } + }, + "CreateWebCustomerDTO": { + "type": "object", + "properties": { + "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 + }, + "extension": { + "type": "string", + "description": "This is the extension that will be dialed after the call is answered.", + "maxLength": 10, + "example": null + }, + "assistantOverrides": { + "description": "These are the variable values that will be used to replace template variables in the assistant messages.\nOnly variable substitution is supported in web chat - other assistant properties cannot be overridden.", + "allOf": [ + { + "$ref": "#/components/schemas/ChatAssistantOverrides" + } + ] + }, + "number": { + "type": "string", + "description": "This is the number of the customer.", + "minLength": 3, + "maxLength": 40 + }, + "sipUri": { + "type": "string", + "description": "This is the SIP URI of the customer." + }, + "name": { + "type": "string", + "description": "This is the name of the customer. This is just for your own reference.\n\nFor SIP inbound calls, this is extracted from the `From` SIP header with format `\"Display Name\" `.", + "maxLength": 40 + }, + "email": { + "type": "string", + "description": "This is the email of the customer.", + "maxLength": 40 + }, + "externalId": { + "type": "string", + "description": "This is the external ID of the customer.", + "maxLength": 40 + } + } + }, + "CreateWebChatDTO": { + "type": "object", + "properties": { + "assistantId": { + "type": "string", + "description": "The assistant ID to use for this chat" + }, + "sessionId": { + "type": "string", + "description": "This is the ID of the session that will be used for the chat.\nIf provided, the conversation will continue from the previous state.\nIf not provided or expired, a new session will be created." + }, + "assistantOverrides": { + "description": "These are the variable values that will be used to replace template variables in the assistant messages.\nOnly variable substitution is supported in web chat - other assistant properties cannot be overridden.", + "allOf": [ + { + "$ref": "#/components/schemas/ChatAssistantOverrides" + } + ] + }, + "customer": { + "description": "This is the customer information for the chat.\nUsed to automatically manage sessions for repeat customers.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateWebCustomerDTO" + } + ] + }, + "input": { + "description": "This is the input text for the chat.\nCan be a string or an array of chat messages.", "oneOf": [ { "type": "string", @@ -30606,6 +31382,18 @@ } ] }, + "squadId": { + "type": "string", + "description": "This is the squad ID associated with this session. Use this when referencing an existing squad." + }, + "squad": { + "description": "This is the squad configuration for this session. Use this when creating a new squad configuration.\nIf squadId is provided, this will be ignored.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateSquadDTO" + } + ] + }, "messages": { "type": "array", "description": "This is an array of chat messages in the session.", @@ -30697,6 +31485,18 @@ } ] }, + "squadId": { + "type": "string", + "description": "This is the squad ID associated with this session. Use this when referencing an existing squad." + }, + "squad": { + "description": "This is the squad configuration for this session. Use this when creating a new squad configuration.\nIf squadId is provided, this will be ignored.", + "allOf": [ + { + "$ref": "#/components/schemas/CreateSquadDTO" + } + ] + }, "messages": { "type": "array", "description": "This is an array of chat messages in the session.", @@ -30811,6 +31611,10 @@ "type": "string", "description": "This is the ID of the assistant to filter sessions by." }, + "squadId": { + "type": "string", + "description": "This is the ID of the squad to filter sessions by." + }, "workflowId": { "type": "string", "description": "This is the ID of the workflow to filter sessions by." @@ -37157,6 +37961,1330 @@ } } }, + "CreateEvalDTO": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "This is the mock conversation that will be used to evaluate the flow of the conversation.\nMock Messages are used to simulate the flow of the conversation\nEvaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls", + "example": "[{ role: \"user\", content: \"Hello, how are you?\" }, { role: \"assistant\", content: \"I am good, thank you!\" }]", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ChatEvalAssistantMessageMock", + "title": "ChatEvalAssistantMessageMock" + }, + { + "$ref": "#/components/schemas/ChatEvalSystemMessageMock", + "title": "ChatEvalSystemMessageMock" + }, + { + "$ref": "#/components/schemas/ChatEvalToolResponseMessageMock", + "title": "ChatEvalToolResponseMessageMock" + }, + { + "$ref": "#/components/schemas/ChatEvalUserMessageMock", + "title": "ChatEvalUserMessageMock" + }, + { + "$ref": "#/components/schemas/ChatEvalAssistantMessageEvaluation", + "title": "ChatEvalAssistantMessageEvaluation" + } + ] + } + }, + "name": { + "type": "string", + "description": "This is the name of the eval.\nIt helps identify what the eval is checking for.", + "example": "Verified User Flow Eval", + "minLength": 1, + "maxLength": 80 + }, + "description": { + "type": "string", + "description": "This is the description of the eval.\nThis helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation.", + "example": "This eval checks if the user flow is verified.", + "minLength": 1, + "maxLength": 500 + }, + "type": { + "type": "string", + "description": "This is the type of the eval.\nCurrently it is fixed to `chat.mockConversation`.", + "example": "chat.mockConversation", + "enum": [ + "chat.mockConversation" + ] + } + }, + "required": [ + "messages", + "type" + ] + }, + "Eval": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "This is the mock conversation that will be used to evaluate the flow of the conversation.\nMock Messages are used to simulate the flow of the conversation\nEvaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls", + "example": "[{ role: \"user\", content: \"Hello, how are you?\" }, { role: \"assistant\", content: \"I am good, thank you!\" }]", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ChatEvalAssistantMessageMock", + "title": "ChatEvalAssistantMessageMock" + }, + { + "$ref": "#/components/schemas/ChatEvalSystemMessageMock", + "title": "ChatEvalSystemMessageMock" + }, + { + "$ref": "#/components/schemas/ChatEvalToolResponseMessageMock", + "title": "ChatEvalToolResponseMessageMock" + }, + { + "$ref": "#/components/schemas/ChatEvalUserMessageMock", + "title": "ChatEvalUserMessageMock" + }, + { + "$ref": "#/components/schemas/ChatEvalAssistantMessageEvaluation", + "title": "ChatEvalAssistantMessageEvaluation" + } + ] + } + }, + "id": { + "type": "string" + }, + "orgId": { + "type": "string" + }, + "createdAt": { + "format": "date-time", + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "type": "string" + }, + "name": { + "type": "string", + "description": "This is the name of the eval.\nIt helps identify what the eval is checking for.", + "example": "Verified User Flow Eval", + "minLength": 1, + "maxLength": 80 + }, + "description": { + "type": "string", + "description": "This is the description of the eval.\nThis helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation.", + "example": "This eval checks if the user flow is verified.", + "minLength": 1, + "maxLength": 500 + }, + "type": { + "type": "string", + "description": "This is the type of the eval.\nCurrently it is fixed to `chat.mockConversation`.", + "example": "chat.mockConversation", + "enum": [ + "chat.mockConversation" + ] + } + }, + "required": [ + "messages", + "id", + "orgId", + "createdAt", + "updatedAt", + "type" + ] + }, + "EvalModelListOptions": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "This is the provider of the model.", + "enum": [ + "openai", + "anthropic", + "google", + "groq", + "custom-llm" + ] + } + }, + "required": [ + "provider" + ] + }, + "EvalUserEditable": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "This is the mock conversation that will be used to evaluate the flow of the conversation.\nMock Messages are used to simulate the flow of the conversation\nEvaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls", + "example": "[{ role: \"user\", content: \"Hello, how are you?\" }, { role: \"assistant\", content: \"I am good, thank you!\" }]", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ChatEvalAssistantMessageMock", + "title": "ChatEvalAssistantMessageMock" + }, + { + "$ref": "#/components/schemas/ChatEvalSystemMessageMock", + "title": "ChatEvalSystemMessageMock" + }, + { + "$ref": "#/components/schemas/ChatEvalToolResponseMessageMock", + "title": "ChatEvalToolResponseMessageMock" + }, + { + "$ref": "#/components/schemas/ChatEvalUserMessageMock", + "title": "ChatEvalUserMessageMock" + }, + { + "$ref": "#/components/schemas/ChatEvalAssistantMessageEvaluation", + "title": "ChatEvalAssistantMessageEvaluation" + } + ] + } + }, + "name": { + "type": "string", + "description": "This is the name of the eval.\nIt helps identify what the eval is checking for.", + "example": "Verified User Flow Eval", + "minLength": 1, + "maxLength": 80 + }, + "description": { + "type": "string", + "description": "This is the description of the eval.\nThis helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation.", + "example": "This eval checks if the user flow is verified.", + "minLength": 1, + "maxLength": 500 + }, + "type": { + "type": "string", + "description": "This is the type of the eval.\nCurrently it is fixed to `chat.mockConversation`.", + "example": "chat.mockConversation", + "enum": [ + "chat.mockConversation" + ] + } + }, + "required": [ + "messages", + "type" + ] + }, + "ChatEvalAssistantMessageMockToolCall": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "This is the name of the tool that will be called.\nIt should be one of the tools created in the organization.", + "example": "get_weather", + "maxLength": 100 + }, + "arguments": { + "type": "object", + "description": "This is the arguments that will be passed to the tool call.", + "example": "\"{\"city\": \"San Francisco\"}\"" + } + }, + "required": [ + "name" + ] + }, + "ChatEvalAssistantMessageMock": { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": [ + "assistant" + ], + "description": "This is the role of the message author.\nFor a mock assistant message, the role is always 'assistant'\n@default 'assistant'", + "default": "assistant" + }, + "content": { + "type": "string", + "description": "This is the content of the assistant message.\nThis is the message that the assistant would have sent.", + "example": "The weather in San Francisco is sunny.", + "maxLength": 1000 + }, + "toolCalls": { + "description": "This is the tool calls that will be made by the assistant.", + "example": "[{ name: \"get_weather\", arguments: { city: \"San Francisco\" } }]", + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatEvalAssistantMessageMockToolCall" + } + } + }, + "required": [ + "role" + ] + }, + "ChatEvalSystemMessageMock": { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": [ + "system" + ], + "description": "This is the role of the message author.\nFor a mock system message, the role is always 'system'\n@default 'system'", + "default": "system" + }, + "content": { + "type": "string", + "description": "This is the content of the system message that would have been added in the middle of the conversation.\nDo not include the assistant prompt as a part of this message. It will automatically be fetched during runtime.", + "example": "You are a helpful assistant.", + "maxLength": 1000 + } + }, + "required": [ + "role", + "content" + ] + }, + "ChatEvalToolResponseMessageMock": { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": [ + "tool" + ], + "description": "This is the role of the message author.\nFor a mock tool response message, the role is always 'tool'\n@default 'tool'", + "default": "tool" + }, + "content": { + "type": "string", + "description": "This is the content of the tool response message. JSON Objects should be stringified.", + "examples": [ + "The weather in San Francisco is sunny.", + "{weather: sunny}" + ], + "maxLength": 1000 + } + }, + "required": [ + "role", + "content" + ] + }, + "ChatEvalUserMessageMock": { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": [ + "user" + ], + "description": "This is the role of the message author.\nFor a mock user message, the role is always 'user'\n@default 'user'", + "default": "user" + }, + "content": { + "type": "string", + "description": "This is the content of the user message.\nThis is the message that the user would have sent.", + "example": "Hello, how are you?", + "maxLength": 1000 + } + }, + "required": [ + "role", + "content" + ] + }, + "AssistantMessageEvaluationContinuePlan": { + "type": "object", + "properties": { + "exitOnFailureEnabled": { + "type": "boolean", + "description": "This is whether the evaluation should exit if the assistant message evaluates to false.\nBy default, it is false and the evaluation will continue.\n@default false", + "default": false + }, + "contentOverride": { + "type": "string", + "description": "This is the content that will be used in the conversation for this assistant turn if provided.\nIt will override the content received from the model.", + "example": "The weather in San Francisco is sunny.", + "maxLength": 1000 + }, + "toolCallsOverride": { + "description": "This is the tool calls that will be used in the conversation for this assistant turn if provided.\nIt will override the tool calls received from the model.", + "example": "[{ name: \"get_weather\", arguments: { city: \"San Francisco\" } }]", + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatEvalAssistantMessageMockToolCall" + } + } + }, + "required": [ + "exitOnFailureEnabled" + ] + }, + "ChatEvalAssistantMessageEvaluation": { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": [ + "assistant" + ], + "description": "This is the role of the message author.\nFor an assistant message evaluation, the role is always 'assistant'\n@default 'assistant'", + "default": "assistant" + }, + "judgePlan": { + "description": "This is the judge plan that instructs how to evaluate the assistant message.\nThe assistant message can be evaluated against fixed content (exact match or RegEx) or with an LLM-as-judge by defining the evaluation criteria in a prompt.", + "oneOf": [ + { + "$ref": "#/components/schemas/AssistantMessageJudgePlanExact", + "title": "AssistantMessageJudgePlanExact" + }, + { + "$ref": "#/components/schemas/AssistantMessageJudgePlanRegex", + "title": "AssistantMessageJudgePlanRegex" + }, + { + "$ref": "#/components/schemas/AssistantMessageJudgePlanAI", + "title": "AssistantMessageJudgePlanAI" + } + ] + }, + "continuePlan": { + "description": "This is the plan for how the overall evaluation will proceed after the assistant message is evaluated.\nThis lets you configure whether to stop the evaluation if this message fails, and whether to override any content for future turns", + "allOf": [ + { + "$ref": "#/components/schemas/AssistantMessageEvaluationContinuePlan" + } + ] + } + }, + "required": [ + "role", + "judgePlan" + ] + }, + "AssistantMessageJudgePlanExact": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "exact" + ], + "description": "This is the type of the judge plan.\nUse 'exact' for an exact match on the content and tool calls - without using LLM-as-a-judge.\n@default 'exact'" + }, + "content": { + "type": "string", + "description": "This is what that will be used to evaluate the model's message content.\nIf you provide a string, the assistant message content will be evaluated against it as an exact match, case-insensitive.", + "example": "The weather in San Francisco is sunny.", + "maxLength": 1000 + }, + "toolCalls": { + "description": "This is the tool calls that will be used to evaluate the model's message content.\nThe tool name must be a valid tool that the assistant is allowed to call.\n\nFor the Query tool, the arguments for the tool call are in the format - {knowledgeBaseNames: ['kb_name', 'kb_name_2']}\n\nFor the DTMF tool, the arguments for the tool call are in the format - {dtmf: \"1234*\"}\n\nFor the Handoff tool, the arguments for the tool call are in the format - {destination: \"assistant_id\"}\n\nFor the Transfer Call tool, the arguments for the tool call are in the format - {destination: \"phone_number_or_assistant_id\"}\n\nFor all other tools, they are called without arguments or with user-defined arguments", + "example": "[{ name: \"get_weather\", arguments: { city: \"San Francisco\" } }]", + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatEvalAssistantMessageMockToolCall" + } + } + }, + "required": [ + "type", + "content" + ] + }, + "EvalOpenAIModel": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "This is the provider of the model (`openai`).", + "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, + "enum": [ + "gpt-5", + "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-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-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-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:australia", + "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" + ] + }, + "temperature": { + "type": "number", + "description": "This is the temperature of the model. For LLM-as-a-judge, it's recommended to set it between 0 - 0.3 to avoid hallucinations and ensure the model judges the output correctly based on the instructions.", + "minimum": 0, + "maximum": 2 + }, + "maxTokens": { + "type": "number", + "description": "This is the max tokens of the model.\nIf your Judge instructions return `true` or `false` takes only 1 token (as per the OpenAI Tokenizer), and therefore is recommended to set it to a low number to force the model to return a short response.", + "minimum": 50, + "maximum": 10000 + } + }, + "required": [ + "provider", + "model" + ] + }, + "EvalAnthropicModel": { + "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-sonnet-4-20250514" + ] + }, + "thinking": { + "description": "This is the optional configuration for Anthropic's thinking feature.\n\n- Only applicable for `claude-3-7-sonnet-20250219` model.\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. For LLM-as-a-judge, it's recommended to set it between 0 - 0.3 to avoid hallucinations and ensure the model judges the output correctly based on the instructions.", + "minimum": 0, + "maximum": 2 + }, + "maxTokens": { + "type": "number", + "description": "This is the max tokens of the model.\nIf your Judge instructions return `true` or `false` takes only 1 token (as per the OpenAI Tokenizer), and therefore is recommended to set it to a low number to force the model to return a short response.", + "minimum": 50, + "maximum": 10000 + } + }, + "required": [ + "provider", + "model" + ] + }, + "EvalGoogleModel": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "This is the provider of the model (`google`).", + "enum": [ + "google" + ] + }, + "model": { + "type": "string", + "description": "This is the name of the model. Ex. gpt-4o", + "maxLength": 100, + "enum": [ + "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" + ] + }, + "temperature": { + "type": "number", + "description": "This is the temperature of the model. For LLM-as-a-judge, it's recommended to set it between 0 - 0.3 to avoid hallucinations and ensure the model judges the output correctly based on the instructions.", + "minimum": 0, + "maximum": 2 + }, + "maxTokens": { + "type": "number", + "description": "This is the max tokens of the model.\nIf your Judge instructions return `true` or `false` takes only 1 token (as per the OpenAI Tokenizer), and therefore is recommended to set it to a low number to force the model to return a short response.", + "minimum": 50, + "maximum": 10000 + } + }, + "required": [ + "provider", + "model" + ] + }, + "EvalGroqModel": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "This is the provider of the model (`groq`).", + "enum": [ + "groq" + ] + }, + "model": { + "type": "string", + "description": "This is the name of the model. Ex. gpt-4o", + "maxLength": 100, + "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" + ] + }, + "temperature": { + "type": "number", + "description": "This is the temperature of the model. For LLM-as-a-judge, it's recommended to set it between 0 - 0.3 to avoid hallucinations and ensure the model judges the output correctly based on the instructions.", + "minimum": 0, + "maximum": 2 + }, + "maxTokens": { + "type": "number", + "description": "This is the max tokens of the model.\nIf your Judge instructions return `true` or `false` takes only 1 token (as per the OpenAI Tokenizer), and therefore is recommended to set it to a low number to force the model to return a short response.", + "minimum": 50, + "maximum": 10000 + } + }, + "required": [ + "provider", + "model" + ] + }, + "EvalCustomModel": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "This is the provider of the model (`custom-llm`).", + "enum": [ + "custom-llm" + ] + }, + "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. gpt-4o", + "maxLength": 100 + }, + "temperature": { + "type": "number", + "description": "This is the temperature of the model. For LLM-as-a-judge, it's recommended to set it between 0 - 0.3 to avoid hallucinations and ensure the model judges the output correctly based on the instructions.", + "minimum": 0, + "maximum": 2 + }, + "maxTokens": { + "type": "number", + "description": "This is the max tokens of the model.\nIf your Judge instructions return `true` or `false` takes only 1 token (as per the OpenAI Tokenizer), and therefore is recommended to set it to a low number to force the model to return a short response.", + "minimum": 50, + "maximum": 10000 + } + }, + "required": [ + "provider", + "url", + "model" + ] + }, + "AssistantMessageJudgePlanAI": { + "type": "object", + "properties": { + "model": { + "description": "This is the model to use for the LLM-as-a-judge.\nIf not provided, will default to the assistant's model.\n\nThe instructions on how to evaluate the model output with this LLM-Judge must be passed as a system message in the messages array of the model.\n\nThe Mock conversation can be passed to the LLM-Judge to evaluate using the prompt {{messages}} and will be evaluated as a LiquidJS Variable. To access and judge only the last message, use {{messages[-1]}}\n\nThe LLM-Judge must respond with \"pass\" or \"fail\" and only those two responses are allowed.", + "example": "{", + "oneOf": [ + { + "$ref": "#/components/schemas/EvalOpenAIModel", + "title": "EvalOpenAIModel" + }, + { + "$ref": "#/components/schemas/EvalAnthropicModel", + "title": "EvalAnthropicModel" + }, + { + "$ref": "#/components/schemas/EvalGoogleModel", + "title": "EvalGoogleModel" + }, + { + "$ref": "#/components/schemas/EvalCustomModel", + "title": "EvalCustomModel" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "ai" + ], + "description": "This is the type of the judge plan.\nUse 'ai' to evaluate the assistant message content using LLM-as-a-judge.\n@default 'ai'" + } + }, + "required": [ + "model", + "type" + ] + }, + "AssistantMessageJudgePlanRegex": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "regex" + ], + "description": "This is the type of the judge plan.\nUse 'regex' for a regex match on the content and tool calls - without using LLM-as-a-judge.\n@default 'regex'" + }, + "content": { + "type": "string", + "description": "This is what that will be used to evaluate the model's message content.\nThe content will be evaluated against the regex pattern provided in the Judge Plan content field.\nEvaluation is considered successful if the regex pattern matches any part of the assistant message content.", + "example": "/sunny/i", + "maxLength": 1000 + }, + "toolCalls": { + "description": "This is the tool calls that will be used to evaluate the model's message content.\nThe tool name must be a valid tool that the assistant is allowed to call.\nThe values to the arguments for the tool call should be a Regular Expression.\nEvaluation is considered successful if the regex pattern matches any part of each tool call argument.\n\nFor the Query tool, the arguments for the tool call are in the format - {knowledgeBaseNames: ['kb_name', 'kb_name_2']}\n\nFor the DTMF tool, the arguments for the tool call are in the format - {dtmf: \"1234*\"}\n\nFor the Handoff tool, the arguments for the tool call are in the format - {destination: \"assistant_id\"}\n\nFor the Transfer Call tool, the arguments for the tool call are in the format - {destination: \"phone_number_or_assistant_id\"}\n\nFor all other tools, they are called without arguments or with user-defined arguments", + "example": "[{ name: \"get_weather\", arguments: { city: \"/San Francisco/i\" } }]", + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatEvalAssistantMessageMockToolCall" + } + } + }, + "required": [ + "type", + "content" + ] + }, + "GetEvalPaginatedDTO": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "page": { + "type": "number", + "description": "This is the page number to return. Defaults to 1.", + "minimum": 1 + }, + "sortOrder": { + "type": "string", + "description": "This is the sort order for pagination. Defaults to 'DESC'.", + "enum": [ + "ASC", + "DESC" + ] + }, + "limit": { + "type": "number", + "description": "This is the maximum number of items to return. Defaults to 100.", + "minimum": 0, + "maximum": 1000 + }, + "createdAtGt": { + "format": "date-time", + "type": "string", + "description": "This will return items where the createdAt is greater than the specified value." + }, + "createdAtLt": { + "format": "date-time", + "type": "string", + "description": "This will return items where the createdAt is less than the specified value." + }, + "createdAtGe": { + "format": "date-time", + "type": "string", + "description": "This will return items where the createdAt is greater than or equal to the specified value." + }, + "createdAtLe": { + "format": "date-time", + "type": "string", + "description": "This will return items where the createdAt is less than or equal to the specified value." + }, + "updatedAtGt": { + "format": "date-time", + "type": "string", + "description": "This will return items where the updatedAt is greater than the specified value." + }, + "updatedAtLt": { + "format": "date-time", + "type": "string", + "description": "This will return items where the updatedAt is less than the specified value." + }, + "updatedAtGe": { + "format": "date-time", + "type": "string", + "description": "This will return items where the updatedAt is greater than or equal to the specified value." + }, + "updatedAtLe": { + "format": "date-time", + "type": "string", + "description": "This will return items where the updatedAt is less than or equal to the specified value." + } + } + }, + "EvalPaginatedResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Eval" + } + }, + "metadata": { + "$ref": "#/components/schemas/PaginationMeta" + } + }, + "required": [ + "results", + "metadata" + ] + }, + "UpdateEvalDTO": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "This is the mock conversation that will be used to evaluate the flow of the conversation.\nMock Messages are used to simulate the flow of the conversation\nEvaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls", + "example": "[{ role: \"user\", content: \"Hello, how are you?\" }, { role: \"assistant\", content: \"I am good, thank you!\" }]", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ChatEvalAssistantMessageMock", + "title": "ChatEvalAssistantMessageMock" + }, + { + "$ref": "#/components/schemas/ChatEvalSystemMessageMock", + "title": "ChatEvalSystemMessageMock" + }, + { + "$ref": "#/components/schemas/ChatEvalToolResponseMessageMock", + "title": "ChatEvalToolResponseMessageMock" + }, + { + "$ref": "#/components/schemas/ChatEvalUserMessageMock", + "title": "ChatEvalUserMessageMock" + }, + { + "$ref": "#/components/schemas/ChatEvalAssistantMessageEvaluation", + "title": "ChatEvalAssistantMessageEvaluation" + } + ] + } + }, + "name": { + "type": "string", + "description": "This is the name of the eval.\nIt helps identify what the eval is checking for.", + "example": "Verified User Flow Eval", + "minLength": 1, + "maxLength": 80 + }, + "description": { + "type": "string", + "description": "This is the description of the eval.\nThis helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation.", + "example": "This eval checks if the user flow is verified.", + "minLength": 1, + "maxLength": 500 + }, + "type": { + "type": "string", + "description": "This is the type of the eval.\nCurrently it is fixed to `chat.mockConversation`.", + "example": "chat.mockConversation", + "enum": [ + "chat.mockConversation" + ] + } + } + }, + "EvalRunTargetAssistant": { + "type": "object", + "properties": { + "assistant": { + "description": "This is the transient assistant that will be run against the eval", + "oneOf": [ + { + "$ref": "#/components/schemas/CreateAssistantDTO", + "title": "CreateAssistantDTO" + } + ], + "allOf": [ + { + "$ref": "#/components/schemas/CreateAssistantDTO" + } + ] + }, + "assistantOverrides": { + "description": "This is the overrides that will be applied to the assistant.", + "example": "{", + "oneOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides", + "title": "AssistantOverrides" + } + ], + "allOf": [ + { + "$ref": "#/components/schemas/AssistantOverrides" + } + ] + }, + "type": { + "type": "string", + "description": "This is the type of the target.\nCurrently it is fixed to `assistant`.", + "example": "assistant", + "enum": [ + "assistant" + ] + }, + "assistantId": { + "type": "string", + "description": "This is the id of the assistant that will be run against the eval", + "example": "123e4567-e89b-12d3-a456-426614174000" + } + }, + "required": [ + "type" + ] + }, + "CreateEvalRunDTO": { + "type": "object", + "properties": { + "eval": { + "description": "This is the transient eval that will be run", + "oneOf": [ + { + "$ref": "#/components/schemas/CreateEvalDTO", + "title": "CreateEvalDTO" + } + ], + "allOf": [ + { + "$ref": "#/components/schemas/Eval" + } + ] + }, + "target": { + "description": "This is the target that will be run against the eval", + "oneOf": [ + { + "$ref": "#/components/schemas/EvalRunTargetAssistant", + "title": "EvalRunTargetAssistant" + } + ], + "allOf": [ + { + "$ref": "#/components/schemas/EvalRunTargetAssistant" + } + ] + }, + "type": { + "type": "string", + "description": "This is the type of the run.\nCurrently it is fixed to `eval`.", + "example": "eval", + "enum": [ + "eval" + ] + }, + "evalId": { + "type": "string", + "description": "This is the id of the eval that will be run.", + "example": "123e4567-e89b-12d3-a456-426614174000" + } + }, + "required": [ + "target", + "type" + ] + }, + "EvalRunResult": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "This is the status of the eval run result.\nThe status is only 'pass' or 'fail' for an eval run result.\nCurrently, An eval is considered `pass` only if all the Assistant Judge messages are evaluated to pass.", + "example": "pass", + "enum": [ + "pass", + "fail" + ] + }, + "messages": { + "type": "array", + "description": "This is the messages of the eval run result.\nIt contains the user/system messages", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ChatEvalUserMessageMock", + "title": "ChatEvalUserMessageMock" + }, + { + "$ref": "#/components/schemas/ChatEvalSystemMessageMock", + "title": "ChatEvalSystemMessageMock" + }, + { + "$ref": "#/components/schemas/ChatEvalToolResponseMessageMock", + "title": "ChatEvalToolResponseMessageMock" + }, + { + "$ref": "#/components/schemas/ChatEvalAssistantMessageMock", + "title": "ChatEvalAssistantMessageMock" + } + ] + } + }, + "startedAt": { + "format": "date-time", + "type": "string", + "description": "This is the start time of the eval run result.", + "example": "2021-01-01T00:00:00.000Z" + }, + "endedAt": { + "format": "date-time", + "type": "string", + "description": "This is the end time of the eval run result.", + "example": "2021-01-01T00:00:00.000Z" + } + }, + "required": [ + "status", + "messages", + "startedAt", + "endedAt" + ] + }, + "EvalRun": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "This is the status of the eval run. When an eval run is created, the status is 'running'.\nWhen the eval run is completed, the status is 'ended'.", + "example": "running", + "enum": [ + "running", + "ended", + "queued" + ] + }, + "endedReason": { + "type": "string", + "description": "This is the reason for the eval run to end.\nWhen the eval run is completed normally i.e end of mock conversation, the status is 'mockConversation.done'.\nWhen the eval fails due to an error like Chat error or incorrect configuration, the status is 'error'.\nWhen the eval runs for too long, due to model issues or tool call issues, the status is 'timeout'.\nWhen the eval run is cancelled by the user, the status is 'cancelled'.\nWhen the eval run is cancelled by Vapi for any reason, the status is 'aborted'.", + "example": "mockConversation.done", + "enum": [ + "mockConversation.done", + "error", + "timeout", + "cancelled", + "aborted" + ] + }, + "eval": { + "description": "This is the transient eval that will be run", + "oneOf": [ + { + "$ref": "#/components/schemas/CreateEvalDTO", + "title": "CreateEvalDTO" + } + ], + "allOf": [ + { + "$ref": "#/components/schemas/Eval" + } + ] + }, + "target": { + "description": "This is the target that will be run against the eval", + "oneOf": [ + { + "$ref": "#/components/schemas/EvalRunTargetAssistant", + "title": "EvalRunTargetAssistant" + } + ], + "allOf": [ + { + "$ref": "#/components/schemas/EvalRunTargetAssistant" + } + ] + }, + "id": { + "type": "string" + }, + "orgId": { + "type": "string" + }, + "createdAt": { + "format": "date-time", + "type": "string" + }, + "startedAt": { + "format": "date-time", + "type": "string" + }, + "endedAt": { + "format": "date-time", + "type": "string" + }, + "endedMessage": { + "type": "string", + "description": "This is the ended message when the eval run ended for any reason apart from mockConversation.done", + "example": "The Assistant returned an error" + }, + "results": { + "description": "This is the results of the eval or suite run.\nThe array will have a single item for an eval run, and multiple items each corresponding to the an eval in a suite run in the same order as the evals in the suite.", + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalRunResult" + } + }, + "type": { + "type": "string", + "description": "This is the type of the run.\nCurrently it is fixed to `eval`.", + "example": "eval", + "enum": [ + "eval" + ] + }, + "evalId": { + "type": "string", + "description": "This is the id of the eval that will be run.", + "example": "123e4567-e89b-12d3-a456-426614174000" + } + }, + "required": [ + "status", + "endedReason", + "target", + "id", + "orgId", + "createdAt", + "startedAt", + "endedAt", + "results", + "type" + ] + }, + "EvalRunPaginatedResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalRun" + } + }, + "metadata": { + "$ref": "#/components/schemas/PaginationMeta" + } + }, + "required": [ + "results", + "metadata" + ] + }, + "GetEvalRunPaginatedDTO": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "page": { + "type": "number", + "description": "This is the page number to return. Defaults to 1.", + "minimum": 1 + }, + "sortOrder": { + "type": "string", + "description": "This is the sort order for pagination. Defaults to 'DESC'.", + "enum": [ + "ASC", + "DESC" + ] + }, + "limit": { + "type": "number", + "description": "This is the maximum number of items to return. Defaults to 100.", + "minimum": 0, + "maximum": 1000 + }, + "createdAtGt": { + "format": "date-time", + "type": "string", + "description": "This will return items where the createdAt is greater than the specified value." + }, + "createdAtLt": { + "format": "date-time", + "type": "string", + "description": "This will return items where the createdAt is less than the specified value." + }, + "createdAtGe": { + "format": "date-time", + "type": "string", + "description": "This will return items where the createdAt is greater than or equal to the specified value." + }, + "createdAtLe": { + "format": "date-time", + "type": "string", + "description": "This will return items where the createdAt is less than or equal to the specified value." + }, + "updatedAtGt": { + "format": "date-time", + "type": "string", + "description": "This will return items where the updatedAt is greater than the specified value." + }, + "updatedAtLt": { + "format": "date-time", + "type": "string", + "description": "This will return items where the updatedAt is less than the specified value." + }, + "updatedAtGe": { + "format": "date-time", + "type": "string", + "description": "This will return items where the updatedAt is greater than or equal to the specified value." + }, + "updatedAtLe": { + "format": "date-time", + "type": "string", + "description": "This will return items where the updatedAt is less than or equal to the specified value." + } + } + }, "CreateOrgDTO": { "type": "object", "properties": { @@ -45450,6 +47578,7 @@ "call.in-progress.error-providerfault-vapi-500-server-error", "call.in-progress.error-providerfault-vapi-503-server-overloaded-error", "pipeline-error-deepgram-transcriber-failed", + "pipeline-error-deepgram-transcriber-api-key-missing", "call.in-progress.error-vapifault-deepgram-transcriber-failed", "pipeline-error-gladia-transcriber-failed", "call.in-progress.error-vapifault-gladia-transcriber-failed", @@ -46644,6 +48773,7 @@ "call.in-progress.error-providerfault-vapi-500-server-error", "call.in-progress.error-providerfault-vapi-503-server-overloaded-error", "pipeline-error-deepgram-transcriber-failed", + "pipeline-error-deepgram-transcriber-api-key-missing", "call.in-progress.error-vapifault-deepgram-transcriber-failed", "pipeline-error-gladia-transcriber-failed", "call.in-progress.error-vapifault-gladia-transcriber-failed",