---
title: "Get Assistant"
method: GET
path: "/assistant/{id}"
tags: ["Assistants"]
---

# Get Assistant

`GET /assistant/{id}`

## Path parameters

- `id` string, required

## Response `200`

- Assistant
  - `transcriber` union — These are the options for the assistant's transcriber.
    - AssemblyAITranscriber
      - `provider` 'assembly-ai', required — This is the transcription provider that will be used.
      - `language` 'multi' | 'en' — This is the language that will be set for the transcription.
      - `confidenceThreshold` number — Transcripts below this confidence threshold will be discarded. @default 0.4
      - `formatTurns` boolean — This enables formatting of transcripts. @default true
      - `endOfTurnConfidenceThreshold` number — This is the end of turn confidence threshold. The minimum confidence that the end of turn is detected. Note: Only used if startSpeakingPlan.smartEndpointingPlan is not set. @min 0 @max 1 @default 0.7
      - `minEndOfTurnSilenceWhenConfident` number — This is the minimum end of turn silence when confident in milliseconds. Note: Only used if startSpeakingPlan.smartEndpointingPlan is not set. @default 160
      - `wordFinalizationMaxWaitTime` number
      - `maxTurnSilence` number — This is the maximum turn silence time in milliseconds. Note: Only used if startSpeakingPlan.smartEndpointingPlan is not set. @default 400
      - `vadAssistedEndpointingEnabled` boolean — Use VAD to assist with endpointing decisions from the transcriber. When enabled, transcriber endpointing will be buffered if VAD detects the user is still speaking, preventing premature turn-taking. When disabled, transcriber endpointing will be used immediately regardless of VAD state, allowing for quicker but more aggressive turn-taking. Note: Only used if startSpeakingPlan.smartEndpointingPlan is not set. @default true
      - `speechModel` 'universal-streaming-english' | 'universal-streaming-multilingual' — This is the speech model used for the streaming session. Note: Keyterms prompting is not supported with multilingual streaming. @default 'universal-streaming-english'
      - `realtimeUrl` string — The WebSocket URL that the transcriber connects to.
      - `wordBoost` string[] — Add up to 2500 characters of custom vocabulary.
      - `keytermsPrompt` string[] — Keyterms prompting improves recognition accuracy for specific words and phrases. Can include up to 100 keyterms, each up to 50 characters. Costs an additional $0.04/hour when enabled.
      - `endUtteranceSilenceThreshold` number — The duration of the end utterance silence threshold in milliseconds.
      - `disablePartialTranscripts` boolean — Disable partial transcripts. Set to `true` to not receive partial transcripts. Defaults to `false`.
      - `fallbackPlan` FallbackTranscriberPlan
        - `transcribers` union[], required
          - union
            - FallbackAssemblyAITranscriber
              - …
            - FallbackAzureSpeechTranscriber
              - …
            - FallbackCustomTranscriber
              - …
            - FallbackDeepgramTranscriber
              - …
            - FallbackElevenLabsTranscriber
              - …
            - FallbackGladiaTranscriber
              - …
            - FallbackGoogleTranscriber
              - …
            - FallbackTalkscriberTranscriber
              - …
            - FallbackSpeechmaticsTranscriber
              - …
            - FallbackOpenAITranscriber
              - …
            - FallbackCartesiaTranscriber
              - …
    - AzureSpeechTranscriber
      - `provider` 'azure', required — This is the transcription provider that will be used.
      - `language` 'af-ZA' | 'am-ET' | 'ar-AE' | 'ar-BH' | 'ar-DZ' | 'ar-EG' | 'ar-IL' | 'ar-IQ' | 'ar-JO' | 'ar-KW' | 'ar-LB' | 'ar-LY' | 'ar-MA' | 'ar-OM' | 'ar-PS' | 'ar-QA' | 'ar-SA' | 'ar-SY' | 'ar-TN' | 'ar-YE' | 'az-AZ' | 'bg-BG' | 'bn-IN' | 'bs-BA' | 'ca-ES' | 'cs-CZ' | 'cy-GB' | 'da-DK' | 'de-AT' | 'de-CH' | 'de-DE' | 'el-GR' | 'en-AU' | 'en-CA' | 'en-GB' | 'en-GH' | 'en-HK' | 'en-IE' | 'en-IN' | 'en-KE' | 'en-NG' | 'en-NZ' | 'en-PH' | 'en-SG' | 'en-TZ' | 'en-US' | 'en-ZA' | 'es-AR' | 'es-BO' | 'es-CL' | 'es-CO' | 'es-CR' | 'es-CU' | 'es-DO' | 'es-EC' | 'es-ES' | 'es-GQ' | 'es-GT' | 'es-HN' | 'es-MX' | 'es-NI' | 'es-PA' | 'es-PE' | 'es-PR' | 'es-PY' | 'es-SV' | 'es-US' | 'es-UY' | 'es-VE' | 'et-EE' | 'eu-ES' | 'fa-IR' | 'fi-FI' | 'fil-PH' | 'fr-BE' | 'fr-CA' | 'fr-CH' | 'fr-FR' | 'ga-IE' | 'gl-ES' | 'gu-IN' | 'he-IL' | 'hi-IN' | 'hr-HR' | 'hu-HU' | 'hy-AM' | 'id-ID' | 'is-IS' | 'it-CH' | 'it-IT' | 'ja-JP' | 'jv-ID' | 'ka-GE' | 'kk-KZ' | 'km-KH' | 'kn-IN' | 'ko-KR' | 'lo-LA' | 'lt-LT' | 'lv-LV' | 'mk-MK' | 'ml-IN' | 'mn-MN' | 'mr-IN' | 'ms-MY' | 'mt-MT' | 'my-MM' | 'nb-NO' | 'ne-NP' | 'nl-BE' | 'nl-NL' | 'pa-IN' | 'pl-PL' | 'ps-AF' | 'pt-BR' | 'pt-PT' | 'ro-RO' | 'ru-RU' | 'si-LK' | 'sk-SK' | 'sl-SI' | 'so-SO' | 'sq-AL' | 'sr-RS' | 'sv-SE' | 'sw-KE' | 'sw-TZ' | 'ta-IN' | 'te-IN' | 'th-TH' | 'tr-TR' | 'uk-UA' | 'ur-IN' | 'uz-UZ' | 'vi-VN' | 'wuu-CN' | 'yue-CN' | 'zh-CN' | 'zh-CN-shandong' | 'zh-CN-sichuan' | 'zh-HK' | 'zh-TW' | 'zu-ZA' — This is the language that will be set for the transcription. The list of languages Azure supports can be found here: https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support?tabs=stt
      - `segmentationStrategy` 'Default' | 'Time' | 'Semantic' — Controls how phrase boundaries are detected, enabling either simple time/silence heuristics or more advanced semantic segmentation.
      - `segmentationSilenceTimeoutMs` number — Duration of detected silence after which the service finalizes a phrase. Configure to adjust sensitivity to pauses in speech.
      - `segmentationMaximumTimeMs` number — Maximum duration a segment can reach before being cut off when using time-based segmentation.
      - `fallbackPlan` FallbackTranscriberPlan
        - `transcribers` union[], required
          - union
            - FallbackAssemblyAITranscriber
              - …
            - FallbackAzureSpeechTranscriber
              - …
            - FallbackCustomTranscriber
              - …
            - FallbackDeepgramTranscriber
              - …
            - FallbackElevenLabsTranscriber
              - …
            - FallbackGladiaTranscriber
              - …
            - FallbackGoogleTranscriber
              - …
            - FallbackTalkscriberTranscriber
              - …
            - FallbackSpeechmaticsTranscriber
              - …
            - FallbackOpenAITranscriber
              - …
            - FallbackCartesiaTranscriber
              - …
    - CustomTranscriber
      - `provider` 'custom-transcriber', required — This is the transcription provider that will be used. Use `custom-transcriber` for providers that are not natively supported.
      - `server` Server, required
        - `timeoutSeconds` number — This is the timeout in seconds for the request. Defaults to 20 seconds. @default 20
        - `credentialId` string — The credential ID for server authentication
        - `staticIpAddressesEnabled` boolean — If enabled, requests will originate from a static set of IPs owned and managed by Vapi. @default false
        - `encryptedPaths` string[] — This is the paths to encrypt in the request body if credentialId and encryptionPlan are defined.
        - `url` string — This is where the request will be sent.
        - `headers` object — These are the headers to include in the request. Each key-value pair represents a header name and its value. Note: Specifying an Authorization header here will override the authorization provided by the `credentialId` (if provided). This is an anti-pattern and should be avoided outside of edge case scenarios.
        - `backoffPlan` BackoffPlan
          - `type` object, required — This is the type of backoff plan to use. Defaults to fixed. @default fixed
          - `maxRetries` number, required — This is the maximum number of retries to attempt if the request fails. Defaults to 0 (no retries). @default 0
          - `baseDelaySeconds` number, required — This is the base delay in seconds. For linear backoff, this is the delay between each retry. For exponential backoff, this is the initial delay.
          - `excludedStatusCodes` object[] — This is the excluded status codes. If the response status code is in this list, the request will not be retried. By default, the request will be retried for any non-2xx status code.
      - `fallbackPlan` FallbackTranscriberPlan
        - `transcribers` union[], required
          - union
            - FallbackAssemblyAITranscriber
              - …
            - FallbackAzureSpeechTranscriber
              - …
            - FallbackCustomTranscriber
              - …
            - FallbackDeepgramTranscriber
              - …
            - FallbackElevenLabsTranscriber
              - …
            - FallbackGladiaTranscriber
              - …
            - FallbackGoogleTranscriber
              - …
            - FallbackTalkscriberTranscriber
              - …
            - FallbackSpeechmaticsTranscriber
              - …
            - FallbackOpenAITranscriber
              - …
            - FallbackCartesiaTranscriber
              - …
    - DeepgramTranscriber
      - `provider` 'deepgram', required — This is the transcription provider that will be used.
      - `model` union — 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-3' | 'nova-3-general' | 'nova-3-medical' | 'nova-2' | 'nova-2-general' | 'nova-2-meeting' | 'nova-2-phonecall' | 'nova-2-finance' | 'nova-2-conversationalai' | 'nova-2-voicemail' | 'nova-2-video' | 'nova-2-medical' | 'nova-2-drivethru' | 'nova-2-automotive' | 'nova' | 'nova-general' | 'nova-phonecall' | 'nova-medical' | 'enhanced' | 'enhanced-general' | 'enhanced-meeting' | 'enhanced-phonecall' | 'enhanced-finance' | 'base' | 'base-general' | 'base-meeting' | 'base-phonecall' | 'base-finance' | 'base-conversationalai' | 'base-voicemail' | 'base-video' | 'whisper' | 'flux-general-en'
        - string
      - `language` 'ar' | 'az' | 'ba' | 'bg' | 'br' | 'ca' | 'cs' | 'da' | 'da-DK' | 'de' | 'de-CH' | 'el' | 'en' | 'en-AU' | 'en-CA' | 'en-GB' | 'en-IE' | 'en-IN' | 'en-NZ' | 'en-US' | 'es' | 'es-419' | 'es-LATAM' | 'et' | 'eu' | 'fi' | 'fr' | 'fr-CA' | 'ha' | 'haw' | 'he' | 'hi' | 'hi-Latn' | 'hu' | 'id' | 'is' | 'it' | 'ja' | 'jw' | 'kn' | 'ko' | 'ko-KR' | 'ln' | 'lt' | 'lv' | 'mk' | 'ms' | 'multi' | 'nl' | 'nl-BE' | 'no' | 'pl' | 'pt' | 'pt-BR' | 'pt-PT' | 'ro' | 'ru' | 'sk' | 'sl' | 'sn' | 'so' | 'sr' | 'su' | 'sv' | 'sv-SE' | 'ta' | 'taq' | 'th' | 'th-TH' | 'tr' | 'tt' | 'uk' | 'ur' | 'vi' | 'yo' | 'zh' | 'zh-CN' | 'zh-HK' | 'zh-Hans' | 'zh-Hant' | 'zh-TW' — 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
      - `smartFormat` boolean — This will be use smart format option provided by Deepgram. It's default disabled because it can sometimes format numbers as times but it's getting better.
      - `mipOptOut` boolean — If set to true, this will add mip_opt_out=true as a query parameter of all API requests. See https://developers.deepgram.com/docs/the-deepgram-model-improvement-partnership-program#want-to-opt-out This will only be used if you are using your own Deepgram API key. @default false
      - `numerals` boolean — If set to true, this will cause deepgram to convert spoken numbers to literal numerals. For example, "my phone number is nine-seven-two..." would become "my phone number is 972..." @default false
      - `confidenceThreshold` number — Transcripts below this confidence threshold will be discarded. @default 0.4
      - `eagerEotThreshold` number — Eager end-of-turn confidence required to fire a eager end-of-turn event. Setting a value here will enable EagerEndOfTurn and SpeechResumed events. It is disabled by default. Only used with Flux models.
      - `eotThreshold` number — End-of-turn confidence required to finish a turn. Only used with Flux models. @default 0.7
      - `eotTimeoutMs` number — A turn will be finished when this much time has passed after speech, regardless of EOT confidence. Only used with Flux models. @default 5000
      - `keywords` string[] — 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.
      - `keyterm` string[] — Keyterm Prompting allows you improve Keyword Recall Rate (KRR) for important keyterms or phrases up to 90%.
      - `endpointing` number — This is the timeout after which Deepgram will send transcription on user silence. You can read in-depth documentation here: https://developers.deepgram.com/docs/endpointing. Here are the most important bits: - Defaults to 10. This is recommended for most use cases to optimize for latency. - 10 can cause some missing transcriptions since because of the shorter context. This mostly happens for one-word utterances. For those uses cases, it's recommended to try 300. It will add a bit of latency but the quality and reliability of the experience will be better. - If neither 10 nor 300 work, contact support@vapi.ai and we'll find another solution. @default 10
      - `fallbackPlan` FallbackTranscriberPlan
        - `transcribers` union[], required
          - union
            - FallbackAssemblyAITranscriber
              - …
            - FallbackAzureSpeechTranscriber
              - …
            - FallbackCustomTranscriber
              - …
            - FallbackDeepgramTranscriber
              - …
            - FallbackElevenLabsTranscriber
              - …
            - FallbackGladiaTranscriber
              - …
            - FallbackGoogleTranscriber
              - …
            - FallbackTalkscriberTranscriber
              - …
            - FallbackSpeechmaticsTranscriber
              - …
            - FallbackOpenAITranscriber
              - …
            - FallbackCartesiaTranscriber
              - …
    - ElevenLabsTranscriber
      - `provider` '11labs', required — This is the transcription provider that will be used.
      - `model` 'scribe_v1' — This is the model that will be used for the transcription.
      - `language` 'aa' | 'ab' | 'ae' | 'af' | 'ak' | 'am' | 'an' | 'ar' | 'as' | 'av' | 'ay' | 'az' | 'ba' | 'be' | 'bg' | 'bh' | 'bi' | 'bm' | 'bn' | 'bo' | 'br' | 'bs' | 'ca' | 'ce' | 'ch' | 'co' | 'cr' | 'cs' | 'cu' | 'cv' | 'cy' | 'da' | 'de' | 'dv' | 'dz' | 'ee' | 'el' | 'en' | 'eo' | 'es' | 'et' | 'eu' | 'fa' | 'ff' | 'fi' | 'fj' | 'fo' | 'fr' | 'fy' | 'ga' | 'gd' | 'gl' | 'gn' | 'gu' | 'gv' | 'ha' | 'he' | 'hi' | 'ho' | 'hr' | 'ht' | 'hu' | 'hy' | 'hz' | 'ia' | 'id' | 'ie' | 'ig' | 'ii' | 'ik' | 'io' | 'is' | 'it' | 'iu' | 'ja' | 'jv' | 'ka' | 'kg' | 'ki' | 'kj' | 'kk' | 'kl' | 'km' | 'kn' | 'ko' | 'kr' | 'ks' | 'ku' | 'kv' | 'kw' | 'ky' | 'la' | 'lb' | 'lg' | 'li' | 'ln' | 'lo' | 'lt' | 'lu' | 'lv' | 'mg' | 'mh' | 'mi' | 'mk' | 'ml' | 'mn' | 'mr' | 'ms' | 'mt' | 'my' | 'na' | 'nb' | 'nd' | 'ne' | 'ng' | 'nl' | 'nn' | 'no' | 'nr' | 'nv' | 'ny' | 'oc' | 'oj' | 'om' | 'or' | 'os' | 'pa' | 'pi' | 'pl' | 'ps' | 'pt' | 'qu' | 'rm' | 'rn' | 'ro' | 'ru' | 'rw' | 'sa' | 'sc' | 'sd' | 'se' | 'sg' | 'si' | 'sk' | 'sl' | 'sm' | 'sn' | 'so' | 'sq' | 'sr' | 'ss' | 'st' | 'su' | 'sv' | 'sw' | 'ta' | 'te' | 'tg' | 'th' | 'ti' | 'tk' | 'tl' | 'tn' | 'to' | 'tr' | 'ts' | 'tt' | 'tw' | 'ty' | 'ug' | 'uk' | 'ur' | 'uz' | 've' | 'vi' | 'vo' | 'wa' | 'wo' | 'xh' | 'yi' | 'yue' | 'yo' | 'za' | 'zh' | 'zu'
      - `fallbackPlan` FallbackTranscriberPlan
        - `transcribers` union[], required
          - union
            - FallbackAssemblyAITranscriber
              - …
            - FallbackAzureSpeechTranscriber
              - …
            - FallbackCustomTranscriber
              - …
            - FallbackDeepgramTranscriber
              - …
            - FallbackElevenLabsTranscriber
              - …
            - FallbackGladiaTranscriber
              - …
            - FallbackGoogleTranscriber
              - …
            - FallbackTalkscriberTranscriber
              - …
            - FallbackSpeechmaticsTranscriber
              - …
            - FallbackOpenAITranscriber
              - …
            - FallbackCartesiaTranscriber
              - …
    - GladiaTranscriber
      - `provider` 'gladia', required — This is the transcription provider that will be used.
      - `model` 'fast' | 'accurate' | 'solaria-1' — This is the Gladia model that will be used. Default is 'fast'
      - `languageBehaviour` 'manual' | 'automatic single language' | 'automatic multiple languages' — Defines how the transcription model detects the audio language. Default value is 'automatic single language'.
      - `language` 'af' | 'sq' | 'am' | 'ar' | 'hy' | 'as' | 'az' | 'ba' | 'eu' | 'be' | 'bn' | 'bs' | 'br' | 'bg' | 'ca' | 'zh' | 'hr' | 'cs' | 'da' | 'nl' | 'en' | 'et' | 'fo' | 'fi' | 'fr' | 'gl' | 'ka' | 'de' | 'el' | 'gu' | 'ht' | 'ha' | 'haw' | 'he' | 'hi' | 'hu' | 'is' | 'id' | 'it' | 'ja' | 'jv' | 'kn' | 'kk' | 'km' | 'ko' | 'lo' | 'la' | 'lv' | 'ln' | 'lt' | 'lb' | 'mk' | 'mg' | 'ms' | 'ml' | 'mt' | 'mi' | 'mr' | 'mn' | 'my' | 'ne' | 'no' | 'nn' | 'oc' | 'ps' | 'fa' | 'pl' | 'pt' | 'pa' | 'ro' | 'ru' | 'sa' | 'sr' | 'sn' | 'sd' | 'si' | 'sk' | 'sl' | 'so' | 'es' | 'su' | 'sw' | 'sv' | 'tl' | 'tg' | 'ta' | 'tt' | 'te' | 'th' | 'bo' | 'tr' | 'tk' | 'uk' | 'ur' | 'uz' | 'vi' | 'cy' | 'yi' | 'yo' — Defines the language to use for the transcription. Required when languageBehaviour is 'manual'.
      - `languages` 'af' | 'sq' | 'am' | 'ar' | 'hy' | 'as' | 'az' | 'ba' | 'eu' | 'be' | 'bn' | 'bs' | 'br' | 'bg' | 'ca' | 'zh' | 'hr' | 'cs' | 'da' | 'nl' | 'en' | 'et' | 'fo' | 'fi' | 'fr' | 'gl' | 'ka' | 'de' | 'el' | 'gu' | 'ht' | 'ha' | 'haw' | 'he' | 'hi' | 'hu' | 'is' | 'id' | 'it' | 'ja' | 'jv' | 'kn' | 'kk' | 'km' | 'ko' | 'lo' | 'la' | 'lv' | 'ln' | 'lt' | 'lb' | 'mk' | 'mg' | 'ms' | 'ml' | 'mt' | 'mi' | 'mr' | 'mn' | 'my' | 'ne' | 'no' | 'nn' | 'oc' | 'ps' | 'fa' | 'pl' | 'pt' | 'pa' | 'ro' | 'ru' | 'sa' | 'sr' | 'sn' | 'sd' | 'si' | 'sk' | 'sl' | 'so' | 'es' | 'su' | 'sw' | 'sv' | 'tl' | 'tg' | 'ta' | 'tt' | 'te' | 'th' | 'bo' | 'tr' | 'tk' | 'uk' | 'ur' | 'uz' | 'vi' | 'cy' | 'yi' | 'yo' — Defines the languages to use for the transcription. Required when languageBehaviour is 'manual'.
      - `transcriptionHint` string — Provides a custom vocabulary to the model to improve accuracy of transcribing context specific words, technical terms, names, etc. If empty, this argument is ignored. ⚠️ Warning ⚠️: Please be aware that the transcription_hint field has a character limit of 600. If you provide a transcription_hint longer than 600 characters, it will be automatically truncated to meet this limit.
      - `prosody` boolean — If prosody is true, you will get a transcription that can contain prosodies i.e. (laugh) (giggles) (malefic laugh) (toss) (music)… Default value is false.
      - `audioEnhancer` boolean — If true, audio will be pre-processed to improve accuracy but latency will increase. Default value is false.
      - `confidenceThreshold` number — Transcripts below this confidence threshold will be discarded. @default 0.4
      - `endpointing` number — Endpointing time in seconds - time to wait before considering speech ended
      - `speechThreshold` number — Speech threshold - sensitivity configuration for speech detection (0.0 to 1.0)
      - `customVocabularyEnabled` boolean — Enable custom vocabulary for improved accuracy
      - `customVocabularyConfig` GladiaCustomVocabularyConfigDTO
        - `vocabulary` union[], required — Array of vocabulary items (strings or objects with value, pronunciations, intensity, language)
          - union
            - string
            - GladiaVocabularyItemDTO
              - …
        - `defaultIntensity` number — Default intensity for vocabulary items (0.0 to 1.0)
      - `region` 'us-west' | 'eu-west' — Region for processing audio (us-west or eu-west)
      - `receivePartialTranscripts` boolean — Enable partial transcripts for low-latency streaming transcription
      - `fallbackPlan` FallbackTranscriberPlan
        - `transcribers` union[], required
          - union
            - FallbackAssemblyAITranscriber
              - …
            - FallbackAzureSpeechTranscriber
              - …
            - FallbackCustomTranscriber
              - …
            - FallbackDeepgramTranscriber
              - …
            - FallbackElevenLabsTranscriber
              - …
            - FallbackGladiaTranscriber
              - …
            - FallbackGoogleTranscriber
              - …
            - FallbackTalkscriberTranscriber
              - …
            - FallbackSpeechmaticsTranscriber
              - …
            - FallbackOpenAITranscriber
              - …
            - FallbackCartesiaTranscriber
              - …
    - GoogleTranscriber
      - `provider` 'google', required — This is the transcription provider that will be used.
      - `model` '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' — This is the model that will be used for the transcription.
      - `language` 'Multilingual' | 'Arabic' | 'Bengali' | 'Bulgarian' | 'Chinese' | 'Croatian' | 'Czech' | 'Danish' | 'Dutch' | 'English' | 'Estonian' | 'Finnish' | 'French' | 'German' | 'Greek' | 'Hebrew' | 'Hindi' | 'Hungarian' | 'Indonesian' | 'Italian' | 'Japanese' | 'Korean' | 'Latvian' | 'Lithuanian' | 'Norwegian' | 'Polish' | 'Portuguese' | 'Romanian' | 'Russian' | 'Serbian' | 'Slovak' | 'Slovenian' | 'Spanish' | 'Swahili' | 'Swedish' | 'Thai' | 'Turkish' | 'Ukrainian' | 'Vietnamese' — This is the language that will be set for the transcription.
      - `fallbackPlan` FallbackTranscriberPlan
        - `transcribers` union[], required
          - union
            - FallbackAssemblyAITranscriber
              - …
            - FallbackAzureSpeechTranscriber
              - …
            - FallbackCustomTranscriber
              - …
            - FallbackDeepgramTranscriber
              - …
            - FallbackElevenLabsTranscriber
              - …
            - FallbackGladiaTranscriber
              - …
            - FallbackGoogleTranscriber
              - …
            - FallbackTalkscriberTranscriber
              - …
            - FallbackSpeechmaticsTranscriber
              - …
            - FallbackOpenAITranscriber
              - …
            - FallbackCartesiaTranscriber
              - …
    - SpeechmaticsTranscriber
      - `provider` 'speechmatics', required — This is the transcription provider that will be used.
      - `model` 'default' — This is the model that will be used for the transcription.
      - `language` 'auto' | 'ar' | 'ba' | 'eu' | 'be' | 'bn' | 'bg' | 'yue' | 'ca' | 'hr' | 'cs' | 'da' | 'nl' | 'en' | 'eo' | 'et' | 'fi' | 'fr' | 'gl' | 'de' | 'el' | 'he' | 'hi' | 'hu' | 'id' | 'ia' | 'ga' | 'it' | 'ja' | 'ko' | 'lv' | 'lt' | 'ms' | 'en_ms' | 'mt' | 'cmn' | 'cmn_en' | 'mr' | 'mn' | 'no' | 'fa' | 'pl' | 'pt' | 'ro' | 'ru' | 'sk' | 'sl' | 'es' | 'en_es' | 'sw' | 'sv' | 'tl' | 'ta' | 'en_ta' | 'th' | 'tr' | 'uk' | 'ur' | 'ug' | 'vi' | 'cy'
      - `operatingPoint` 'standard' | 'enhanced' — This is the operating point for the transcription. Choose between `standard` for faster turnaround with strong accuracy or `enhanced` for highest accuracy when precision is critical. @default 'enhanced'
      - `region` 'eu' | 'us' — This is the region for the Speechmatics API. Choose between EU (Europe) and US (United States) regions for lower latency and data sovereignty compliance. @default 'eu'
      - `enableDiarization` boolean — This enables speaker diarization, which identifies and separates speakers in the transcription. Essential for multi-speaker conversations and conference calls. @default false
      - `maxDelay` number — This sets the maximum delay in milliseconds for partial transcripts. Balances latency and accuracy. @default 3000
      - `customVocabulary` SpeechmaticsCustomVocabularyItem[], required
        - `content` string, required — The word or phrase to add to the custom vocabulary.
        - `soundsLike` string[] — Alternative phonetic representations of how the word might sound. This helps recognition when the word might be pronounced differently.
      - `numeralStyle` 'written' | 'spoken' — This controls how numbers, dates, currencies, and other entities are formatted in the transcription output. @default 'written'
      - `endOfTurnSensitivity` number — This is the sensitivity level for end-of-turn detection, which determines when a speaker has finished talking. Higher values are more sensitive. @default 0.5
      - `removeDisfluencies` boolean — This enables removal of disfluencies (um, uh) from the transcript to create cleaner, more professional output. This is only supported for the English language transcriber. @default false
      - `minimumSpeechDuration` number — This is the minimum duration in seconds for speech segments. Shorter segments will be filtered out. Helps remove noise and improve accuracy. @default 0.0
      - `fallbackPlan` FallbackTranscriberPlan
        - `transcribers` union[], required
          - union
            - FallbackAssemblyAITranscriber
              - …
            - FallbackAzureSpeechTranscriber
              - …
            - FallbackCustomTranscriber
              - …
            - FallbackDeepgramTranscriber
              - …
            - FallbackElevenLabsTranscriber
              - …
            - FallbackGladiaTranscriber
              - …
            - FallbackGoogleTranscriber
              - …
            - FallbackTalkscriberTranscriber
              - …
            - FallbackSpeechmaticsTranscriber
              - …
            - FallbackOpenAITranscriber
              - …
            - FallbackCartesiaTranscriber
              - …
    - TalkscriberTranscriber
      - `provider` 'talkscriber', required — This is the transcription provider that will be used.
      - `model` 'whisper' — This is the model that will be used for the transcription.
      - `language` 'en' | 'zh' | 'de' | 'es' | 'ru' | 'ko' | 'fr' | 'ja' | 'pt' | 'tr' | 'pl' | 'ca' | 'nl' | 'ar' | 'sv' | 'it' | 'id' | 'hi' | 'fi' | 'vi' | 'he' | 'uk' | 'el' | 'ms' | 'cs' | 'ro' | 'da' | 'hu' | 'ta' | 'no' | 'th' | 'ur' | 'hr' | 'bg' | 'lt' | 'la' | 'mi' | 'ml' | 'cy' | 'sk' | 'te' | 'fa' | 'lv' | 'bn' | 'sr' | 'az' | 'sl' | 'kn' | 'et' | 'mk' | 'br' | 'eu' | 'is' | 'hy' | 'ne' | 'mn' | 'bs' | 'kk' | 'sq' | 'sw' | 'gl' | 'mr' | 'pa' | 'si' | 'km' | 'sn' | 'yo' | 'so' | 'af' | 'oc' | 'ka' | 'be' | 'tg' | 'sd' | 'gu' | 'am' | 'yi' | 'lo' | 'uz' | 'fo' | 'ht' | 'ps' | 'tk' | 'nn' | 'mt' | 'sa' | 'lb' | 'my' | 'bo' | 'tl' | 'mg' | 'as' | 'tt' | 'haw' | 'ln' | 'ha' | 'ba' | 'jw' | 'su' | 'yue' — This is the language that will be set for the transcription. The list of languages Whisper supports can be found here: https://github.com/openai/whisper/blob/main/whisper/tokenizer.py
      - `fallbackPlan` FallbackTranscriberPlan
        - `transcribers` union[], required
          - union
            - FallbackAssemblyAITranscriber
              - …
            - FallbackAzureSpeechTranscriber
              - …
            - FallbackCustomTranscriber
              - …
            - FallbackDeepgramTranscriber
              - …
            - FallbackElevenLabsTranscriber
              - …
            - FallbackGladiaTranscriber
              - …
            - FallbackGoogleTranscriber
              - …
            - FallbackTalkscriberTranscriber
              - …
            - FallbackSpeechmaticsTranscriber
              - …
            - FallbackOpenAITranscriber
              - …
            - FallbackCartesiaTranscriber
              - …
    - OpenAITranscriber
      - `provider` 'openai', required — This is the transcription provider that will be used.
      - `model` 'gpt-4o-transcribe' | 'gpt-4o-mini-transcribe', required — This is the model that will be used for the transcription.
      - `language` 'af' | 'ar' | 'hy' | 'az' | 'be' | 'bs' | 'bg' | 'ca' | 'zh' | 'hr' | 'cs' | 'da' | 'nl' | 'en' | 'et' | 'fi' | 'fr' | 'gl' | 'de' | 'el' | 'he' | 'hi' | 'hu' | 'is' | 'id' | 'it' | 'ja' | 'kn' | 'kk' | 'ko' | 'lv' | 'lt' | 'mk' | 'ms' | 'mr' | 'mi' | 'ne' | 'no' | 'fa' | 'pl' | 'pt' | 'ro' | 'ru' | 'sr' | 'sk' | 'sl' | 'es' | 'sw' | 'sv' | 'tl' | 'ta' | 'th' | 'tr' | 'uk' | 'ur' | 'vi' | 'cy' — This is the language that will be set for the transcription.
      - `fallbackPlan` FallbackTranscriberPlan
        - `transcribers` union[], required
          - union
            - FallbackAssemblyAITranscriber
              - …
            - FallbackAzureSpeechTranscriber
              - …
            - FallbackCustomTranscriber
              - …
            - FallbackDeepgramTranscriber
              - …
            - FallbackElevenLabsTranscriber
              - …
            - FallbackGladiaTranscriber
              - …
            - FallbackGoogleTranscriber
              - …
            - FallbackTalkscriberTranscriber
              - …
            - FallbackSpeechmaticsTranscriber
              - …
            - FallbackOpenAITranscriber
              - …
            - FallbackCartesiaTranscriber
              - …
    - CartesiaTranscriber
      - `provider` 'cartesia', required
      - `model` 'ink-whisper'
      - `language` 'aa' | 'ab' | 'ae' | 'af' | 'ak' | 'am' | 'an' | 'ar' | 'as' | 'av' | 'ay' | 'az' | 'ba' | 'be' | 'bg' | 'bh' | 'bi' | 'bm' | 'bn' | 'bo' | 'br' | 'bs' | 'ca' | 'ce' | 'ch' | 'co' | 'cr' | 'cs' | 'cu' | 'cv' | 'cy' | 'da' | 'de' | 'dv' | 'dz' | 'ee' | 'el' | 'en' | 'eo' | 'es' | 'et' | 'eu' | 'fa' | 'ff' | 'fi' | 'fj' | 'fo' | 'fr' | 'fy' | 'ga' | 'gd' | 'gl' | 'gn' | 'gu' | 'gv' | 'ha' | 'he' | 'hi' | 'ho' | 'hr' | 'ht' | 'hu' | 'hy' | 'hz' | 'ia' | 'id' | 'ie' | 'ig' | 'ii' | 'ik' | 'io' | 'is' | 'it' | 'iu' | 'ja' | 'jv' | 'ka' | 'kg' | 'ki' | 'kj' | 'kk' | 'kl' | 'km' | 'kn' | 'ko' | 'kr' | 'ks' | 'ku' | 'kv' | 'kw' | 'ky' | 'la' | 'lb' | 'lg' | 'li' | 'ln' | 'lo' | 'lt' | 'lu' | 'lv' | 'mg' | 'mh' | 'mi' | 'mk' | 'ml' | 'mn' | 'mr' | 'ms' | 'mt' | 'my' | 'na' | 'nb' | 'nd' | 'ne' | 'ng' | 'nl' | 'nn' | 'no' | 'nr' | 'nv' | 'ny' | 'oc' | 'oj' | 'om' | 'or' | 'os' | 'pa' | 'pi' | 'pl' | 'ps' | 'pt' | 'qu' | 'rm' | 'rn' | 'ro' | 'ru' | 'rw' | 'sa' | 'sc' | 'sd' | 'se' | 'sg' | 'si' | 'sk' | 'sl' | 'sm' | 'sn' | 'so' | 'sq' | 'sr' | 'ss' | 'st' | 'su' | 'sv' | 'sw' | 'ta' | 'te' | 'tg' | 'th' | 'ti' | 'tk' | 'tl' | 'tn' | 'to' | 'tr' | 'ts' | 'tt' | 'tw' | 'ty' | 'ug' | 'uk' | 'ur' | 'uz' | 've' | 'vi' | 'vo' | 'wa' | 'wo' | 'xh' | 'yi' | 'yue' | 'yo' | 'za' | 'zh' | 'zu'
      - `fallbackPlan` FallbackTranscriberPlan
        - `transcribers` union[], required
          - union
            - FallbackAssemblyAITranscriber
              - …
            - FallbackAzureSpeechTranscriber
              - …
            - FallbackCustomTranscriber
              - …
            - FallbackDeepgramTranscriber
              - …
            - FallbackElevenLabsTranscriber
              - …
            - FallbackGladiaTranscriber
              - …
            - FallbackGoogleTranscriber
              - …
            - FallbackTalkscriberTranscriber
              - …
            - FallbackSpeechmaticsTranscriber
              - …
            - FallbackOpenAITranscriber
              - …
            - FallbackCartesiaTranscriber
              - …
  - `model` union — These are the options for the assistant's LLM.
    - AnthropicModel
      - `messages` OpenAIMessage[] — This is the starting state for the conversation.
        - `content` string, nullable, required
        - `role` 'assistant' | 'function' | 'user' | 'system' | 'tool', required
      - `tools` union[] — These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. Both `tools` and `toolIds` can be used together.
        - union
          - CreateApiRequestToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'apiRequest', required — The type of tool. "apiRequest" for API request tool.
            - `method` 'POST' | 'GET' | 'PUT' | 'PATCH' | 'DELETE', required
            - `timeoutSeconds` number — This is the timeout in seconds for the request. Defaults to 20 seconds. @default 20
            - `credentialId` string — The credential ID for API request authentication
            - `encryptedPaths` string[] — This is the paths to encrypt in the request body if credentialId and encryptionPlan are defined.
            - `name` string — This is the name of the tool. This will be passed to the model. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40.
            - `description` string — This is the description of the tool. This will be passed to the model.
            - `url` string, required — This is where the request will be sent.
            - `body` JsonSchema
              - …
            - `headers` JsonSchema
              - …
            - `backoffPlan` BackoffPlan
              - …
            - `variableExtractionPlan` VariableExtractionPlan
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateBashToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'bash', required — The type of tool. "bash" for Bash tool.
            - `subType` 'bash_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'bash', required — The name of the tool, fixed to 'bash'
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateCodeToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'code', required — The type of tool. "code" for Code tool.
            - `async` boolean — This determines if the tool is async. If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. Defaults to synchronous (`false`).
            - `server` Server
              - …
            - `code` string, required — TypeScript code to execute when the tool is called
            - `environmentVariables` CodeToolEnvironmentVariable[] — Environment variables available in code via `env` object
              - …
            - `timeoutSeconds` number — This is the timeout in seconds for the code execution. Defaults to 10 seconds. Maximum is 30 seconds to prevent abuse. @default 10
            - `credentialId` string — Credential ID containing the Val Town API key
            - `variableExtractionPlan` VariableExtractionPlan
              - …
            - `function` OpenAIFunction
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateComputerToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'computer', required — The type of tool. "computer" for Computer tool.
            - `subType` 'computer_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'computer', required — The name of the tool, fixed to 'computer'
            - `displayWidthPx` number, required — The display width in pixels
            - `displayHeightPx` number, required — The display height in pixels
            - `displayNumber` number — Optional display number
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateDtmfToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'dtmf', required — The type of tool. "dtmf" for DTMF tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateEndCallToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'endCall', required — The type of tool. "endCall" for End Call tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateFunctionToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'function', required — The type of tool. "function" for Function tool.
            - `async` boolean — This determines if the tool is async. If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. Defaults to synchronous (`false`).
            - `server` Server
              - …
            - `function` OpenAIFunction
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelCalendarAvailabilityToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.calendar.availability.check', required — The type of tool. "gohighlevel.calendar.availability.check" for GoHighLevel Calendar Availability Check tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelCalendarEventCreateToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.calendar.event.create', required — The type of tool. "gohighlevel.calendar.event.create" for GoHighLevel Calendar Event Create tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelContactCreateToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.contact.create', required — The type of tool. "gohighlevel.contact.create" for GoHighLevel Contact Create tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelContactGetToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.contact.get', required — The type of tool. "gohighlevel.contact.get" for GoHighLevel Contact Get tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoogleCalendarCheckAvailabilityToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'google.calendar.availability.check', required — The type of tool. "google.calendar.availability.check" for Google Calendar Check Availability tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoogleCalendarCreateEventToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'google.calendar.event.create', required — The type of tool. "google.calendar.event.create" for Google Calendar Create Event tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoogleSheetsRowAppendToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'google.sheets.row.append', required — The type of tool. "google.sheets.row.append" for Google Sheets Row Append tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateHandoffToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'handoff', required — This is the type of the tool. When you're using handoff tool, we recommend adding this to your system prompt --- # System context You are part of a multi-agent system designed to make agent coordination and execution easy. Agents uses two primary abstraction: **Agents** and **Handoffs**. An agent encompasses instructions and tools and can hand off a conversation to another agent when appropriate. Handoffs are achieved by calling a handoff function, generally named `handoff_to_<agent_name>`. Handoffs between agents are handled seamlessly in the background; do not mention or draw attention to these handoffs in your conversation with the user. # Agent context {put your agent system prompt here} ---
            - `destinations` union[] — These are the destinations that the call can be handed off to. Usage: 1. Single destination Use `assistantId` to handoff the call to a saved assistant, or `assistantName` to handoff the call to an assistant in the same squad. ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-123", // or "assistantName": "Assistant123" "description": "customer wants to be handed off to assistant-123", "contextEngineeringPlan": { "type": "all" } } ], } ] } ``` 2. Multiple destinations 2.1. Multiple Tools, Each With One Destination (OpenAI recommended) ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-123", "description": "customer wants to be handed off to assistant-123", "contextEngineeringPlan": { "type": "all" } }, ], }, { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-456", "description": "customer wants to be handed off to assistant-456", "contextEngineeringPlan": { "type": "all" } } ], } ] } ``` 2.2. One Tool, Multiple Destinations (Anthropic recommended) ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-123", "description": "customer wants to be handed off to assistant-123", "contextEngineeringPlan": { "type": "all" } }, { "type": "assistant", "assistantId": "assistant-456", "description": "customer wants to be handed off to assistant-456", "contextEngineeringPlan": { "type": "all" } } ], } ] } ``` 3. Dynamic destination 3.1 To determine the destination dynamically, supply a `dynamic` handoff destination type and a `server` object. VAPI will send a handoff-destination-request webhook to the `server.url`. The response from the server will be used as the destination (if valid). ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "dynamic", "server": { "url": "https://example.com" } } ], } ] } ``` 3.2. To pass custom parameters to the server, you can use the `function` object. ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "dynamic", "server": { "url": "https://example.com" }, } ], "function": { "name": "handoff", "description": "Call this function when the customer is ready to be handed off to the next assistant", "parameters": { "type": "object", "properties": { "destination": { "type": "string", "description": "Use dynamic when customer is ready to be handed off to the next assistant", "enum": ["dynamic"] }, "customerAreaCode": { "type": "number", "description": "Area code of the customer" }, "customerIntent": { "type": "string", "enum": ["new-customer", "existing-customer"], "description": "Use new-customer when customer is a new customer, existing-customer when customer is an existing customer" }, "customerSentiment": { "type": "string", "enum": ["positive", "negative", "neutral"], "description": "Use positive when customer is happy, negative when customer is unhappy, neutral when customer is neutral" } } } } } ] } ``` The properties `customerAreaCode`, `customerIntent`, and `customerSentiment` will be passed to the server in the webhook request body.
              - …
            - `function` OpenAIFunction
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateMcpToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'mcp', required — The type of tool. "mcp" for MCP tool.
            - `server` Server
              - …
            - `metadata` McpToolMetadata
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateQueryToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'query', required — The type of tool. "query" for Query tool.
            - `knowledgeBases` KnowledgeBase[] — The knowledge bases to query
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateSlackSendMessageToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'slack.message.send', required — The type of tool. "slack.message.send" for Slack Send Message tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateSmsToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'sms', required — The type of tool. "sms" for Twilio SMS sending tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateTextEditorToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'textEditor', required — The type of tool. "textEditor" for Text Editor tool.
            - `subType` 'text_editor_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'str_replace_editor', required — The name of the tool, fixed to 'str_replace_editor'
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateTransferCallToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'transferCall', required
            - `destinations` union[] — 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.
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
      - `toolIds` string[] — These are the tools that the assistant can use during the call. To use transient tools, use `tools`. Both `tools` and `toolIds` can be used together.
      - `knowledgeBase` CreateCustomKnowledgeBaseDTO
        - `provider` 'custom-knowledge-base', required — This knowledge base is bring your own knowledge base implementation.
        - `server` Server, required
          - `timeoutSeconds` number — This is the timeout in seconds for the request. Defaults to 20 seconds. @default 20
          - `credentialId` string — The credential ID for server authentication
          - `staticIpAddressesEnabled` boolean — If enabled, requests will originate from a static set of IPs owned and managed by Vapi. @default false
          - `encryptedPaths` string[] — This is the paths to encrypt in the request body if credentialId and encryptionPlan are defined.
          - `url` string — This is where the request will be sent.
          - `headers` object — These are the headers to include in the request. Each key-value pair represents a header name and its value. Note: Specifying an Authorization header here will override the authorization provided by the `credentialId` (if provided). This is an anti-pattern and should be avoided outside of edge case scenarios.
          - `backoffPlan` BackoffPlan
            - `type` object, required — This is the type of backoff plan to use. Defaults to fixed. @default fixed
            - `maxRetries` number, required — This is the maximum number of retries to attempt if the request fails. Defaults to 0 (no retries). @default 0
            - `baseDelaySeconds` number, required — This is the base delay in seconds. For linear backoff, this is the delay between each retry. For exponential backoff, this is the initial delay.
            - `excludedStatusCodes` object[] — This is the excluded status codes. If the response status code is in this list, the request will not be retried. By default, the request will be retried for any non-2xx status code.
              - …
      - `model` 'claude-3-opus-20240229' | 'claude-3-sonnet-20240229' | 'claude-3-haiku-20240307' | 'claude-3-5-sonnet-20240620' | 'claude-3-5-sonnet-20241022' | 'claude-3-5-haiku-20241022' | 'claude-3-7-sonnet-20250219' | 'claude-opus-4-20250514' | 'claude-opus-4-5-20251101' | 'claude-sonnet-4-20250514' | 'claude-sonnet-4-5-20250929' | 'claude-haiku-4-5-20251001', required — The specific Anthropic/Claude model that will be used.
      - `provider` 'anthropic', required — The provider identifier for Anthropic.
      - `thinking` AnthropicThinkingConfig
        - `type` 'enabled', required
        - `budgetTokens` number, required — The maximum number of tokens to allocate for thinking. Must be between 1024 and 100000 tokens.
      - `temperature` number — This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
      - `maxTokens` number — This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
      - `emotionRecognitionEnabled` boolean — This determines whether we detect user's emotion while they speak and send it as an additional info to model. Default `false` because the model is usually are good at understanding the user's emotion from text. @default false
      - `numFastTurns` number — This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai. Default is 0. @default 0
    - AnyscaleModel
      - `messages` OpenAIMessage[] — This is the starting state for the conversation.
        - `content` string, nullable, required
        - `role` 'assistant' | 'function' | 'user' | 'system' | 'tool', required
      - `tools` union[] — These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. Both `tools` and `toolIds` can be used together.
        - union
          - CreateApiRequestToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'apiRequest', required — The type of tool. "apiRequest" for API request tool.
            - `method` 'POST' | 'GET' | 'PUT' | 'PATCH' | 'DELETE', required
            - `timeoutSeconds` number — This is the timeout in seconds for the request. Defaults to 20 seconds. @default 20
            - `credentialId` string — The credential ID for API request authentication
            - `encryptedPaths` string[] — This is the paths to encrypt in the request body if credentialId and encryptionPlan are defined.
            - `name` string — This is the name of the tool. This will be passed to the model. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40.
            - `description` string — This is the description of the tool. This will be passed to the model.
            - `url` string, required — This is where the request will be sent.
            - `body` JsonSchema
              - …
            - `headers` JsonSchema
              - …
            - `backoffPlan` BackoffPlan
              - …
            - `variableExtractionPlan` VariableExtractionPlan
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateBashToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'bash', required — The type of tool. "bash" for Bash tool.
            - `subType` 'bash_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'bash', required — The name of the tool, fixed to 'bash'
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateCodeToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'code', required — The type of tool. "code" for Code tool.
            - `async` boolean — This determines if the tool is async. If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. Defaults to synchronous (`false`).
            - `server` Server
              - …
            - `code` string, required — TypeScript code to execute when the tool is called
            - `environmentVariables` CodeToolEnvironmentVariable[] — Environment variables available in code via `env` object
              - …
            - `timeoutSeconds` number — This is the timeout in seconds for the code execution. Defaults to 10 seconds. Maximum is 30 seconds to prevent abuse. @default 10
            - `credentialId` string — Credential ID containing the Val Town API key
            - `variableExtractionPlan` VariableExtractionPlan
              - …
            - `function` OpenAIFunction
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateComputerToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'computer', required — The type of tool. "computer" for Computer tool.
            - `subType` 'computer_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'computer', required — The name of the tool, fixed to 'computer'
            - `displayWidthPx` number, required — The display width in pixels
            - `displayHeightPx` number, required — The display height in pixels
            - `displayNumber` number — Optional display number
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateDtmfToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'dtmf', required — The type of tool. "dtmf" for DTMF tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateEndCallToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'endCall', required — The type of tool. "endCall" for End Call tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateFunctionToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'function', required — The type of tool. "function" for Function tool.
            - `async` boolean — This determines if the tool is async. If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. Defaults to synchronous (`false`).
            - `server` Server
              - …
            - `function` OpenAIFunction
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelCalendarAvailabilityToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.calendar.availability.check', required — The type of tool. "gohighlevel.calendar.availability.check" for GoHighLevel Calendar Availability Check tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelCalendarEventCreateToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.calendar.event.create', required — The type of tool. "gohighlevel.calendar.event.create" for GoHighLevel Calendar Event Create tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelContactCreateToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.contact.create', required — The type of tool. "gohighlevel.contact.create" for GoHighLevel Contact Create tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelContactGetToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.contact.get', required — The type of tool. "gohighlevel.contact.get" for GoHighLevel Contact Get tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoogleCalendarCheckAvailabilityToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'google.calendar.availability.check', required — The type of tool. "google.calendar.availability.check" for Google Calendar Check Availability tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoogleCalendarCreateEventToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'google.calendar.event.create', required — The type of tool. "google.calendar.event.create" for Google Calendar Create Event tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoogleSheetsRowAppendToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'google.sheets.row.append', required — The type of tool. "google.sheets.row.append" for Google Sheets Row Append tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateHandoffToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'handoff', required — This is the type of the tool. When you're using handoff tool, we recommend adding this to your system prompt --- # System context You are part of a multi-agent system designed to make agent coordination and execution easy. Agents uses two primary abstraction: **Agents** and **Handoffs**. An agent encompasses instructions and tools and can hand off a conversation to another agent when appropriate. Handoffs are achieved by calling a handoff function, generally named `handoff_to_<agent_name>`. Handoffs between agents are handled seamlessly in the background; do not mention or draw attention to these handoffs in your conversation with the user. # Agent context {put your agent system prompt here} ---
            - `destinations` union[] — These are the destinations that the call can be handed off to. Usage: 1. Single destination Use `assistantId` to handoff the call to a saved assistant, or `assistantName` to handoff the call to an assistant in the same squad. ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-123", // or "assistantName": "Assistant123" "description": "customer wants to be handed off to assistant-123", "contextEngineeringPlan": { "type": "all" } } ], } ] } ``` 2. Multiple destinations 2.1. Multiple Tools, Each With One Destination (OpenAI recommended) ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-123", "description": "customer wants to be handed off to assistant-123", "contextEngineeringPlan": { "type": "all" } }, ], }, { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-456", "description": "customer wants to be handed off to assistant-456", "contextEngineeringPlan": { "type": "all" } } ], } ] } ``` 2.2. One Tool, Multiple Destinations (Anthropic recommended) ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-123", "description": "customer wants to be handed off to assistant-123", "contextEngineeringPlan": { "type": "all" } }, { "type": "assistant", "assistantId": "assistant-456", "description": "customer wants to be handed off to assistant-456", "contextEngineeringPlan": { "type": "all" } } ], } ] } ``` 3. Dynamic destination 3.1 To determine the destination dynamically, supply a `dynamic` handoff destination type and a `server` object. VAPI will send a handoff-destination-request webhook to the `server.url`. The response from the server will be used as the destination (if valid). ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "dynamic", "server": { "url": "https://example.com" } } ], } ] } ``` 3.2. To pass custom parameters to the server, you can use the `function` object. ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "dynamic", "server": { "url": "https://example.com" }, } ], "function": { "name": "handoff", "description": "Call this function when the customer is ready to be handed off to the next assistant", "parameters": { "type": "object", "properties": { "destination": { "type": "string", "description": "Use dynamic when customer is ready to be handed off to the next assistant", "enum": ["dynamic"] }, "customerAreaCode": { "type": "number", "description": "Area code of the customer" }, "customerIntent": { "type": "string", "enum": ["new-customer", "existing-customer"], "description": "Use new-customer when customer is a new customer, existing-customer when customer is an existing customer" }, "customerSentiment": { "type": "string", "enum": ["positive", "negative", "neutral"], "description": "Use positive when customer is happy, negative when customer is unhappy, neutral when customer is neutral" } } } } } ] } ``` The properties `customerAreaCode`, `customerIntent`, and `customerSentiment` will be passed to the server in the webhook request body.
              - …
            - `function` OpenAIFunction
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateMcpToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'mcp', required — The type of tool. "mcp" for MCP tool.
            - `server` Server
              - …
            - `metadata` McpToolMetadata
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateQueryToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'query', required — The type of tool. "query" for Query tool.
            - `knowledgeBases` KnowledgeBase[] — The knowledge bases to query
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateSlackSendMessageToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'slack.message.send', required — The type of tool. "slack.message.send" for Slack Send Message tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateSmsToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'sms', required — The type of tool. "sms" for Twilio SMS sending tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateTextEditorToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'textEditor', required — The type of tool. "textEditor" for Text Editor tool.
            - `subType` 'text_editor_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'str_replace_editor', required — The name of the tool, fixed to 'str_replace_editor'
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateTransferCallToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'transferCall', required
            - `destinations` union[] — 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.
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
      - `toolIds` string[] — These are the tools that the assistant can use during the call. To use transient tools, use `tools`. Both `tools` and `toolIds` can be used together.
      - `knowledgeBase` CreateCustomKnowledgeBaseDTO
        - `provider` 'custom-knowledge-base', required — This knowledge base is bring your own knowledge base implementation.
        - `server` Server, required
          - `timeoutSeconds` number — This is the timeout in seconds for the request. Defaults to 20 seconds. @default 20
          - `credentialId` string — The credential ID for server authentication
          - `staticIpAddressesEnabled` boolean — If enabled, requests will originate from a static set of IPs owned and managed by Vapi. @default false
          - `encryptedPaths` string[] — This is the paths to encrypt in the request body if credentialId and encryptionPlan are defined.
          - `url` string — This is where the request will be sent.
          - `headers` object — These are the headers to include in the request. Each key-value pair represents a header name and its value. Note: Specifying an Authorization header here will override the authorization provided by the `credentialId` (if provided). This is an anti-pattern and should be avoided outside of edge case scenarios.
          - `backoffPlan` BackoffPlan
            - `type` object, required — This is the type of backoff plan to use. Defaults to fixed. @default fixed
            - `maxRetries` number, required — This is the maximum number of retries to attempt if the request fails. Defaults to 0 (no retries). @default 0
            - `baseDelaySeconds` number, required — This is the base delay in seconds. For linear backoff, this is the delay between each retry. For exponential backoff, this is the initial delay.
            - `excludedStatusCodes` object[] — This is the excluded status codes. If the response status code is in this list, the request will not be retried. By default, the request will be retried for any non-2xx status code.
              - …
      - `provider` 'anyscale', required
      - `model` string, required — This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b
      - `temperature` number — This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
      - `maxTokens` number — This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
      - `emotionRecognitionEnabled` boolean — This determines whether we detect user's emotion while they speak and send it as an additional info to model. Default `false` because the model is usually are good at understanding the user's emotion from text. @default false
      - `numFastTurns` number — This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai. Default is 0. @default 0
    - CerebrasModel
      - `messages` OpenAIMessage[] — This is the starting state for the conversation.
        - `content` string, nullable, required
        - `role` 'assistant' | 'function' | 'user' | 'system' | 'tool', required
      - `tools` union[] — These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. Both `tools` and `toolIds` can be used together.
        - union
          - CreateApiRequestToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'apiRequest', required — The type of tool. "apiRequest" for API request tool.
            - `method` 'POST' | 'GET' | 'PUT' | 'PATCH' | 'DELETE', required
            - `timeoutSeconds` number — This is the timeout in seconds for the request. Defaults to 20 seconds. @default 20
            - `credentialId` string — The credential ID for API request authentication
            - `encryptedPaths` string[] — This is the paths to encrypt in the request body if credentialId and encryptionPlan are defined.
            - `name` string — This is the name of the tool. This will be passed to the model. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40.
            - `description` string — This is the description of the tool. This will be passed to the model.
            - `url` string, required — This is where the request will be sent.
            - `body` JsonSchema
              - …
            - `headers` JsonSchema
              - …
            - `backoffPlan` BackoffPlan
              - …
            - `variableExtractionPlan` VariableExtractionPlan
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateBashToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'bash', required — The type of tool. "bash" for Bash tool.
            - `subType` 'bash_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'bash', required — The name of the tool, fixed to 'bash'
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateCodeToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'code', required — The type of tool. "code" for Code tool.
            - `async` boolean — This determines if the tool is async. If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. Defaults to synchronous (`false`).
            - `server` Server
              - …
            - `code` string, required — TypeScript code to execute when the tool is called
            - `environmentVariables` CodeToolEnvironmentVariable[] — Environment variables available in code via `env` object
              - …
            - `timeoutSeconds` number — This is the timeout in seconds for the code execution. Defaults to 10 seconds. Maximum is 30 seconds to prevent abuse. @default 10
            - `credentialId` string — Credential ID containing the Val Town API key
            - `variableExtractionPlan` VariableExtractionPlan
              - …
            - `function` OpenAIFunction
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateComputerToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'computer', required — The type of tool. "computer" for Computer tool.
            - `subType` 'computer_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'computer', required — The name of the tool, fixed to 'computer'
            - `displayWidthPx` number, required — The display width in pixels
            - `displayHeightPx` number, required — The display height in pixels
            - `displayNumber` number — Optional display number
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateDtmfToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'dtmf', required — The type of tool. "dtmf" for DTMF tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateEndCallToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'endCall', required — The type of tool. "endCall" for End Call tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateFunctionToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'function', required — The type of tool. "function" for Function tool.
            - `async` boolean — This determines if the tool is async. If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. Defaults to synchronous (`false`).
            - `server` Server
              - …
            - `function` OpenAIFunction
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelCalendarAvailabilityToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.calendar.availability.check', required — The type of tool. "gohighlevel.calendar.availability.check" for GoHighLevel Calendar Availability Check tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelCalendarEventCreateToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.calendar.event.create', required — The type of tool. "gohighlevel.calendar.event.create" for GoHighLevel Calendar Event Create tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelContactCreateToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.contact.create', required — The type of tool. "gohighlevel.contact.create" for GoHighLevel Contact Create tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelContactGetToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.contact.get', required — The type of tool. "gohighlevel.contact.get" for GoHighLevel Contact Get tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoogleCalendarCheckAvailabilityToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'google.calendar.availability.check', required — The type of tool. "google.calendar.availability.check" for Google Calendar Check Availability tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoogleCalendarCreateEventToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'google.calendar.event.create', required — The type of tool. "google.calendar.event.create" for Google Calendar Create Event tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoogleSheetsRowAppendToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'google.sheets.row.append', required — The type of tool. "google.sheets.row.append" for Google Sheets Row Append tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateHandoffToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'handoff', required — This is the type of the tool. When you're using handoff tool, we recommend adding this to your system prompt --- # System context You are part of a multi-agent system designed to make agent coordination and execution easy. Agents uses two primary abstraction: **Agents** and **Handoffs**. An agent encompasses instructions and tools and can hand off a conversation to another agent when appropriate. Handoffs are achieved by calling a handoff function, generally named `handoff_to_<agent_name>`. Handoffs between agents are handled seamlessly in the background; do not mention or draw attention to these handoffs in your conversation with the user. # Agent context {put your agent system prompt here} ---
            - `destinations` union[] — These are the destinations that the call can be handed off to. Usage: 1. Single destination Use `assistantId` to handoff the call to a saved assistant, or `assistantName` to handoff the call to an assistant in the same squad. ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-123", // or "assistantName": "Assistant123" "description": "customer wants to be handed off to assistant-123", "contextEngineeringPlan": { "type": "all" } } ], } ] } ``` 2. Multiple destinations 2.1. Multiple Tools, Each With One Destination (OpenAI recommended) ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-123", "description": "customer wants to be handed off to assistant-123", "contextEngineeringPlan": { "type": "all" } }, ], }, { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-456", "description": "customer wants to be handed off to assistant-456", "contextEngineeringPlan": { "type": "all" } } ], } ] } ``` 2.2. One Tool, Multiple Destinations (Anthropic recommended) ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-123", "description": "customer wants to be handed off to assistant-123", "contextEngineeringPlan": { "type": "all" } }, { "type": "assistant", "assistantId": "assistant-456", "description": "customer wants to be handed off to assistant-456", "contextEngineeringPlan": { "type": "all" } } ], } ] } ``` 3. Dynamic destination 3.1 To determine the destination dynamically, supply a `dynamic` handoff destination type and a `server` object. VAPI will send a handoff-destination-request webhook to the `server.url`. The response from the server will be used as the destination (if valid). ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "dynamic", "server": { "url": "https://example.com" } } ], } ] } ``` 3.2. To pass custom parameters to the server, you can use the `function` object. ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "dynamic", "server": { "url": "https://example.com" }, } ], "function": { "name": "handoff", "description": "Call this function when the customer is ready to be handed off to the next assistant", "parameters": { "type": "object", "properties": { "destination": { "type": "string", "description": "Use dynamic when customer is ready to be handed off to the next assistant", "enum": ["dynamic"] }, "customerAreaCode": { "type": "number", "description": "Area code of the customer" }, "customerIntent": { "type": "string", "enum": ["new-customer", "existing-customer"], "description": "Use new-customer when customer is a new customer, existing-customer when customer is an existing customer" }, "customerSentiment": { "type": "string", "enum": ["positive", "negative", "neutral"], "description": "Use positive when customer is happy, negative when customer is unhappy, neutral when customer is neutral" } } } } } ] } ``` The properties `customerAreaCode`, `customerIntent`, and `customerSentiment` will be passed to the server in the webhook request body.
              - …
            - `function` OpenAIFunction
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateMcpToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'mcp', required — The type of tool. "mcp" for MCP tool.
            - `server` Server
              - …
            - `metadata` McpToolMetadata
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateQueryToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'query', required — The type of tool. "query" for Query tool.
            - `knowledgeBases` KnowledgeBase[] — The knowledge bases to query
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateSlackSendMessageToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'slack.message.send', required — The type of tool. "slack.message.send" for Slack Send Message tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateSmsToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'sms', required — The type of tool. "sms" for Twilio SMS sending tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateTextEditorToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'textEditor', required — The type of tool. "textEditor" for Text Editor tool.
            - `subType` 'text_editor_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'str_replace_editor', required — The name of the tool, fixed to 'str_replace_editor'
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateTransferCallToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'transferCall', required
            - `destinations` union[] — 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.
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
      - `toolIds` string[] — These are the tools that the assistant can use during the call. To use transient tools, use `tools`. Both `tools` and `toolIds` can be used together.
      - `knowledgeBase` CreateCustomKnowledgeBaseDTO
        - `provider` 'custom-knowledge-base', required — This knowledge base is bring your own knowledge base implementation.
        - `server` Server, required
          - `timeoutSeconds` number — This is the timeout in seconds for the request. Defaults to 20 seconds. @default 20
          - `credentialId` string — The credential ID for server authentication
          - `staticIpAddressesEnabled` boolean — If enabled, requests will originate from a static set of IPs owned and managed by Vapi. @default false
          - `encryptedPaths` string[] — This is the paths to encrypt in the request body if credentialId and encryptionPlan are defined.
          - `url` string — This is where the request will be sent.
          - `headers` object — These are the headers to include in the request. Each key-value pair represents a header name and its value. Note: Specifying an Authorization header here will override the authorization provided by the `credentialId` (if provided). This is an anti-pattern and should be avoided outside of edge case scenarios.
          - `backoffPlan` BackoffPlan
            - `type` object, required — This is the type of backoff plan to use. Defaults to fixed. @default fixed
            - `maxRetries` number, required — This is the maximum number of retries to attempt if the request fails. Defaults to 0 (no retries). @default 0
            - `baseDelaySeconds` number, required — This is the base delay in seconds. For linear backoff, this is the delay between each retry. For exponential backoff, this is the initial delay.
            - `excludedStatusCodes` object[] — This is the excluded status codes. If the response status code is in this list, the request will not be retried. By default, the request will be retried for any non-2xx status code.
              - …
      - `model` 'llama3.1-8b' | 'llama-3.3-70b', required — This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b
      - `provider` 'cerebras', required
      - `temperature` number — This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
      - `maxTokens` number — This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
      - `emotionRecognitionEnabled` boolean — This determines whether we detect user's emotion while they speak and send it as an additional info to model. Default `false` because the model is usually are good at understanding the user's emotion from text. @default false
      - `numFastTurns` number — This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai. Default is 0. @default 0
    - CustomLLMModel
      - `messages` OpenAIMessage[] — This is the starting state for the conversation.
        - `content` string, nullable, required
        - `role` 'assistant' | 'function' | 'user' | 'system' | 'tool', required
      - `tools` union[] — These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. Both `tools` and `toolIds` can be used together.
        - union
          - CreateApiRequestToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'apiRequest', required — The type of tool. "apiRequest" for API request tool.
            - `method` 'POST' | 'GET' | 'PUT' | 'PATCH' | 'DELETE', required
            - `timeoutSeconds` number — This is the timeout in seconds for the request. Defaults to 20 seconds. @default 20
            - `credentialId` string — The credential ID for API request authentication
            - `encryptedPaths` string[] — This is the paths to encrypt in the request body if credentialId and encryptionPlan are defined.
            - `name` string — This is the name of the tool. This will be passed to the model. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40.
            - `description` string — This is the description of the tool. This will be passed to the model.
            - `url` string, required — This is where the request will be sent.
            - `body` JsonSchema
              - …
            - `headers` JsonSchema
              - …
            - `backoffPlan` BackoffPlan
              - …
            - `variableExtractionPlan` VariableExtractionPlan
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateBashToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'bash', required — The type of tool. "bash" for Bash tool.
            - `subType` 'bash_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'bash', required — The name of the tool, fixed to 'bash'
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateCodeToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'code', required — The type of tool. "code" for Code tool.
            - `async` boolean — This determines if the tool is async. If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. Defaults to synchronous (`false`).
            - `server` Server
              - …
            - `code` string, required — TypeScript code to execute when the tool is called
            - `environmentVariables` CodeToolEnvironmentVariable[] — Environment variables available in code via `env` object
              - …
            - `timeoutSeconds` number — This is the timeout in seconds for the code execution. Defaults to 10 seconds. Maximum is 30 seconds to prevent abuse. @default 10
            - `credentialId` string — Credential ID containing the Val Town API key
            - `variableExtractionPlan` VariableExtractionPlan
              - …
            - `function` OpenAIFunction
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateComputerToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'computer', required — The type of tool. "computer" for Computer tool.
            - `subType` 'computer_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'computer', required — The name of the tool, fixed to 'computer'
            - `displayWidthPx` number, required — The display width in pixels
            - `displayHeightPx` number, required — The display height in pixels
            - `displayNumber` number — Optional display number
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateDtmfToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'dtmf', required — The type of tool. "dtmf" for DTMF tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateEndCallToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'endCall', required — The type of tool. "endCall" for End Call tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateFunctionToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'function', required — The type of tool. "function" for Function tool.
            - `async` boolean — This determines if the tool is async. If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. Defaults to synchronous (`false`).
            - `server` Server
              - …
            - `function` OpenAIFunction
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelCalendarAvailabilityToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.calendar.availability.check', required — The type of tool. "gohighlevel.calendar.availability.check" for GoHighLevel Calendar Availability Check tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelCalendarEventCreateToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.calendar.event.create', required — The type of tool. "gohighlevel.calendar.event.create" for GoHighLevel Calendar Event Create tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelContactCreateToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.contact.create', required — The type of tool. "gohighlevel.contact.create" for GoHighLevel Contact Create tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelContactGetToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.contact.get', required — The type of tool. "gohighlevel.contact.get" for GoHighLevel Contact Get tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoogleCalendarCheckAvailabilityToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'google.calendar.availability.check', required — The type of tool. "google.calendar.availability.check" for Google Calendar Check Availability tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoogleCalendarCreateEventToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'google.calendar.event.create', required — The type of tool. "google.calendar.event.create" for Google Calendar Create Event tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoogleSheetsRowAppendToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'google.sheets.row.append', required — The type of tool. "google.sheets.row.append" for Google Sheets Row Append tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateHandoffToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'handoff', required — This is the type of the tool. When you're using handoff tool, we recommend adding this to your system prompt --- # System context You are part of a multi-agent system designed to make agent coordination and execution easy. Agents uses two primary abstraction: **Agents** and **Handoffs**. An agent encompasses instructions and tools and can hand off a conversation to another agent when appropriate. Handoffs are achieved by calling a handoff function, generally named `handoff_to_<agent_name>`. Handoffs between agents are handled seamlessly in the background; do not mention or draw attention to these handoffs in your conversation with the user. # Agent context {put your agent system prompt here} ---
            - `destinations` union[] — These are the destinations that the call can be handed off to. Usage: 1. Single destination Use `assistantId` to handoff the call to a saved assistant, or `assistantName` to handoff the call to an assistant in the same squad. ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-123", // or "assistantName": "Assistant123" "description": "customer wants to be handed off to assistant-123", "contextEngineeringPlan": { "type": "all" } } ], } ] } ``` 2. Multiple destinations 2.1. Multiple Tools, Each With One Destination (OpenAI recommended) ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-123", "description": "customer wants to be handed off to assistant-123", "contextEngineeringPlan": { "type": "all" } }, ], }, { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-456", "description": "customer wants to be handed off to assistant-456", "contextEngineeringPlan": { "type": "all" } } ], } ] } ``` 2.2. One Tool, Multiple Destinations (Anthropic recommended) ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-123", "description": "customer wants to be handed off to assistant-123", "contextEngineeringPlan": { "type": "all" } }, { "type": "assistant", "assistantId": "assistant-456", "description": "customer wants to be handed off to assistant-456", "contextEngineeringPlan": { "type": "all" } } ], } ] } ``` 3. Dynamic destination 3.1 To determine the destination dynamically, supply a `dynamic` handoff destination type and a `server` object. VAPI will send a handoff-destination-request webhook to the `server.url`. The response from the server will be used as the destination (if valid). ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "dynamic", "server": { "url": "https://example.com" } } ], } ] } ``` 3.2. To pass custom parameters to the server, you can use the `function` object. ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "dynamic", "server": { "url": "https://example.com" }, } ], "function": { "name": "handoff", "description": "Call this function when the customer is ready to be handed off to the next assistant", "parameters": { "type": "object", "properties": { "destination": { "type": "string", "description": "Use dynamic when customer is ready to be handed off to the next assistant", "enum": ["dynamic"] }, "customerAreaCode": { "type": "number", "description": "Area code of the customer" }, "customerIntent": { "type": "string", "enum": ["new-customer", "existing-customer"], "description": "Use new-customer when customer is a new customer, existing-customer when customer is an existing customer" }, "customerSentiment": { "type": "string", "enum": ["positive", "negative", "neutral"], "description": "Use positive when customer is happy, negative when customer is unhappy, neutral when customer is neutral" } } } } } ] } ``` The properties `customerAreaCode`, `customerIntent`, and `customerSentiment` will be passed to the server in the webhook request body.
              - …
            - `function` OpenAIFunction
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateMcpToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'mcp', required — The type of tool. "mcp" for MCP tool.
            - `server` Server
              - …
            - `metadata` McpToolMetadata
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateQueryToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'query', required — The type of tool. "query" for Query tool.
            - `knowledgeBases` KnowledgeBase[] — The knowledge bases to query
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateSlackSendMessageToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'slack.message.send', required — The type of tool. "slack.message.send" for Slack Send Message tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateSmsToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'sms', required — The type of tool. "sms" for Twilio SMS sending tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateTextEditorToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'textEditor', required — The type of tool. "textEditor" for Text Editor tool.
            - `subType` 'text_editor_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'str_replace_editor', required — The name of the tool, fixed to 'str_replace_editor'
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateTransferCallToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'transferCall', required
            - `destinations` union[] — 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.
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
      - `toolIds` string[] — These are the tools that the assistant can use during the call. To use transient tools, use `tools`. Both `tools` and `toolIds` can be used together.
      - `knowledgeBase` CreateCustomKnowledgeBaseDTO
        - `provider` 'custom-knowledge-base', required — This knowledge base is bring your own knowledge base implementation.
        - `server` Server, required
          - `timeoutSeconds` number — This is the timeout in seconds for the request. Defaults to 20 seconds. @default 20
          - `credentialId` string — The credential ID for server authentication
          - `staticIpAddressesEnabled` boolean — If enabled, requests will originate from a static set of IPs owned and managed by Vapi. @default false
          - `encryptedPaths` string[] — This is the paths to encrypt in the request body if credentialId and encryptionPlan are defined.
          - `url` string — This is where the request will be sent.
          - `headers` object — These are the headers to include in the request. Each key-value pair represents a header name and its value. Note: Specifying an Authorization header here will override the authorization provided by the `credentialId` (if provided). This is an anti-pattern and should be avoided outside of edge case scenarios.
          - `backoffPlan` BackoffPlan
            - `type` object, required — This is the type of backoff plan to use. Defaults to fixed. @default fixed
            - `maxRetries` number, required — This is the maximum number of retries to attempt if the request fails. Defaults to 0 (no retries). @default 0
            - `baseDelaySeconds` number, required — This is the base delay in seconds. For linear backoff, this is the delay between each retry. For exponential backoff, this is the initial delay.
            - `excludedStatusCodes` object[] — This is the excluded status codes. If the response status code is in this list, the request will not be retried. By default, the request will be retried for any non-2xx status code.
              - …
      - `provider` 'custom-llm', required — This is the provider that will be used for the model. Any service, including your own server, that is compatible with the OpenAI API can be used.
      - `metadataSendMode` 'off' | 'variable' | 'destructured' — This determines whether metadata is sent in requests to the custom provider. - `off` will not send any metadata. payload will look like `{ messages }` - `variable` will send `assistant.metadata` as a variable on the payload. payload will look like `{ messages, metadata }` - `destructured` will send `assistant.metadata` fields directly on the payload. payload will look like `{ messages, ...metadata }` Further, `variable` and `destructured` will send `call`, `phoneNumber`, and `customer` objects in the payload. Default is `variable`.
      - `headers` object — Custom headers to send with requests. These headers can override default OpenAI headers except for Authorization (which should be specified using a custom-llm credential).
      - `url` string, required — These is the URL we'll use for the OpenAI client's `baseURL`. Ex. https://openrouter.ai/api/v1
      - `wordLevelConfidenceEnabled` boolean — This determines whether the transcriber's word level confidence is sent in requests to the custom provider. Default is false. This only works for Deepgram transcribers.
      - `timeoutSeconds` number — This sets the timeout for the connection to the custom provider without needing to stream any tokens back. Default is 20 seconds.
      - `model` string, required — This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b
      - `temperature` number — This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
      - `maxTokens` number — This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
      - `emotionRecognitionEnabled` boolean — This determines whether we detect user's emotion while they speak and send it as an additional info to model. Default `false` because the model is usually are good at understanding the user's emotion from text. @default false
      - `numFastTurns` number — This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai. Default is 0. @default 0
    - DeepInfraModel
      - `messages` OpenAIMessage[] — This is the starting state for the conversation.
        - `content` string, nullable, required
        - `role` 'assistant' | 'function' | 'user' | 'system' | 'tool', required
      - `tools` union[] — These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. Both `tools` and `toolIds` can be used together.
        - union
          - CreateApiRequestToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'apiRequest', required — The type of tool. "apiRequest" for API request tool.
            - `method` 'POST' | 'GET' | 'PUT' | 'PATCH' | 'DELETE', required
            - `timeoutSeconds` number — This is the timeout in seconds for the request. Defaults to 20 seconds. @default 20
            - `credentialId` string — The credential ID for API request authentication
            - `encryptedPaths` string[] — This is the paths to encrypt in the request body if credentialId and encryptionPlan are defined.
            - `name` string — This is the name of the tool. This will be passed to the model. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40.
            - `description` string — This is the description of the tool. This will be passed to the model.
            - `url` string, required — This is where the request will be sent.
            - `body` JsonSchema
              - …
            - `headers` JsonSchema
              - …
            - `backoffPlan` BackoffPlan
              - …
            - `variableExtractionPlan` VariableExtractionPlan
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateBashToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'bash', required — The type of tool. "bash" for Bash tool.
            - `subType` 'bash_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'bash', required — The name of the tool, fixed to 'bash'
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateCodeToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'code', required — The type of tool. "code" for Code tool.
            - `async` boolean — This determines if the tool is async. If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. Defaults to synchronous (`false`).
            - `server` Server
              - …
            - `code` string, required — TypeScript code to execute when the tool is called
            - `environmentVariables` CodeToolEnvironmentVariable[] — Environment variables available in code via `env` object
              - …
            - `timeoutSeconds` number — This is the timeout in seconds for the code execution. Defaults to 10 seconds. Maximum is 30 seconds to prevent abuse. @default 10
            - `credentialId` string — Credential ID containing the Val Town API key
            - `variableExtractionPlan` VariableExtractionPlan
              - …
            - `function` OpenAIFunction
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateComputerToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'computer', required — The type of tool. "computer" for Computer tool.
            - `subType` 'computer_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'computer', required — The name of the tool, fixed to 'computer'
            - `displayWidthPx` number, required — The display width in pixels
            - `displayHeightPx` number, required — The display height in pixels
            - `displayNumber` number — Optional display number
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateDtmfToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'dtmf', required — The type of tool. "dtmf" for DTMF tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateEndCallToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'endCall', required — The type of tool. "endCall" for End Call tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateFunctionToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'function', required — The type of tool. "function" for Function tool.
            - `async` boolean — This determines if the tool is async. If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. Defaults to synchronous (`false`).
            - `server` Server
              - …
            - `function` OpenAIFunction
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelCalendarAvailabilityToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.calendar.availability.check', required — The type of tool. "gohighlevel.calendar.availability.check" for GoHighLevel Calendar Availability Check tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelCalendarEventCreateToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.calendar.event.create', required — The type of tool. "gohighlevel.calendar.event.create" for GoHighLevel Calendar Event Create tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelContactCreateToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.contact.create', required — The type of tool. "gohighlevel.contact.create" for GoHighLevel Contact Create tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelContactGetToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.contact.get', required — The type of tool. "gohighlevel.contact.get" for GoHighLevel Contact Get tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoogleCalendarCheckAvailabilityToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'google.calendar.availability.check', required — The type of tool. "google.calendar.availability.check" for Google Calendar Check Availability tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoogleCalendarCreateEventToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'google.calendar.event.create', required — The type of tool. "google.calendar.event.create" for Google Calendar Create Event tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoogleSheetsRowAppendToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'google.sheets.row.append', required — The type of tool. "google.sheets.row.append" for Google Sheets Row Append tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateHandoffToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'handoff', required — This is the type of the tool. When you're using handoff tool, we recommend adding this to your system prompt --- # System context You are part of a multi-agent system designed to make agent coordination and execution easy. Agents uses two primary abstraction: **Agents** and **Handoffs**. An agent encompasses instructions and tools and can hand off a conversation to another agent when appropriate. Handoffs are achieved by calling a handoff function, generally named `handoff_to_<agent_name>`. Handoffs between agents are handled seamlessly in the background; do not mention or draw attention to these handoffs in your conversation with the user. # Agent context {put your agent system prompt here} ---
            - `destinations` union[] — These are the destinations that the call can be handed off to. Usage: 1. Single destination Use `assistantId` to handoff the call to a saved assistant, or `assistantName` to handoff the call to an assistant in the same squad. ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-123", // or "assistantName": "Assistant123" "description": "customer wants to be handed off to assistant-123", "contextEngineeringPlan": { "type": "all" } } ], } ] } ``` 2. Multiple destinations 2.1. Multiple Tools, Each With One Destination (OpenAI recommended) ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-123", "description": "customer wants to be handed off to assistant-123", "contextEngineeringPlan": { "type": "all" } }, ], }, { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-456", "description": "customer wants to be handed off to assistant-456", "contextEngineeringPlan": { "type": "all" } } ], } ] } ``` 2.2. One Tool, Multiple Destinations (Anthropic recommended) ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-123", "description": "customer wants to be handed off to assistant-123", "contextEngineeringPlan": { "type": "all" } }, { "type": "assistant", "assistantId": "assistant-456", "description": "customer wants to be handed off to assistant-456", "contextEngineeringPlan": { "type": "all" } } ], } ] } ``` 3. Dynamic destination 3.1 To determine the destination dynamically, supply a `dynamic` handoff destination type and a `server` object. VAPI will send a handoff-destination-request webhook to the `server.url`. The response from the server will be used as the destination (if valid). ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "dynamic", "server": { "url": "https://example.com" } } ], } ] } ``` 3.2. To pass custom parameters to the server, you can use the `function` object. ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "dynamic", "server": { "url": "https://example.com" }, } ], "function": { "name": "handoff", "description": "Call this function when the customer is ready to be handed off to the next assistant", "parameters": { "type": "object", "properties": { "destination": { "type": "string", "description": "Use dynamic when customer is ready to be handed off to the next assistant", "enum": ["dynamic"] }, "customerAreaCode": { "type": "number", "description": "Area code of the customer" }, "customerIntent": { "type": "string", "enum": ["new-customer", "existing-customer"], "description": "Use new-customer when customer is a new customer, existing-customer when customer is an existing customer" }, "customerSentiment": { "type": "string", "enum": ["positive", "negative", "neutral"], "description": "Use positive when customer is happy, negative when customer is unhappy, neutral when customer is neutral" } } } } } ] } ``` The properties `customerAreaCode`, `customerIntent`, and `customerSentiment` will be passed to the server in the webhook request body.
              - …
            - `function` OpenAIFunction
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateMcpToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'mcp', required — The type of tool. "mcp" for MCP tool.
            - `server` Server
              - …
            - `metadata` McpToolMetadata
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateQueryToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'query', required — The type of tool. "query" for Query tool.
            - `knowledgeBases` KnowledgeBase[] — The knowledge bases to query
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateSlackSendMessageToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'slack.message.send', required — The type of tool. "slack.message.send" for Slack Send Message tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateSmsToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'sms', required — The type of tool. "sms" for Twilio SMS sending tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateTextEditorToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'textEditor', required — The type of tool. "textEditor" for Text Editor tool.
            - `subType` 'text_editor_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'str_replace_editor', required — The name of the tool, fixed to 'str_replace_editor'
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateTransferCallToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'transferCall', required
            - `destinations` union[] — 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.
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
      - `toolIds` string[] — These are the tools that the assistant can use during the call. To use transient tools, use `tools`. Both `tools` and `toolIds` can be used together.
      - `knowledgeBase` CreateCustomKnowledgeBaseDTO
        - `provider` 'custom-knowledge-base', required — This knowledge base is bring your own knowledge base implementation.
        - `server` Server, required
          - `timeoutSeconds` number — This is the timeout in seconds for the request. Defaults to 20 seconds. @default 20
          - `credentialId` string — The credential ID for server authentication
          - `staticIpAddressesEnabled` boolean — If enabled, requests will originate from a static set of IPs owned and managed by Vapi. @default false
          - `encryptedPaths` string[] — This is the paths to encrypt in the request body if credentialId and encryptionPlan are defined.
          - `url` string — This is where the request will be sent.
          - `headers` object — These are the headers to include in the request. Each key-value pair represents a header name and its value. Note: Specifying an Authorization header here will override the authorization provided by the `credentialId` (if provided). This is an anti-pattern and should be avoided outside of edge case scenarios.
          - `backoffPlan` BackoffPlan
            - `type` object, required — This is the type of backoff plan to use. Defaults to fixed. @default fixed
            - `maxRetries` number, required — This is the maximum number of retries to attempt if the request fails. Defaults to 0 (no retries). @default 0
            - `baseDelaySeconds` number, required — This is the base delay in seconds. For linear backoff, this is the delay between each retry. For exponential backoff, this is the initial delay.
            - `excludedStatusCodes` object[] — This is the excluded status codes. If the response status code is in this list, the request will not be retried. By default, the request will be retried for any non-2xx status code.
              - …
      - `provider` 'deepinfra', required
      - `model` string, required — This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b
      - `temperature` number — This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
      - `maxTokens` number — This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
      - `emotionRecognitionEnabled` boolean — This determines whether we detect user's emotion while they speak and send it as an additional info to model. Default `false` because the model is usually are good at understanding the user's emotion from text. @default false
      - `numFastTurns` number — This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai. Default is 0. @default 0
    - DeepSeekModel
      - `messages` OpenAIMessage[] — This is the starting state for the conversation.
        - `content` string, nullable, required
        - `role` 'assistant' | 'function' | 'user' | 'system' | 'tool', required
      - `tools` union[] — These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. Both `tools` and `toolIds` can be used together.
        - union
          - CreateApiRequestToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'apiRequest', required — The type of tool. "apiRequest" for API request tool.
            - `method` 'POST' | 'GET' | 'PUT' | 'PATCH' | 'DELETE', required
            - `timeoutSeconds` number — This is the timeout in seconds for the request. Defaults to 20 seconds. @default 20
            - `credentialId` string — The credential ID for API request authentication
            - `encryptedPaths` string[] — This is the paths to encrypt in the request body if credentialId and encryptionPlan are defined.
            - `name` string — This is the name of the tool. This will be passed to the model. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40.
            - `description` string — This is the description of the tool. This will be passed to the model.
            - `url` string, required — This is where the request will be sent.
            - `body` JsonSchema
              - …
            - `headers` JsonSchema
              - …
            - `backoffPlan` BackoffPlan
              - …
            - `variableExtractionPlan` VariableExtractionPlan
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateBashToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'bash', required — The type of tool. "bash" for Bash tool.
            - `subType` 'bash_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'bash', required — The name of the tool, fixed to 'bash'
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateCodeToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'code', required — The type of tool. "code" for Code tool.
            - `async` boolean — This determines if the tool is async. If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. Defaults to synchronous (`false`).
            - `server` Server
              - …
            - `code` string, required — TypeScript code to execute when the tool is called
            - `environmentVariables` CodeToolEnvironmentVariable[] — Environment variables available in code via `env` object
              - …
            - `timeoutSeconds` number — This is the timeout in seconds for the code execution. Defaults to 10 seconds. Maximum is 30 seconds to prevent abuse. @default 10
            - `credentialId` string — Credential ID containing the Val Town API key
            - `variableExtractionPlan` VariableExtractionPlan
              - …
            - `function` OpenAIFunction
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateComputerToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'computer', required — The type of tool. "computer" for Computer tool.
            - `subType` 'computer_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'computer', required — The name of the tool, fixed to 'computer'
            - `displayWidthPx` number, required — The display width in pixels
            - `displayHeightPx` number, required — The display height in pixels
            - `displayNumber` number — Optional display number
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateDtmfToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'dtmf', required — The type of tool. "dtmf" for DTMF tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateEndCallToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'endCall', required — The type of tool. "endCall" for End Call tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateFunctionToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'function', required — The type of tool. "function" for Function tool.
            - `async` boolean — This determines if the tool is async. If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. Defaults to synchronous (`false`).
            - `server` Server
              - …
            - `function` OpenAIFunction
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelCalendarAvailabilityToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.calendar.availability.check', required — The type of tool. "gohighlevel.calendar.availability.check" for GoHighLevel Calendar Availability Check tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelCalendarEventCreateToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.calendar.event.create', required — The type of tool. "gohighlevel.calendar.event.create" for GoHighLevel Calendar Event Create tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelContactCreateToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.contact.create', required — The type of tool. "gohighlevel.contact.create" for GoHighLevel Contact Create tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelContactGetToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.contact.get', required — The type of tool. "gohighlevel.contact.get" for GoHighLevel Contact Get tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoogleCalendarCheckAvailabilityToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'google.calendar.availability.check', required — The type of tool. "google.calendar.availability.check" for Google Calendar Check Availability tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoogleCalendarCreateEventToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'google.calendar.event.create', required — The type of tool. "google.calendar.event.create" for Google Calendar Create Event tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoogleSheetsRowAppendToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'google.sheets.row.append', required — The type of tool. "google.sheets.row.append" for Google Sheets Row Append tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateHandoffToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'handoff', required — This is the type of the tool. When you're using handoff tool, we recommend adding this to your system prompt --- # System context You are part of a multi-agent system designed to make agent coordination and execution easy. Agents uses two primary abstraction: **Agents** and **Handoffs**. An agent encompasses instructions and tools and can hand off a conversation to another agent when appropriate. Handoffs are achieved by calling a handoff function, generally named `handoff_to_<agent_name>`. Handoffs between agents are handled seamlessly in the background; do not mention or draw attention to these handoffs in your conversation with the user. # Agent context {put your agent system prompt here} ---
            - `destinations` union[] — These are the destinations that the call can be handed off to. Usage: 1. Single destination Use `assistantId` to handoff the call to a saved assistant, or `assistantName` to handoff the call to an assistant in the same squad. ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-123", // or "assistantName": "Assistant123" "description": "customer wants to be handed off to assistant-123", "contextEngineeringPlan": { "type": "all" } } ], } ] } ``` 2. Multiple destinations 2.1. Multiple Tools, Each With One Destination (OpenAI recommended) ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-123", "description": "customer wants to be handed off to assistant-123", "contextEngineeringPlan": { "type": "all" } }, ], }, { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-456", "description": "customer wants to be handed off to assistant-456", "contextEngineeringPlan": { "type": "all" } } ], } ] } ``` 2.2. One Tool, Multiple Destinations (Anthropic recommended) ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-123", "description": "customer wants to be handed off to assistant-123", "contextEngineeringPlan": { "type": "all" } }, { "type": "assistant", "assistantId": "assistant-456", "description": "customer wants to be handed off to assistant-456", "contextEngineeringPlan": { "type": "all" } } ], } ] } ``` 3. Dynamic destination 3.1 To determine the destination dynamically, supply a `dynamic` handoff destination type and a `server` object. VAPI will send a handoff-destination-request webhook to the `server.url`. The response from the server will be used as the destination (if valid). ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "dynamic", "server": { "url": "https://example.com" } } ], } ] } ``` 3.2. To pass custom parameters to the server, you can use the `function` object. ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "dynamic", "server": { "url": "https://example.com" }, } ], "function": { "name": "handoff", "description": "Call this function when the customer is ready to be handed off to the next assistant", "parameters": { "type": "object", "properties": { "destination": { "type": "string", "description": "Use dynamic when customer is ready to be handed off to the next assistant", "enum": ["dynamic"] }, "customerAreaCode": { "type": "number", "description": "Area code of the customer" }, "customerIntent": { "type": "string", "enum": ["new-customer", "existing-customer"], "description": "Use new-customer when customer is a new customer, existing-customer when customer is an existing customer" }, "customerSentiment": { "type": "string", "enum": ["positive", "negative", "neutral"], "description": "Use positive when customer is happy, negative when customer is unhappy, neutral when customer is neutral" } } } } } ] } ``` The properties `customerAreaCode`, `customerIntent`, and `customerSentiment` will be passed to the server in the webhook request body.
              - …
            - `function` OpenAIFunction
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateMcpToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'mcp', required — The type of tool. "mcp" for MCP tool.
            - `server` Server
              - …
            - `metadata` McpToolMetadata
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateQueryToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'query', required — The type of tool. "query" for Query tool.
            - `knowledgeBases` KnowledgeBase[] — The knowledge bases to query
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateSlackSendMessageToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'slack.message.send', required — The type of tool. "slack.message.send" for Slack Send Message tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateSmsToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'sms', required — The type of tool. "sms" for Twilio SMS sending tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateTextEditorToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'textEditor', required — The type of tool. "textEditor" for Text Editor tool.
            - `subType` 'text_editor_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'str_replace_editor', required — The name of the tool, fixed to 'str_replace_editor'
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateTransferCallToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'transferCall', required
            - `destinations` union[] — 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.
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
      - `toolIds` string[] — These are the tools that the assistant can use during the call. To use transient tools, use `tools`. Both `tools` and `toolIds` can be used together.
      - `knowledgeBase` CreateCustomKnowledgeBaseDTO
        - `provider` 'custom-knowledge-base', required — This knowledge base is bring your own knowledge base implementation.
        - `server` Server, required
          - `timeoutSeconds` number — This is the timeout in seconds for the request. Defaults to 20 seconds. @default 20
          - `credentialId` string — The credential ID for server authentication
          - `staticIpAddressesEnabled` boolean — If enabled, requests will originate from a static set of IPs owned and managed by Vapi. @default false
          - `encryptedPaths` string[] — This is the paths to encrypt in the request body if credentialId and encryptionPlan are defined.
          - `url` string — This is where the request will be sent.
          - `headers` object — These are the headers to include in the request. Each key-value pair represents a header name and its value. Note: Specifying an Authorization header here will override the authorization provided by the `credentialId` (if provided). This is an anti-pattern and should be avoided outside of edge case scenarios.
          - `backoffPlan` BackoffPlan
            - `type` object, required — This is the type of backoff plan to use. Defaults to fixed. @default fixed
            - `maxRetries` number, required — This is the maximum number of retries to attempt if the request fails. Defaults to 0 (no retries). @default 0
            - `baseDelaySeconds` number, required — This is the base delay in seconds. For linear backoff, this is the delay between each retry. For exponential backoff, this is the initial delay.
            - `excludedStatusCodes` object[] — This is the excluded status codes. If the response status code is in this list, the request will not be retried. By default, the request will be retried for any non-2xx status code.
              - …
      - `model` 'deepseek-chat' | 'deepseek-reasoner', required — This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b
      - `provider` 'deep-seek', required
      - `temperature` number — This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
      - `maxTokens` number — This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
      - `emotionRecognitionEnabled` boolean — This determines whether we detect user's emotion while they speak and send it as an additional info to model. Default `false` because the model is usually are good at understanding the user's emotion from text. @default false
      - `numFastTurns` number — This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai. Default is 0. @default 0
    - GoogleModel
      - `messages` OpenAIMessage[] — This is the starting state for the conversation.
        - `content` string, nullable, required
        - `role` 'assistant' | 'function' | 'user' | 'system' | 'tool', required
      - `tools` union[] — These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. Both `tools` and `toolIds` can be used together.
        - union
          - CreateApiRequestToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'apiRequest', required — The type of tool. "apiRequest" for API request tool.
            - `method` 'POST' | 'GET' | 'PUT' | 'PATCH' | 'DELETE', required
            - `timeoutSeconds` number — This is the timeout in seconds for the request. Defaults to 20 seconds. @default 20
            - `credentialId` string — The credential ID for API request authentication
            - `encryptedPaths` string[] — This is the paths to encrypt in the request body if credentialId and encryptionPlan are defined.
            - `name` string — This is the name of the tool. This will be passed to the model. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40.
            - `description` string — This is the description of the tool. This will be passed to the model.
            - `url` string, required — This is where the request will be sent.
            - `body` JsonSchema
              - …
            - `headers` JsonSchema
              - …
            - `backoffPlan` BackoffPlan
              - …
            - `variableExtractionPlan` VariableExtractionPlan
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateBashToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'bash', required — The type of tool. "bash" for Bash tool.
            - `subType` 'bash_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'bash', required — The name of the tool, fixed to 'bash'
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateCodeToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'code', required — The type of tool. "code" for Code tool.
            - `async` boolean — This determines if the tool is async. If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. Defaults to synchronous (`false`).
            - `server` Server
              - …
            - `code` string, required — TypeScript code to execute when the tool is called
            - `environmentVariables` CodeToolEnvironmentVariable[] — Environment variables available in code via `env` object
              - …
            - `timeoutSeconds` number — This is the timeout in seconds for the code execution. Defaults to 10 seconds. Maximum is 30 seconds to prevent abuse. @default 10
            - `credentialId` string — Credential ID containing the Val Town API key
            - `variableExtractionPlan` VariableExtractionPlan
              - …
            - `function` OpenAIFunction
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateComputerToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'computer', required — The type of tool. "computer" for Computer tool.
            - `subType` 'computer_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'computer', required — The name of the tool, fixed to 'computer'
            - `displayWidthPx` number, required — The display width in pixels
            - `displayHeightPx` number, required — The display height in pixels
            - `displayNumber` number — Optional display number
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateDtmfToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'dtmf', required — The type of tool. "dtmf" for DTMF tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateEndCallToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'endCall', required — The type of tool. "endCall" for End Call tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateFunctionToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'function', required — The type of tool. "function" for Function tool.
            - `async` boolean — This determines if the tool is async. If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. Defaults to synchronous (`false`).
            - `server` Server
              - …
            - `function` OpenAIFunction
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelCalendarAvailabilityToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.calendar.availability.check', required — The type of tool. "gohighlevel.calendar.availability.check" for GoHighLevel Calendar Availability Check tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelCalendarEventCreateToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.calendar.event.create', required — The type of tool. "gohighlevel.calendar.event.create" for GoHighLevel Calendar Event Create tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelContactCreateToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.contact.create', required — The type of tool. "gohighlevel.contact.create" for GoHighLevel Contact Create tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoHighLevelContactGetToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'gohighlevel.contact.get', required — The type of tool. "gohighlevel.contact.get" for GoHighLevel Contact Get tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoogleCalendarCheckAvailabilityToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'google.calendar.availability.check', required — The type of tool. "google.calendar.availability.check" for Google Calendar Check Availability tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoogleCalendarCreateEventToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'google.calendar.event.create', required — The type of tool. "google.calendar.event.create" for Google Calendar Create Event tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateGoogleSheetsRowAppendToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'google.sheets.row.append', required — The type of tool. "google.sheets.row.append" for Google Sheets Row Append tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateHandoffToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'handoff', required — This is the type of the tool. When you're using handoff tool, we recommend adding this to your system prompt --- # System context You are part of a multi-agent system designed to make agent coordination and execution easy. Agents uses two primary abstraction: **Agents** and **Handoffs**. An agent encompasses instructions and tools and can hand off a conversation to another agent when appropriate. Handoffs are achieved by calling a handoff function, generally named `handoff_to_<agent_name>`. Handoffs between agents are handled seamlessly in the background; do not mention or draw attention to these handoffs in your conversation with the user. # Agent context {put your agent system prompt here} ---
            - `destinations` union[] — These are the destinations that the call can be handed off to. Usage: 1. Single destination Use `assistantId` to handoff the call to a saved assistant, or `assistantName` to handoff the call to an assistant in the same squad. ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-123", // or "assistantName": "Assistant123" "description": "customer wants to be handed off to assistant-123", "contextEngineeringPlan": { "type": "all" } } ], } ] } ``` 2. Multiple destinations 2.1. Multiple Tools, Each With One Destination (OpenAI recommended) ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-123", "description": "customer wants to be handed off to assistant-123", "contextEngineeringPlan": { "type": "all" } }, ], }, { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-456", "description": "customer wants to be handed off to assistant-456", "contextEngineeringPlan": { "type": "all" } } ], } ] } ``` 2.2. One Tool, Multiple Destinations (Anthropic recommended) ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "assistant", "assistantId": "assistant-123", "description": "customer wants to be handed off to assistant-123", "contextEngineeringPlan": { "type": "all" } }, { "type": "assistant", "assistantId": "assistant-456", "description": "customer wants to be handed off to assistant-456", "contextEngineeringPlan": { "type": "all" } } ], } ] } ``` 3. Dynamic destination 3.1 To determine the destination dynamically, supply a `dynamic` handoff destination type and a `server` object. VAPI will send a handoff-destination-request webhook to the `server.url`. The response from the server will be used as the destination (if valid). ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "dynamic", "server": { "url": "https://example.com" } } ], } ] } ``` 3.2. To pass custom parameters to the server, you can use the `function` object. ```json { "tools": [ { "type": "handoff", "destinations": [ { "type": "dynamic", "server": { "url": "https://example.com" }, } ], "function": { "name": "handoff", "description": "Call this function when the customer is ready to be handed off to the next assistant", "parameters": { "type": "object", "properties": { "destination": { "type": "string", "description": "Use dynamic when customer is ready to be handed off to the next assistant", "enum": ["dynamic"] }, "customerAreaCode": { "type": "number", "description": "Area code of the customer" }, "customerIntent": { "type": "string", "enum": ["new-customer", "existing-customer"], "description": "Use new-customer when customer is a new customer, existing-customer when customer is an existing customer" }, "customerSentiment": { "type": "string", "enum": ["positive", "negative", "neutral"], "description": "Use positive when customer is happy, negative when customer is unhappy, neutral when customer is neutral" } } } } } ] } ``` The properties `customerAreaCode`, `customerIntent`, and `customerSentiment` will be passed to the server in the webhook request body.
              - …
            - `function` OpenAIFunction
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateMcpToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'mcp', required — The type of tool. "mcp" for MCP tool.
            - `server` Server
              - …
            - `metadata` McpToolMetadata
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateQueryToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'query', required — The type of tool. "query" for Query tool.
            - `knowledgeBases` KnowledgeBase[] — The knowledge bases to query
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateSlackSendMessageToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'slack.message.send', required — The type of tool. "slack.message.send" for Slack Send Message tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateSmsToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'sms', required — The type of tool. "sms" for Twilio SMS sending tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateTextEditorToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'textEditor', required — The type of tool. "textEditor" for Text Editor tool.
            - `subType` 'text_editor_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'str_replace_editor', required — The name of the tool, fixed to 'str_replace_editor'
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateTransferCallToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'transferCall', required
            - `destinations` union[] — 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.
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
      - `toolIds` string[] — These are the tools that the assistant can use during the call. To use transient tools, use `tools`. Both `tools` and `toolIds` can be used together.
      - `knowledgeBase` CreateCustomKnowledgeBaseDTO
        - `provider` 'custom-knowledge-base', required — This knowledge base is bring your own knowledge base implementation.
        - `server` Server, required
          - `timeoutSeconds` number — This is the timeout in seconds for the request. Defaults to 20 seconds. @default 20
          - `credentialId` string — The credential ID for server authentication
          - `staticIpAddressesEnabled` boolean — If enabled, requests will originate from a static set of IPs owned and managed by Vapi. @default false
          - `encryptedPaths` string[] — This is the paths to encrypt in the request body if credentialId and encryptionPlan are defined.
          - `url` string — This is where the request will be sent.
          - `headers` object — These are the headers to include in the request. Each key-value pair represents a header name and its value. Note: Specifying an Authorization header here will override the authorization provided by the `credentialId` (if provided). This is an anti-pattern and should be avoided outside of edge case scenarios.
          - `backoffPlan` BackoffPlan
            - `type` object, required — This is the type of backoff plan to use. Defaults to fixed. @default fixed
            - `maxRetries` number, required — This is the maximum number of retries to attempt if the request fails. Defaults to 0 (no retries). @default 0
            - `baseDelaySeconds` number, required — This is the base delay in seconds. For linear backoff, this is the delay between each retry. For exponential backoff, this is the initial delay.
            - `excludedStatusCodes` object[] — This is the excluded status codes. If the response status code is in this list, the request will not be retried. By default, the request will be retried for any non-2xx status code.
              - …
      - `model` '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', required — This is the Google model that will be used.
      - `provider` 'google', required
      - `realtimeConfig` GoogleRealtimeConfig
        - `topP` number — This is the nucleus sampling parameter that controls the cumulative probability of tokens considered during text generation. Only applicable with the Gemini Flash 2.0 Multimodal Live API.
        - `topK` number — This is the top-k sampling parameter that limits the number of highest probability tokens considered during text generation. Only applicable with the Gemini Flash 2.0 Multimodal Live API.
        - `presencePenalty` number — This is the presence penalty parameter that influences the model's likelihood to repeat information by penalizing tokens based on their presence in the text. Only applicable with the Gemini Flash 2.0 Multimodal Live API.
        - `frequencyPenalty` number — This is the frequency penalty parameter that influences the model's likelihood to repeat tokens by penalizing them based on their frequency in the text. Only applicable with the Gemini Flash 2.0 Multimodal Live API.
        - `speechConfig` GeminiMultimodalLiveSpeechConfig
          - `voiceConfig` GeminiMultimodalLiveVoiceConfig, required
            - `prebuiltVoiceConfig` GeminiMultimodalLivePrebuiltVoiceConfig, required
              - …
      - `temperature` number — This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
      - `maxTokens` number — This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
      - `emotionRecognitionEnabled` boolean — This determines whether we detect user's emotion while they speak and send it as an additional info to model. Default `false` because the model is usually are good at understanding the user's emotion from text. @default false
      - `numFastTurns` number — This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai. Default is 0. @default 0
    - GroqModel
      - `messages` OpenAIMessage[] — This is the starting state for the conversation.
        - `content` string, nullable, required
        - `role` 'assistant' | 'function' | 'user' | 'system' | 'tool', required
      - `tools` union[] — These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`. Both `tools` and `toolIds` can be used together.
        - union
          - CreateApiRequestToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'apiRequest', required — The type of tool. "apiRequest" for API request tool.
            - `method` 'POST' | 'GET' | 'PUT' | 'PATCH' | 'DELETE', required
            - `timeoutSeconds` number — This is the timeout in seconds for the request. Defaults to 20 seconds. @default 20
            - `credentialId` string — The credential ID for API request authentication
            - `encryptedPaths` string[] — This is the paths to encrypt in the request body if credentialId and encryptionPlan are defined.
            - `name` string — This is the name of the tool. This will be passed to the model. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40.
            - `description` string — This is the description of the tool. This will be passed to the model.
            - `url` string, required — This is where the request will be sent.
            - `body` JsonSchema
              - …
            - `headers` JsonSchema
              - …
            - `backoffPlan` BackoffPlan
              - …
            - `variableExtractionPlan` VariableExtractionPlan
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateBashToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'bash', required — The type of tool. "bash" for Bash tool.
            - `subType` 'bash_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'bash', required — The name of the tool, fixed to 'bash'
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateCodeToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'code', required — The type of tool. "code" for Code tool.
            - `async` boolean — This determines if the tool is async. If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. Defaults to synchronous (`false`).
            - `server` Server
              - …
            - `code` string, required — TypeScript code to execute when the tool is called
            - `environmentVariables` CodeToolEnvironmentVariable[] — Environment variables available in code via `env` object
              - …
            - `timeoutSeconds` number — This is the timeout in seconds for the code execution. Defaults to 10 seconds. Maximum is 30 seconds to prevent abuse. @default 10
            - `credentialId` string — Credential ID containing the Val Town API key
            - `variableExtractionPlan` VariableExtractionPlan
              - …
            - `function` OpenAIFunction
              - …
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateComputerToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'computer', required — The type of tool. "computer" for Computer tool.
            - `subType` 'computer_20241022', required — The sub type of tool.
            - `server` Server
              - …
            - `name` 'computer', required — The name of the tool, fixed to 'computer'
            - `displayWidthPx` number, required — The display width in pixels
            - `displayHeightPx` number, required — The display height in pixels
            - `displayNumber` number — Optional display number
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateDtmfToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'dtmf', required — The type of tool. "dtmf" for DTMF tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateEndCallToolDTO
            - `messages` union[] — These are the messages that will be spoken to the user as the tool is running. For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
              - …
            - `type` 'endCall', required — The type of tool. "endCall" for End Call tool.
            - `rejectionPlan` ToolRejectionPlan
              - …
          - CreateFunctionToolDTO
- … truncated; see the full OpenAPI document linked below

## Changes

> 35 revisions in range; 6 could not be searched.

- **2025-12-16** `45678bc2c663` — 54 warning, 230 info
  - removed the optional property `transcriber/oneOf[subschema #10: OpenAITranscriber]/fallbackPlan/allOf[#/components/schemas/FallbackTranscriberPlan]/transcribers/items/oneOf[subschema #9: Speechmatics]/enableEntities` from the response with the `200` status
  - removed the optional property `transcriber/oneOf[subschema #11: CartesiaTranscriber]/fallbackPlan/allOf[#/components/schemas/FallbackTranscriberPlan]/transcribers/items/oneOf[subschema #9: Speechmatics]/enableEntities` from the response with the `200` status
  - removed the optional property `transcriber/oneOf[subschema #1: AssemblyAITranscriber]/fallbackPlan/allOf[#/components/schemas/FallbackTranscriberPlan]/transcribers/items/oneOf[subschema #9: Speechmatics]/enableEntities` from the response with the `200` status
  - removed the optional property `transcriber/oneOf[subschema #2: AzureSpeechTranscriber]/fallbackPlan/allOf[#/components/schemas/FallbackTranscriberPlan]/transcribers/items/oneOf[subschema #9: Speechmatics]/enableEntities` from the response with the `200` status
  - …280 more
  - …this revision’s changelog is incomplete
- …earlier changes not shown

[Full history](https://skmtc.dev/vapiai/apis/vapi-api/changes/assistant/:id/get.md)

---

[API](https://skmtc.dev/vapiai/apis/vapi-api.md) · [All operations](https://skmtc.dev/vapiai/apis/vapi-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/vapiai/vapi-api/revisions/45678bc2c663/schema)
