- Quickstart
- API Reference
- Dashboard
- Community
- GitHub
- GETList Assistants
- GETGet Assistant
- POSTCreate Assistant
- PATCHUpdate Assistant
- DELDelete Assistant
- GETList Phone Numbers
- GETGet Phone Number
- POSTBuy Phone Number
- POSTImport Twilio Number
- POSTImport Vonage Number
- PATCHUpdate Phone Number
- DELDelete Phone Number
- GETList Credentials
- GETGet Credential
- POSTCreate Credential
- PUTUpdate Credential
- DELDelete Credential
- GETList Metrics
Assistants
Phone Numbers
Credentials
Metrics
List Calls
Retrieve your key from Dashboard.
This will return calls with the specified assistantId.
This is the maximum number of items to return. Defaults to 100.
This will return items where the createdAt is greater than the specified value.
This will return items where the createdAt is less than the specified value.
This will return items where the createdAt is greater than or equal to the specified value.
This will return items where the createdAt is less than or equal to the specified value.
This will return items where the updatedAt is greater than the specified value.
This will return items where the updatedAt is less than the specified value.
This will return items where the updatedAt is greater than or equal to the specified value.
This will return items where the updatedAt is less than or equal to the specified value.
curl --request GET \
--url https://api.vapi.ai/call \
--header 'Authorization: Bearer <token>'
[
{
"type": "inboundPhoneCall",
"phoneCallProvider": "twilio",
"phoneCallTransport": "sip",
"status": "queued",
"endedReason": "assistant-error",
"maxDurationSeconds": 1800,
"id": "<string>",
"orgId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"cost": 123,
"costBreakdown": {
"transport": 123,
"stt": 123,
"llm": 123,
"tts": 123,
"vapi": 123,
"total": 123,
"llmPromptTokens": 123,
"llmCompletionTokens": 123,
"ttsCharacters": 123
},
"transcript": "<string>",
"recordingUrl": "<string>",
"stereoRecordingUrl": "<string>",
"summary": "<string>",
"messages": [
{}
],
"phoneCallProviderId": "<string>",
"phoneCallProviderBypassEnabled": true,
"phoneCallProviderDetails": {
"statusCallbackEvent": "initiated",
"machineDetection": "Enable",
"to": "<string>",
"from": "<string>",
"twiml": "<string>",
"statusCallback": "<string>",
"asyncAmd": "<string>",
"asyncAmdStatusCallback": "<string>",
"record": true
},
"webCallUrl": "<string>",
"webCallSipUri": "<string>",
"forwardedPhoneNumber": "<string>",
"assistantId": "<string>",
"assistantOverrides": {
"transcriber": {
"provider": "deepgram",
"model": "nova-2",
"language": "cs",
"smartFormat": true,
"keywords": [
"<string>"
]
},
"model": {
"messages": [
{
"content": "<string>",
"role": "assistant",
"function_call": {},
"tool_calls": [
{}
]
}
],
"tools": [
{
"type": "transferCall",
"messages": [
{
"type": "request-start",
"content": "<string>",
"conditions": [
{
"param": "<string>",
"value": {},
"operator": "eq"
}
]
}
],
"destinations": [
{}
],
"server": {
"url": "<string>",
"secret": "<string>"
},
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {
"type": "object",
"properties": {},
"required": [
"<string>"
]
}
}
}
],
"provider": "openai",
"model": "gpt-4o",
"fallbackModels": [
"gpt-4-0125-preview",
"gpt-4-0613"
],
"semanticCachingEnabled": true,
"numFastTurns": 1,
"temperature": 1,
"knowledgeBase": {
"topK": 123,
"fileIds": [
"<string>"
],
"provider": "canonical"
},
"maxTokens": 525,
"emotionRecognitionEnabled": true
},
"voice": {
"inputMinCharacters": 10,
"inputPunctuationBoundaries": [
"。",
",",
".",
"!",
"?",
";",
")",
"،",
"۔",
"।",
"॥",
"|",
"||",
",",
":"
],
"fillerInjectionEnabled": true,
"provider": "azure",
"voiceId": "andrew",
"speed": 1.25
},
"forwardingPhoneNumber": "<string>",
"firstMessageMode": "assistant-speaks-first",
"voicemailDetectionTypes": [
"machine_end_beep",
"machine_end_silence",
"machine_end_other"
],
"recordingEnabled": true,
"endCallFunctionEnabled": true,
"dialKeypadFunctionEnabled": true,
"hipaaEnabled": true,
"clientMessages": [
"transcript",
"hang",
"tool-calls",
"speech-update",
"metadata",
"conversation-update"
],
"serverMessages": [
"end-of-call-report",
"status-update",
"hang",
"tool-calls"
],
"silenceTimeoutSeconds": 30,
"responseDelaySeconds": 0.4,
"llmRequestDelaySeconds": 0.1,
"numWordsToInterruptAssistant": 1,
"maxDurationSeconds": 1800,
"backgroundSound": "office",
"backchannelingEnabled": true,
"variableValues": {},
"name": "<string>",
"firstMessage": "<string>",
"voicemailDetectionEnabled": true,
"voicemailMessage": "<string>",
"endCallMessage": "<string>",
"endCallPhrases": [
"<string>"
],
"metadata": {},
"serverUrl": "<string>",
"serverUrlSecret": "<string>",
"summaryPrompt": "<string>"
},
"assistant": {
"transcriber": {
"provider": "deepgram",
"model": "nova-2",
"language": "cs",
"smartFormat": true,
"keywords": [
"<string>"
]
},
"model": {
"messages": [
{
"content": "<string>",
"role": "assistant",
"function_call": {},
"tool_calls": [
{}
]
}
],
"tools": [
{
"type": "transferCall",
"messages": [
{
"type": "request-start",
"content": "<string>",
"conditions": [
{
"param": "<string>",
"value": {},
"operator": "eq"
}
]
}
],
"destinations": [
{}
],
"server": {
"url": "<string>",
"secret": "<string>"
},
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {
"type": "object",
"properties": {},
"required": [
"<string>"
]
}
}
}
],
"provider": "openai",
"model": "gpt-4o",
"fallbackModels": [
"gpt-4-0125-preview",
"gpt-4-0613"
],
"semanticCachingEnabled": true,
"numFastTurns": 1,
"temperature": 1,
"knowledgeBase": {
"topK": 123,
"fileIds": [
"<string>"
],
"provider": "canonical"
},
"maxTokens": 525,
"emotionRecognitionEnabled": true
},
"voice": {
"inputMinCharacters": 10,
"inputPunctuationBoundaries": [
"。",
",",
".",
"!",
"?",
";",
")",
"،",
"۔",
"।",
"॥",
"|",
"||",
",",
":"
],
"fillerInjectionEnabled": true,
"provider": "azure",
"voiceId": "andrew",
"speed": 1.25
},
"forwardingPhoneNumber": "<string>",
"firstMessageMode": "assistant-speaks-first",
"voicemailDetectionTypes": [
"machine_end_beep",
"machine_end_silence",
"machine_end_other"
],
"recordingEnabled": true,
"endCallFunctionEnabled": true,
"dialKeypadFunctionEnabled": true,
"hipaaEnabled": true,
"clientMessages": [
"transcript",
"hang",
"tool-calls",
"speech-update",
"metadata",
"conversation-update"
],
"serverMessages": [
"end-of-call-report",
"status-update",
"hang",
"tool-calls"
],
"silenceTimeoutSeconds": 30,
"responseDelaySeconds": 0.4,
"llmRequestDelaySeconds": 0.1,
"numWordsToInterruptAssistant": 1,
"maxDurationSeconds": 1800,
"backgroundSound": "office",
"backchannelingEnabled": true,
"name": "<string>",
"firstMessage": "<string>",
"voicemailDetectionEnabled": true,
"voicemailMessage": "<string>",
"endCallMessage": "<string>",
"endCallPhrases": [
"<string>"
],
"metadata": {},
"serverUrl": "<string>",
"serverUrlSecret": "<string>",
"summaryPrompt": "<string>"
},
"customerId": "<string>",
"customer": {
"number": "<string>",
"name": "<string>",
"extension": "<string>"
},
"phoneNumberId": "<string>",
"phoneNumber": {
"twilioPhoneNumber": "<string>",
"twilioAccountSid": "<string>",
"twilioAuthToken": "<string>",
"name": "<string>",
"assistantId": "<string>",
"serverUrl": "<string>",
"serverUrlSecret": "<string>"
},
"metadata": {}
}
]
Authorizations
Retrieve your key from Dashboard.
Query Parameters
This will return calls with the specified assistantId.
This is the maximum number of items to return. Defaults to 100.
This will return items where the createdAt is greater than the specified value.
This will return items where the createdAt is less than the specified value.
This will return items where the createdAt is greater than or equal to the specified value.
This will return items where the createdAt is less than or equal to the specified value.
This will return items where the updatedAt is greater than the specified value.
This will return items where the updatedAt is less than the specified value.
This will return items where the updatedAt is greater than or equal to the specified value.
This will return items where the updatedAt is less than or equal to the specified value.
Response
This is the type of call.
inboundPhoneCall
, outboundPhoneCall
, webCall
This is the provider of the call.
Only relevant for outboundPhoneCall
and inboundPhoneCall
type.
twilio
, vonage
This is the transport of the phone call.
Only relevant for outboundPhoneCall
and inboundPhoneCall
type.
sip
, pstn
This is the status of the call.
queued
, ringing
, in-progress
, forwarding
, ended
This is the explanation for how the call ended.
assistant-error
, assistant-not-found
, db-error
, no-server-available
, pipeline-error-extra-function-failed
, pipeline-error-first-message-failed
, pipeline-error-function-filler-failed
, pipeline-error-function-failed
, pipeline-error-openai-llm-failed
, pipeline-error-azure-openai-llm-failed
, pipeline-error-together-ai-llm-failed
, pipeline-error-anyscale-llm-failed
, pipeline-error-openrouter-llm-failed
, pipeline-error-perplexity-ai-llm-failed
, pipeline-error-deepinfra-llm-failed
, pipeline-error-runpod-llm-failed
, pipeline-error-groq-llm-failed
, pipeline-error-anthropic-llm-failed
, pipeline-error-openai-voice-failed
, pipeline-error-deepgram-transcriber-failed
, pipeline-error-deepgram-voice-failed
, pipeline-error-eleven-labs-voice-failed
, pipeline-error-playht-voice-failed
, pipeline-error-lmnt-voice-failed
, pipeline-error-azure-voice-failed
, pipeline-error-rime-ai-voice-failed
, pipeline-error-neets-voice-failed
, pipeline-no-available-llm-model
, server-shutdown
, twilio-failed-to-connect-call
, unknown-error
, vonage-disconnected
, vonage-failed-to-connect-call
, phone-call-provider-bypass-enabled-but-no-call-received
, vapi-error-phone-call-worker-setup-socket-error
, vapi-error-phone-call-worker-worker-setup-socket-timeout
, vapi-error-phone-call-worker-could-not-find-call
, vapi-error-phone-call-worker-call-never-connected
, vapi-error-web-call-worker-setup-failed
, assistant-not-invalid
, assistant-not-provided
, assistant-request-returned-error
, assistant-request-returned-invalid-assistant
, assistant-request-returned-no-assistant
, assistant-request-returned-forwarding-phone-number
, assistant-ended-call
, assistant-said-end-call-phrase
, assistant-forwarded-call
, assistant-join-timed-out
, customer-busy
, customer-ended-call
, customer-did-not-answer
, customer-did-not-give-microphone-permission
, exceeded-max-duration
, manually-canceled
, phone-call-provider-closed-websocket
, pipeline-error-custom-llm-llm-failed
, pipeline-error-eleven-labs-voice-not-found
, pipeline-error-eleven-labs-quota-exceeded
, pipeline-error-eleven-labs-blocked-free-plan
, pipeline-error-eleven-labs-blocked-concurrent-requests
, pipeline-error-eleven-labs-unauthorized-access
, silence-timed-out
, voicemail
, vonage-rejected
This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.
This is the unique identifier for the call.
This is the unique identifier for the org that this call belongs to.
This is the ISO 8601 date-time string of when the call was created.
This is the ISO 8601 date-time string of when the call was last updated.
This is the ISO 8601 date-time string of when the call was started.
This is the ISO 8601 date-time string of when the call was ended.
This is the cost of the call in USD.
This is the cost of the call in USD.
This is the cost of the transport provider, like Twilio or Vonage.
This is the cost of the speech-to-text service.
This is the cost of the language model.
This is the cost of the text-to-speech service.
This is the cost of Vapi.
This is the total cost of the call.
This is the LLM prompt tokens used for the call.
This is the LLM completion tokens used for the call.
This is the TTS characters used for the call.
This is the transcript of the call.
This is the URL of the recording of the call.
This is the URL of the recording of the call in two channels.
This is the summary of the call.
These are the messages that were spoken during the call.
The ID of the call as provided by the phone number service. callSid in Twilio. conversationUuid in Vonage.
Only relevant for outboundPhoneCall
and inboundPhoneCall
type.
If enabled, prevents Vapi from initiating calls directly. Defaults to disabled.
Suitable for external call handling, such as with Twilio Studio Flow, with integration details provided in phoneCallProviderDetails
.
Only relevant for outboundPhoneCall
and inboundPhoneCall
types.
This is the phone call provider details to bridge the assistant into the external call. Only filled if phoneCallProviderBypassEnabled
is true.
Only relevant for outboundPhoneCall
and inboundPhoneCall
types.
initiated
, ringing
, answered
, completed
Enable
, DetectMessageEnd
This is the SIP URI of the call that the assistant will join.
Only relevant for webCall
type.
This is the phone number that the call was forwarded to.
This is the assistant that will be used for the call. To use a transient assistant, use assistant
instead.
Overrides for the assistant's settings and template variables.
These are the options for the assistant's transcriber.
This is the transcription provider that will be used.
deepgram
This is the Deepgram model that will be used. A list of models can be found here: https://developers.deepgram.com/docs/models-languages-overview
nova-2
, nova-2-general
, nova-2-meeting
, nova-2-phonecall
, nova-2-finance
, nova-2-conversationalai
, nova-2-voicemail
, nova-2-video
, nova-2-medical
, nova-2-drivethru
, nova-2-automotive
, nova
, nova-general
, nova-phonecall
, nova-medical
, enhanced
, enhanced-general
, enhanced-meeting
, enhanced-phonecall
, enhanced-finance
, base
, base-general
, base-meeting
, base-phonecall
, base-finance
, base-conversationalai
, base-voicemail
, base-video
This is the language that will be set for the transcription. The list of languages Deepgram supports can be found here: https://developers.deepgram.com/docs/models-languages-overview
cs
, da
, da-DK
, de-CH
, nl
, en
, en-US
, en-AU
, en-GB
, en-NZ
, en-IN
, nl-BE
, fr
, fr-CA
, de
, el
, hi
, hi-Latn
, id
, it
, ja
, ko
, ko-KR
, no
, pl
, pt
, pt-BR
, ru
, es
, es-419
, sv
, sv-SE
, tr
, uk
, ja
, zh
, zh-CN
, zh-TW
This will be use smart format option provided by Deepgram. It's default disabled because it can sometimes format numbers as times sometimes but it's getting better.
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.
These are the options for the assistant's LLM.
This is the starting state for the conversation.
assistant
, function
, user
, system
These are the tools functions that the assistant can execute during the call.
transferCall
request-start
eq
, neq
, gt
, gte
, lt
, lte
These are the destinations that the call can be transferred to. If no destinations are provided, server url will be used to get the transfer destination once the tool is called.
This is the server VAPI will hit when this tool is requested by the model if no destinations are provided.
All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
API endpoint to send requests to.
This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret.
Same precedence logic as server.
This is optional but can be used to change the name and description of the default function provided to the model.
This is the the name of the function to be called.
Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
This is the description of what the function does, used by the AI to choose when and how to call the function.
These are the parameters the functions accepts, described as a JSON Schema object.
See the OpenAI guide for examples, and the JSON Schema reference for documentation about the format.
Omitting parameters defines a function with an empty parameter list.
This must be set to 'object'. It instructs the model to return a JSON object containing the function call properties.
object
This provides a description of the properties required by the function. JSON Schema can be used to specify expectations for each property. Refer to this doc for a comprehensive guide on JSON Schema.
This specifies the properties that are required by the function.
This is the provider that will be used for the model.
openai
This is the OpenAI model that will be used.
gpt-4o
, gpt-4o-2024-05-13
, 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
These are the fallback models that will be used if the primary model fails. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest fallbacks that make sense.
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
This sets how many turns at the start of the conversation to use gpt-3.5-turbo before switching to the primary model. Default is 0.
This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
Configure your knowledge base by adding document uuids and provider.
canonical
This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
This property handles whether we should detect user's emotion while they speak and send it as an additional info to model
These are the options for the assistant's voice.
This is the minimum number of characters that will be passed to the voice provider. This helps decides the minimum chunk size that is sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to 30.
These are the punctuations that are considered valid boundaries / "delimiters". This helps decides the chunks that are sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
。
, ,
, .
, !
, ?
, ;
, )
, ،
, ۔
, ।
, ॥
, |
, ||
, ,
, :
This determines whether fillers are injected into the Model output before inputting it into the Voice provider. Defaults to false.
This is the voice provider that will be used.
azure
This is the provider-specific ID that will be used.
andrew
, brian
, emma
This is the speed multiplier that will be used.
This is the mode for the first message. Default is 'assistant-speaks-first'.
Specify 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
assistant-speaks-first
, assistant-waits-for-user
These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence', 'machine_end_other'].
machine_start
, human
, fax
, unknown
, machine_end_beep
, machine_end_silence
, machine_end_other
This sets whether the assistant's calls are recorded. Defaults to true.
This sets whether the assistant will be able to hang up the call. Defaults to false.
This sets whether the assistant can dial digits on the keypad. Defaults to false.
When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false.
These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'tool-calls', 'speech-update', 'metadata', 'conversation-update']
status-update
, speech-update
, transcript
, hang
, function-call
, tool-calls
, metadata
, conversation-update
, model-output
, voice-input
These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'tool-calls']
status-update
, transcript
, hang
, function-call
, tool-calls
, end-of-call-report
, conversation-update
, phone-call-control
, model-output
, voice-input
How many seconds of silence to wait before ending the call. Defaults to 30.
The minimum number of seconds after user speech to wait before the assistant starts speaking. Defaults to 0.4.
The minimum number of seconds to wait after punctuation before sending a request to the LLM. Defaults to 0.1.
The number of words to wait for before interrupting the assistant. Words like "stop", "actually", "no", etc. will always interrupt immediately regardless of this value. Words like "okay", "yeah", "right" will never interrupt. Defaults to 1.
This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.
This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
off
, office
backchanneling is the bot say while listening like 'mhmm', 'ahem' etc. this make the conversation sounds natural. Default True
These are template variables that will be replaced in the assistant messages and prompts.
This is the name of the assistant. This is just for your own reference.
This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
This sets whether the assistant should detect voicemail. Defaults to true.
This is the message that the assistant will say if the call is forwarded to voicemail.
If unspecified, it will hang up.
This is the message that the assistant will say if it ends the call.
If unspecified, it will hang up without saying anything.
This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive.
This is the metadata associated with the call.
This is the URL Vapi will communicate with via HTTP GET and POST Requests. This is used for retrieving context, function calling, and end-of-call reports.
All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation.
This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret.
Same precedence logic as serverUrl.
This is the prompt that's used to summarize the call at the end.
Default is 'You are an expert note-taker. You will be given a transcript of a conversation. Please summarize the conversation in 4-5 sentences if applicable.'
Set to '' or 'off' to disable post-call summarization.
This is the assistant that will be used for the call. To use an existing assistant, use assistantId
instead.
These are the options for the assistant's transcriber.
This is the transcription provider that will be used.
deepgram
This is the Deepgram model that will be used. A list of models can be found here: https://developers.deepgram.com/docs/models-languages-overview
nova-2
, nova-2-general
, nova-2-meeting
, nova-2-phonecall
, nova-2-finance
, nova-2-conversationalai
, nova-2-voicemail
, nova-2-video
, nova-2-medical
, nova-2-drivethru
, nova-2-automotive
, nova
, nova-general
, nova-phonecall
, nova-medical
, enhanced
, enhanced-general
, enhanced-meeting
, enhanced-phonecall
, enhanced-finance
, base
, base-general
, base-meeting
, base-phonecall
, base-finance
, base-conversationalai
, base-voicemail
, base-video
This is the language that will be set for the transcription. The list of languages Deepgram supports can be found here: https://developers.deepgram.com/docs/models-languages-overview
cs
, da
, da-DK
, de-CH
, nl
, en
, en-US
, en-AU
, en-GB
, en-NZ
, en-IN
, nl-BE
, fr
, fr-CA
, de
, el
, hi
, hi-Latn
, id
, it
, ja
, ko
, ko-KR
, no
, pl
, pt
, pt-BR
, ru
, es
, es-419
, sv
, sv-SE
, tr
, uk
, ja
, zh
, zh-CN
, zh-TW
This will be use smart format option provided by Deepgram. It's default disabled because it can sometimes format numbers as times sometimes but it's getting better.
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.
These are the options for the assistant's LLM.
This is the starting state for the conversation.
assistant
, function
, user
, system
These are the tools functions that the assistant can execute during the call.
transferCall
request-start
eq
, neq
, gt
, gte
, lt
, lte
These are the destinations that the call can be transferred to. If no destinations are provided, server url will be used to get the transfer destination once the tool is called.
This is the server VAPI will hit when this tool is requested by the model if no destinations are provided.
All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
API endpoint to send requests to.
This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret.
Same precedence logic as server.
This is optional but can be used to change the name and description of the default function provided to the model.
This is the the name of the function to be called.
Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
This is the description of what the function does, used by the AI to choose when and how to call the function.
These are the parameters the functions accepts, described as a JSON Schema object.
See the OpenAI guide for examples, and the JSON Schema reference for documentation about the format.
Omitting parameters defines a function with an empty parameter list.
This must be set to 'object'. It instructs the model to return a JSON object containing the function call properties.
object
This provides a description of the properties required by the function. JSON Schema can be used to specify expectations for each property. Refer to this doc for a comprehensive guide on JSON Schema.
This specifies the properties that are required by the function.
This is the provider that will be used for the model.
openai
This is the OpenAI model that will be used.
gpt-4o
, gpt-4o-2024-05-13
, 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
These are the fallback models that will be used if the primary model fails. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest fallbacks that make sense.
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
This sets how many turns at the start of the conversation to use gpt-3.5-turbo before switching to the primary model. Default is 0.
This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
Configure your knowledge base by adding document uuids and provider.
canonical
This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
This property handles whether we should detect user's emotion while they speak and send it as an additional info to model
These are the options for the assistant's voice.
This is the minimum number of characters that will be passed to the voice provider. This helps decides the minimum chunk size that is sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to 30.
These are the punctuations that are considered valid boundaries / "delimiters". This helps decides the chunks that are sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
。
, ,
, .
, !
, ?
, ;
, )
, ،
, ۔
, ।
, ॥
, |
, ||
, ,
, :
This determines whether fillers are injected into the Model output before inputting it into the Voice provider. Defaults to false.
This is the voice provider that will be used.
azure
This is the provider-specific ID that will be used.
andrew
, brian
, emma
This is the speed multiplier that will be used.
This is the mode for the first message. Default is 'assistant-speaks-first'.
Specify 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
assistant-speaks-first
, assistant-waits-for-user
These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence', 'machine_end_other'].
machine_start
, human
, fax
, unknown
, machine_end_beep
, machine_end_silence
, machine_end_other
This sets whether the assistant's calls are recorded. Defaults to true.
This sets whether the assistant will be able to hang up the call. Defaults to false.
This sets whether the assistant can dial digits on the keypad. Defaults to false.
When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false.
These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'tool-calls', 'speech-update', 'metadata', 'conversation-update']
status-update
, speech-update
, transcript
, hang
, function-call
, tool-calls
, metadata
, conversation-update
, model-output
, voice-input
These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'tool-calls']
status-update
, transcript
, hang
, function-call
, tool-calls
, end-of-call-report
, conversation-update
, phone-call-control
, model-output
, voice-input
How many seconds of silence to wait before ending the call. Defaults to 30.
The minimum number of seconds after user speech to wait before the assistant starts speaking. Defaults to 0.4.
The minimum number of seconds to wait after punctuation before sending a request to the LLM. Defaults to 0.1.
The number of words to wait for before interrupting the assistant. Words like "stop", "actually", "no", etc. will always interrupt immediately regardless of this value. Words like "okay", "yeah", "right" will never interrupt. Defaults to 1.
This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.
This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
off
, office
backchanneling is the bot say while listening like 'mhmm', 'ahem' etc. this make the conversation sounds natural. Default True
This is the name of the assistant. This is just for your own reference.
This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
This sets whether the assistant should detect voicemail. Defaults to true.
This is the message that the assistant will say if the call is forwarded to voicemail.
If unspecified, it will hang up.
This is the message that the assistant will say if it ends the call.
If unspecified, it will hang up without saying anything.
This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive.
This is the metadata associated with the call.
This is the URL Vapi will communicate with via HTTP GET and POST Requests. This is used for retrieving context, function calling, and end-of-call reports.
All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation.
This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret.
Same precedence logic as serverUrl.
This is the prompt that's used to summarize the call at the end.
Default is 'You are an expert note-taker. You will be given a transcript of a conversation. Please summarize the conversation in 4-5 sentences if applicable.'
Set to '' or 'off' to disable post-call summarization.
This is the customer that will be called. To call a transient customer , use customer
instead.
Only relevant for outboundPhoneCall
and inboundPhoneCall
type.
This is the customer that will be called. To call an existing customer, use customerId
instead.
Only relevant for outboundPhoneCall
and inboundPhoneCall
type.
This is the number of the customer.
This is the name of the customer. This is just for your own reference.
This is the extension that will be dialed after the call is answered.
This is the phone number that will be used for the call. To use a transient number, use phoneNumber
instead.
Only relevant for outboundPhoneCall
and inboundPhoneCall
type.
This is the phone number that will be used for the call. To use an existing number, use phoneNumberId
instead.
Only relevant for outboundPhoneCall
and inboundPhoneCall
type.
These are the digits of the phone number you own on your Twilio.
This is your Twilio Account SID that will be used to handle this phone number.
This is the Twilio Auth Token that will be used to handle this phone number.
This is the name of the phone number. This is just for your own reference.
This is the assistant that will be used for incoming calls to this phone number.
If this is not set, then the phone number will not handle incoming calls.
This is the server URL that will be used to handle this phone number.
All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation.
This overrides the serverUrl set on the org. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret.
Same precendence logic as serverUrl.
This is the metadata associated with the call.
Was this page helpful?
curl --request GET \
--url https://api.vapi.ai/call \
--header 'Authorization: Bearer <token>'
[
{
"type": "inboundPhoneCall",
"phoneCallProvider": "twilio",
"phoneCallTransport": "sip",
"status": "queued",
"endedReason": "assistant-error",
"maxDurationSeconds": 1800,
"id": "<string>",
"orgId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"cost": 123,
"costBreakdown": {
"transport": 123,
"stt": 123,
"llm": 123,
"tts": 123,
"vapi": 123,
"total": 123,
"llmPromptTokens": 123,
"llmCompletionTokens": 123,
"ttsCharacters": 123
},
"transcript": "<string>",
"recordingUrl": "<string>",
"stereoRecordingUrl": "<string>",
"summary": "<string>",
"messages": [
{}
],
"phoneCallProviderId": "<string>",
"phoneCallProviderBypassEnabled": true,
"phoneCallProviderDetails": {
"statusCallbackEvent": "initiated",
"machineDetection": "Enable",
"to": "<string>",
"from": "<string>",
"twiml": "<string>",
"statusCallback": "<string>",
"asyncAmd": "<string>",
"asyncAmdStatusCallback": "<string>",
"record": true
},
"webCallUrl": "<string>",
"webCallSipUri": "<string>",
"forwardedPhoneNumber": "<string>",
"assistantId": "<string>",
"assistantOverrides": {
"transcriber": {
"provider": "deepgram",
"model": "nova-2",
"language": "cs",
"smartFormat": true,
"keywords": [
"<string>"
]
},
"model": {
"messages": [
{
"content": "<string>",
"role": "assistant",
"function_call": {},
"tool_calls": [
{}
]
}
],
"tools": [
{
"type": "transferCall",
"messages": [
{
"type": "request-start",
"content": "<string>",
"conditions": [
{
"param": "<string>",
"value": {},
"operator": "eq"
}
]
}
],
"destinations": [
{}
],
"server": {
"url": "<string>",
"secret": "<string>"
},
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {
"type": "object",
"properties": {},
"required": [
"<string>"
]
}
}
}
],
"provider": "openai",
"model": "gpt-4o",
"fallbackModels": [
"gpt-4-0125-preview",
"gpt-4-0613"
],
"semanticCachingEnabled": true,
"numFastTurns": 1,
"temperature": 1,
"knowledgeBase": {
"topK": 123,
"fileIds": [
"<string>"
],
"provider": "canonical"
},
"maxTokens": 525,
"emotionRecognitionEnabled": true
},
"voice": {
"inputMinCharacters": 10,
"inputPunctuationBoundaries": [
"。",
",",
".",
"!",
"?",
";",
")",
"،",
"۔",
"।",
"॥",
"|",
"||",
",",
":"
],
"fillerInjectionEnabled": true,
"provider": "azure",
"voiceId": "andrew",
"speed": 1.25
},
"forwardingPhoneNumber": "<string>",
"firstMessageMode": "assistant-speaks-first",
"voicemailDetectionTypes": [
"machine_end_beep",
"machine_end_silence",
"machine_end_other"
],
"recordingEnabled": true,
"endCallFunctionEnabled": true,
"dialKeypadFunctionEnabled": true,
"hipaaEnabled": true,
"clientMessages": [
"transcript",
"hang",
"tool-calls",
"speech-update",
"metadata",
"conversation-update"
],
"serverMessages": [
"end-of-call-report",
"status-update",
"hang",
"tool-calls"
],
"silenceTimeoutSeconds": 30,
"responseDelaySeconds": 0.4,
"llmRequestDelaySeconds": 0.1,
"numWordsToInterruptAssistant": 1,
"maxDurationSeconds": 1800,
"backgroundSound": "office",
"backchannelingEnabled": true,
"variableValues": {},
"name": "<string>",
"firstMessage": "<string>",
"voicemailDetectionEnabled": true,
"voicemailMessage": "<string>",
"endCallMessage": "<string>",
"endCallPhrases": [
"<string>"
],
"metadata": {},
"serverUrl": "<string>",
"serverUrlSecret": "<string>",
"summaryPrompt": "<string>"
},
"assistant": {
"transcriber": {
"provider": "deepgram",
"model": "nova-2",
"language": "cs",
"smartFormat": true,
"keywords": [
"<string>"
]
},
"model": {
"messages": [
{
"content": "<string>",
"role": "assistant",
"function_call": {},
"tool_calls": [
{}
]
}
],
"tools": [
{
"type": "transferCall",
"messages": [
{
"type": "request-start",
"content": "<string>",
"conditions": [
{
"param": "<string>",
"value": {},
"operator": "eq"
}
]
}
],
"destinations": [
{}
],
"server": {
"url": "<string>",
"secret": "<string>"
},
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {
"type": "object",
"properties": {},
"required": [
"<string>"
]
}
}
}
],
"provider": "openai",
"model": "gpt-4o",
"fallbackModels": [
"gpt-4-0125-preview",
"gpt-4-0613"
],
"semanticCachingEnabled": true,
"numFastTurns": 1,
"temperature": 1,
"knowledgeBase": {
"topK": 123,
"fileIds": [
"<string>"
],
"provider": "canonical"
},
"maxTokens": 525,
"emotionRecognitionEnabled": true
},
"voice": {
"inputMinCharacters": 10,
"inputPunctuationBoundaries": [
"。",
",",
".",
"!",
"?",
";",
")",
"،",
"۔",
"।",
"॥",
"|",
"||",
",",
":"
],
"fillerInjectionEnabled": true,
"provider": "azure",
"voiceId": "andrew",
"speed": 1.25
},
"forwardingPhoneNumber": "<string>",
"firstMessageMode": "assistant-speaks-first",
"voicemailDetectionTypes": [
"machine_end_beep",
"machine_end_silence",
"machine_end_other"
],
"recordingEnabled": true,
"endCallFunctionEnabled": true,
"dialKeypadFunctionEnabled": true,
"hipaaEnabled": true,
"clientMessages": [
"transcript",
"hang",
"tool-calls",
"speech-update",
"metadata",
"conversation-update"
],
"serverMessages": [
"end-of-call-report",
"status-update",
"hang",
"tool-calls"
],
"silenceTimeoutSeconds": 30,
"responseDelaySeconds": 0.4,
"llmRequestDelaySeconds": 0.1,
"numWordsToInterruptAssistant": 1,
"maxDurationSeconds": 1800,
"backgroundSound": "office",
"backchannelingEnabled": true,
"name": "<string>",
"firstMessage": "<string>",
"voicemailDetectionEnabled": true,
"voicemailMessage": "<string>",
"endCallMessage": "<string>",
"endCallPhrases": [
"<string>"
],
"metadata": {},
"serverUrl": "<string>",
"serverUrlSecret": "<string>",
"summaryPrompt": "<string>"
},
"customerId": "<string>",
"customer": {
"number": "<string>",
"name": "<string>",
"extension": "<string>"
},
"phoneNumberId": "<string>",
"phoneNumber": {
"twilioPhoneNumber": "<string>",
"twilioAccountSid": "<string>",
"twilioAuthToken": "<string>",
"name": "<string>",
"assistantId": "<string>",
"serverUrl": "<string>",
"serverUrlSecret": "<string>"
},
"metadata": {}
}
]