@vapi-ai/web 2.3.10 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/api.ts CHANGED
@@ -49,7 +49,7 @@ export interface AssemblyAITranscriber {
49
49
  formatTurns?: boolean;
50
50
  /**
51
51
  * This is the end of turn confidence threshold. The minimum confidence that the end of turn is detected.
52
- *
52
+ * Note: Only used if startSpeakingPlan.smartEndpointingPlan is not set.
53
53
  * @min 0
54
54
  * @max 1
55
55
  * @default 0.7
@@ -60,7 +60,7 @@ export interface AssemblyAITranscriber {
60
60
  endOfTurnConfidenceThreshold?: number;
61
61
  /**
62
62
  * This is the minimum end of turn silence when confident in milliseconds.
63
- *
63
+ * Note: Only used if startSpeakingPlan.smartEndpointingPlan is not set.
64
64
  * @default 160
65
65
  * @min 0
66
66
  * @example 160
@@ -68,7 +68,7 @@ export interface AssemblyAITranscriber {
68
68
  minEndOfTurnSilenceWhenConfident?: number;
69
69
  /**
70
70
  * This is the maximum wait time for word finalization in milliseconds.
71
- *
71
+ * Note: Only used if startSpeakingPlan.smartEndpointingPlan is not set.
72
72
  * @default 160
73
73
  * @min 0
74
74
  * @example 160
@@ -76,7 +76,7 @@ export interface AssemblyAITranscriber {
76
76
  wordFinalizationMaxWaitTime?: number;
77
77
  /**
78
78
  * This is the maximum turn silence time in milliseconds.
79
- *
79
+ * Note: Only used if startSpeakingPlan.smartEndpointingPlan is not set.
80
80
  * @default 400
81
81
  * @min 0
82
82
  * @example 400
@@ -661,6 +661,7 @@ export interface DeepgramTranscriber {
661
661
  | "pl"
662
662
  | "pt"
663
663
  | "pt-BR"
664
+ | "pt-PT"
664
665
  | "ro"
665
666
  | "ru"
666
667
  | "sk"
@@ -718,6 +719,12 @@ export interface DeepgramTranscriber {
718
719
  * @example 0.4
719
720
  */
720
721
  confidenceThreshold?: number;
722
+ /** @example 0.3 */
723
+ preflightThreshold?: number;
724
+ /** @example 0.7 */
725
+ eotThreshold?: number;
726
+ /** @example 3000 */
727
+ eotTimeoutMs?: number;
721
728
  /** 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. */
722
729
  keywords?: string[];
723
730
  /** Keyterm Prompting allows you improve Keyword Recall Rate (KRR) for important keyterms or phrases up to 90%. */
@@ -1205,6 +1212,16 @@ export interface GladiaTranscriber {
1205
1212
  customVocabularyEnabled?: boolean;
1206
1213
  /** Custom vocabulary configuration */
1207
1214
  customVocabularyConfig?: GladiaCustomVocabularyConfigDTO;
1215
+ /**
1216
+ * Region for processing audio (us-west or eu-west)
1217
+ * @example "us-west"
1218
+ */
1219
+ region?: "us-west" | "eu-west";
1220
+ /**
1221
+ * Enable partial transcripts for low-latency streaming transcription
1222
+ * @example false
1223
+ */
1224
+ receivePartialTranscripts?: boolean;
1208
1225
  /** This is the plan for voice provider fallbacks in the event that the primary voice provider fails. */
1209
1226
  fallbackPlan?: FallbackTranscriberPlan;
1210
1227
  }
@@ -1541,7 +1558,7 @@ export interface FallbackAssemblyAITranscriber {
1541
1558
  formatTurns?: boolean;
1542
1559
  /**
1543
1560
  * This is the end of turn confidence threshold. The minimum confidence that the end of turn is detected.
1544
- *
1561
+ * Note: Only used if startSpeakingPlan.smartEndpointingPlan is not set.
1545
1562
  * @min 0
1546
1563
  * @max 1
1547
1564
  * @default 0.7
@@ -1552,7 +1569,7 @@ export interface FallbackAssemblyAITranscriber {
1552
1569
  endOfTurnConfidenceThreshold?: number;
1553
1570
  /**
1554
1571
  * This is the minimum end of turn silence when confident in milliseconds.
1555
- *
1572
+ * Note: Only used if startSpeakingPlan.smartEndpointingPlan is not set.
1556
1573
  * @default 160
1557
1574
  * @min 0
1558
1575
  * @example 160
@@ -1560,7 +1577,7 @@ export interface FallbackAssemblyAITranscriber {
1560
1577
  minEndOfTurnSilenceWhenConfident?: number;
1561
1578
  /**
1562
1579
  * This is the maximum wait time for word finalization in milliseconds.
1563
- *
1580
+ * Note: Only used if startSpeakingPlan.smartEndpointingPlan is not set.
1564
1581
  * @default 160
1565
1582
  * @min 0
1566
1583
  * @example 160
@@ -1568,7 +1585,7 @@ export interface FallbackAssemblyAITranscriber {
1568
1585
  wordFinalizationMaxWaitTime?: number;
1569
1586
  /**
1570
1587
  * This is the maximum turn silence time in milliseconds.
1571
- *
1588
+ * Note: Only used if startSpeakingPlan.smartEndpointingPlan is not set.
1572
1589
  * @default 400
1573
1590
  * @min 0
1574
1591
  * @example 400
@@ -2082,6 +2099,7 @@ export interface FallbackDeepgramTranscriber {
2082
2099
  | "pl"
2083
2100
  | "pt"
2084
2101
  | "pt-BR"
2102
+ | "pt-PT"
2085
2103
  | "ro"
2086
2104
  | "ru"
2087
2105
  | "sk"
@@ -2139,6 +2157,12 @@ export interface FallbackDeepgramTranscriber {
2139
2157
  * @example 0.4
2140
2158
  */
2141
2159
  confidenceThreshold?: number;
2160
+ /** @example 0.3 */
2161
+ preflightThreshold?: number;
2162
+ /** @example 0.7 */
2163
+ eotThreshold?: number;
2164
+ /** @example 3000 */
2165
+ eotTimeoutMs?: number;
2142
2166
  /** 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. */
2143
2167
  keywords?: string[];
2144
2168
  /** Keyterm Prompting allows you improve Keyword Recall Rate (KRR) for important keyterms or phrases up to 90%. */
@@ -2625,6 +2649,16 @@ export interface FallbackGladiaTranscriber {
2625
2649
  customVocabularyEnabled?: boolean;
2626
2650
  /** Custom vocabulary configuration */
2627
2651
  customVocabularyConfig?: GladiaCustomVocabularyConfigDTO;
2652
+ /**
2653
+ * Region for processing audio (us-west or eu-west)
2654
+ * @example "us-west"
2655
+ */
2656
+ region?: "us-west" | "eu-west";
2657
+ /**
2658
+ * Enable partial transcripts for low-latency streaming transcription
2659
+ * @example false
2660
+ */
2661
+ receivePartialTranscripts?: boolean;
2628
2662
  }
2629
2663
 
2630
2664
  export interface FallbackSpeechmaticsTranscriber {
@@ -3630,6 +3664,14 @@ export interface CreateVoicemailToolDTO {
3630
3664
  )[];
3631
3665
  /** The type of tool. "voicemail" for Voicemail tool. */
3632
3666
  type: "voicemail";
3667
+ /**
3668
+ * This is the flag that enables beep detection for voicemail detection and applies only for twilio based calls.
3669
+ *
3670
+ * @default false
3671
+ * @default false
3672
+ * @example false
3673
+ */
3674
+ beepDetectionEnabled?: boolean;
3633
3675
  /**
3634
3676
  * This is the plan to reject a tool call based on the conversation state.
3635
3677
  *
@@ -6787,6 +6829,11 @@ export interface CustomLLMModel {
6787
6829
  headers?: Record<string, string>;
6788
6830
  /** These is the URL we'll use for the OpenAI client's `baseURL`. Ex. https://openrouter.ai/api/v1 */
6789
6831
  url: string;
6832
+ /**
6833
+ * This determines whether the transcriber's word level confidence is sent in requests to the custom provider. Default is false.
6834
+ * This only works for Deepgram transcribers.
6835
+ */
6836
+ wordLevelConfidenceEnabled?: boolean;
6790
6837
  /**
6791
6838
  * This sets the timeout for the connection to the custom provider without needing to stream any tokens back. Default is 20 seconds.
6792
6839
  * @min 0
@@ -7150,6 +7197,7 @@ export interface GroqModel {
7150
7197
  | "llama3-8b-8192"
7151
7198
  | "llama3-70b-8192"
7152
7199
  | "gemma2-9b-it"
7200
+ | "moonshotai/kimi-k2-instruct-0905"
7153
7201
  | "meta-llama/llama-4-maverick-17b-128e-instruct"
7154
7202
  | "meta-llama/llama-4-scout-17b-16e-instruct"
7155
7203
  | "mistral-saba-24b"
@@ -8230,6 +8278,198 @@ export interface ToolNode {
8230
8278
  metadata?: object;
8231
8279
  }
8232
8280
 
8281
+ export interface VoicemailDetectionBackoffPlan {
8282
+ /**
8283
+ * This is the number of seconds to wait before starting the first retry attempt.
8284
+ * @min 0
8285
+ * @default 5
8286
+ */
8287
+ startAtSeconds?: number;
8288
+ /**
8289
+ * This is the interval in seconds between retry attempts.
8290
+ * @min 2.5
8291
+ * @default 5
8292
+ */
8293
+ frequencySeconds?: number;
8294
+ /**
8295
+ * This is the maximum number of retry attempts before giving up.
8296
+ * @min 1
8297
+ * @max 10
8298
+ * @default 6
8299
+ */
8300
+ maxRetries?: number;
8301
+ }
8302
+
8303
+ export interface GoogleVoicemailDetectionPlan {
8304
+ /**
8305
+ * This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message
8306
+ *
8307
+ * - If we detect a voicemail beep before this, we will speak the message at that point.
8308
+ *
8309
+ * - Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.
8310
+ *
8311
+ * @default 30
8312
+ * @min 0
8313
+ * @max 60
8314
+ * @min 0
8315
+ * @max 30
8316
+ * @default 30
8317
+ */
8318
+ beepMaxAwaitSeconds?: number;
8319
+ /** This is the provider to use for voicemail detection. */
8320
+ provider: "google";
8321
+ /** This is the backoff plan for the voicemail detection. */
8322
+ backoffPlan?: VoicemailDetectionBackoffPlan;
8323
+ /**
8324
+ * This is the detection type to use for voicemail detection.
8325
+ * - 'audio': Uses native audio models (default)
8326
+ * - 'transcript': Uses ASR/transcript-based detection
8327
+ * @default 'audio' (audio detection)
8328
+ */
8329
+ type?: "audio" | "transcript";
8330
+ }
8331
+
8332
+ export interface OpenAIVoicemailDetectionPlan {
8333
+ /**
8334
+ * This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message
8335
+ *
8336
+ * - If we detect a voicemail beep before this, we will speak the message at that point.
8337
+ *
8338
+ * - Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.
8339
+ *
8340
+ * @default 30
8341
+ * @min 0
8342
+ * @max 60
8343
+ * @min 0
8344
+ * @max 30
8345
+ * @default 30
8346
+ */
8347
+ beepMaxAwaitSeconds?: number;
8348
+ /** This is the provider to use for voicemail detection. */
8349
+ provider: "openai";
8350
+ /** This is the backoff plan for the voicemail detection. */
8351
+ backoffPlan?: VoicemailDetectionBackoffPlan;
8352
+ /**
8353
+ * This is the detection type to use for voicemail detection.
8354
+ * - 'audio': Uses native audio models (default)
8355
+ * - 'transcript': Uses ASR/transcript-based detection
8356
+ * @default 'audio' (audio detection)
8357
+ */
8358
+ type?: "audio" | "transcript";
8359
+ }
8360
+
8361
+ export interface TwilioVoicemailDetectionPlan {
8362
+ /** This is the provider to use for voicemail detection. */
8363
+ provider: "twilio";
8364
+ /**
8365
+ * These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence'].
8366
+ *
8367
+ * @default {Array} ['machine_end_beep', 'machine_end_silence']
8368
+ * @example ["machine_end_beep","machine_end_silence"]
8369
+ */
8370
+ voicemailDetectionTypes?:
8371
+ | "machine_start"
8372
+ | "human"
8373
+ | "fax"
8374
+ | "unknown"
8375
+ | "machine_end_beep"
8376
+ | "machine_end_silence"
8377
+ | "machine_end_other";
8378
+ /**
8379
+ * This sets whether the assistant should detect voicemail. Defaults to true.
8380
+ *
8381
+ * @default true
8382
+ */
8383
+ enabled?: boolean;
8384
+ /**
8385
+ * The number of seconds that Twilio should attempt to perform answering machine detection before timing out and returning AnsweredBy as unknown. Default is 30 seconds.
8386
+ *
8387
+ * Increasing this value will provide the engine more time to make a determination. This can be useful when DetectMessageEnd is provided in the MachineDetection parameter and there is an expectation of long answering machine greetings that can exceed 30 seconds.
8388
+ *
8389
+ * Decreasing this value will reduce the amount of time the engine has to make a determination. This can be particularly useful when the Enable option is provided in the MachineDetection parameter and you want to limit the time for initial detection.
8390
+ *
8391
+ * Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.
8392
+ *
8393
+ * @default 30
8394
+ * @min 3
8395
+ * @max 59
8396
+ */
8397
+ machineDetectionTimeout?: number;
8398
+ /**
8399
+ * The number of milliseconds that is used as the measuring stick for the length of the speech activity. Durations lower than this value will be interpreted as a human, longer as a machine. Default is 2400 milliseconds.
8400
+ *
8401
+ * Increasing this value will reduce the chance of a False Machine (detected machine, actually human) for a long human greeting (e.g., a business greeting) but increase the time it takes to detect a machine.
8402
+ *
8403
+ * Decreasing this value will reduce the chances of a False Human (detected human, actually machine) for short voicemail greetings. The value of this parameter may need to be reduced by more than 1000ms to detect very short voicemail greetings. A reduction of that significance can result in increased False Machine detections. Adjusting the MachineDetectionSpeechEndThreshold is likely the better approach for short voicemails. Decreasing MachineDetectionSpeechThreshold will also reduce the time it takes to detect a machine.
8404
+ *
8405
+ * Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.
8406
+ *
8407
+ * @default 2400
8408
+ * @min 1000
8409
+ * @max 6000
8410
+ */
8411
+ machineDetectionSpeechThreshold?: number;
8412
+ /**
8413
+ * The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Default is 1200 milliseconds.
8414
+ *
8415
+ * Increasing this value will typically be used to better address the short voicemail greeting scenarios. For short voicemails, there is typically 1000-2000ms of audio followed by 1200-2400ms of silence and then additional audio before the beep. Increasing the MachineDetectionSpeechEndThreshold to ~2500ms will treat the 1200-2400ms of silence as a gap in the greeting but not the end of the greeting and will result in a machine detection. The downsides of such a change include:
8416
+ * - Increasing the delay for human detection by the amount you increase this parameter, e.g., a change of 1200ms to 2500ms increases human detection delay by 1300ms.
8417
+ * - Cases where a human has two utterances separated by a period of silence (e.g. a "Hello", then 2000ms of silence, and another "Hello") may be interpreted as a machine.
8418
+ *
8419
+ * Decreasing this value will result in faster human detection. The consequence is that it can lead to increased False Human (detected human, actually machine) detections because a silence gap in a voicemail greeting (not necessarily just in short voicemail scenarios) can be incorrectly interpreted as the end of speech.
8420
+ *
8421
+ * Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.
8422
+ *
8423
+ * @default 1200
8424
+ * @min 500
8425
+ * @max 5000
8426
+ */
8427
+ machineDetectionSpeechEndThreshold?: number;
8428
+ /**
8429
+ * The number of milliseconds of initial silence after which an unknown AnsweredBy result will be returned. Default is 5000 milliseconds.
8430
+ *
8431
+ * Increasing this value will result in waiting for a longer period of initial silence before returning an 'unknown' AMD result.
8432
+ *
8433
+ * Decreasing this value will result in waiting for a shorter period of initial silence before returning an 'unknown' AMD result.
8434
+ *
8435
+ * Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.
8436
+ *
8437
+ * @default 5000
8438
+ * @min 2000
8439
+ * @max 10000
8440
+ */
8441
+ machineDetectionSilenceTimeout?: number;
8442
+ }
8443
+
8444
+ export interface VapiVoicemailDetectionPlan {
8445
+ /**
8446
+ * This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message
8447
+ *
8448
+ * - If we detect a voicemail beep before this, we will speak the message at that point.
8449
+ *
8450
+ * - Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.
8451
+ *
8452
+ * @default 30
8453
+ * @min 0
8454
+ * @max 60
8455
+ * @min 0
8456
+ * @max 30
8457
+ * @default 30
8458
+ */
8459
+ beepMaxAwaitSeconds?: number;
8460
+ /** This is the provider to use for voicemail detection. */
8461
+ provider: "vapi";
8462
+ /** This is the backoff plan for the voicemail detection. */
8463
+ backoffPlan?: VoicemailDetectionBackoffPlan;
8464
+ /**
8465
+ * This is the detection type to use for voicemail detection.
8466
+ * - 'audio': Uses native audio models (default)
8467
+ * - 'transcript': Uses ASR/transcript-based detection
8468
+ * @default 'audio' (audio detection)
8469
+ */
8470
+ type?: "audio" | "transcript";
8471
+ }
8472
+
8233
8473
  export interface AIEdgeCondition {
8234
8474
  type: "ai";
8235
8475
  /**
@@ -8249,6 +8489,92 @@ export interface Edge {
8249
8489
  metadata?: object;
8250
8490
  }
8251
8491
 
8492
+ export interface RecordingConsentPlanStayOnLine {
8493
+ /**
8494
+ * This is the message asking for consent to record the call.
8495
+ * If the type is `stay-on-line`, the message should ask the user to hang up if they do not consent.
8496
+ * If the type is `verbal`, the message should ask the user to verbally consent or decline.
8497
+ * @maxLength 1000
8498
+ */
8499
+ message: string;
8500
+ /**
8501
+ * This is the voice to use for the consent message. If not specified, inherits from the assistant's voice.
8502
+ * Use a different voice for the consent message for a better user experience.
8503
+ */
8504
+ voice?:
8505
+ | AzureVoice
8506
+ | CartesiaVoice
8507
+ | CustomVoice
8508
+ | DeepgramVoice
8509
+ | ElevenLabsVoice
8510
+ | HumeVoice
8511
+ | LMNTVoice
8512
+ | NeuphonicVoice
8513
+ | OpenAIVoice
8514
+ | PlayHTVoice
8515
+ | RimeAIVoice
8516
+ | SmallestAIVoice
8517
+ | TavusVoice
8518
+ | VapiVoice
8519
+ | SesameVoice
8520
+ | InworldVoice
8521
+ | MinimaxVoice;
8522
+ /**
8523
+ * This is the type of recording consent plan. This type assumes consent is granted if the user stays on the line.
8524
+ * @example "stay-on-line"
8525
+ */
8526
+ type: "stay-on-line";
8527
+ /**
8528
+ * Number of seconds to wait before transferring to the assistant if user stays on the call
8529
+ * @min 1
8530
+ * @max 6
8531
+ * @default 3
8532
+ * @example 3
8533
+ */
8534
+ waitSeconds?: number;
8535
+ }
8536
+
8537
+ export interface RecordingConsentPlanVerbal {
8538
+ /**
8539
+ * This is the message asking for consent to record the call.
8540
+ * If the type is `stay-on-line`, the message should ask the user to hang up if they do not consent.
8541
+ * If the type is `verbal`, the message should ask the user to verbally consent or decline.
8542
+ * @maxLength 1000
8543
+ */
8544
+ message: string;
8545
+ /**
8546
+ * This is the voice to use for the consent message. If not specified, inherits from the assistant's voice.
8547
+ * Use a different voice for the consent message for a better user experience.
8548
+ */
8549
+ voice?:
8550
+ | AzureVoice
8551
+ | CartesiaVoice
8552
+ | CustomVoice
8553
+ | DeepgramVoice
8554
+ | ElevenLabsVoice
8555
+ | HumeVoice
8556
+ | LMNTVoice
8557
+ | NeuphonicVoice
8558
+ | OpenAIVoice
8559
+ | PlayHTVoice
8560
+ | RimeAIVoice
8561
+ | SmallestAIVoice
8562
+ | TavusVoice
8563
+ | VapiVoice
8564
+ | SesameVoice
8565
+ | InworldVoice
8566
+ | MinimaxVoice;
8567
+ /**
8568
+ * This is the type of recording consent plan. This type assumes consent is granted if the user verbally consents or declines.
8569
+ * @example "verbal"
8570
+ */
8571
+ type: "verbal";
8572
+ /** Tool to execute if user verbally declines recording consent */
8573
+ declineTool?: object;
8574
+ /** ID of existing tool to execute if user verbally declines recording consent */
8575
+ declineToolId?: string;
8576
+ }
8577
+
8252
8578
  export type SecurityFilterBase = object;
8253
8579
 
8254
8580
  export interface SecurityFilterPlan {
@@ -8296,6 +8622,13 @@ export interface CompliancePlan {
8296
8622
  pciEnabled?: boolean;
8297
8623
  /** This is the security filter plan for the assistant. It allows filtering of transcripts for security threats before sending to LLM. */
8298
8624
  securityFilterPlan?: SecurityFilterPlan;
8625
+ recordingConsentPlan?:
8626
+ | ({
8627
+ type: "stay-on-line";
8628
+ } & RecordingConsentPlanStayOnLine)
8629
+ | ({
8630
+ type: "verbal";
8631
+ } & RecordingConsentPlanVerbal);
8299
8632
  }
8300
8633
 
8301
8634
  export interface StructuredDataPlan {
@@ -8532,6 +8865,11 @@ export interface ArtifactPlan {
8532
8865
  * @example false
8533
8866
  */
8534
8867
  videoRecordingEnabled?: boolean;
8868
+ /**
8869
+ * This determines whether the artifact contains the full message history, even after handoff context engineering. Defaults to false.
8870
+ * @example false
8871
+ */
8872
+ fullMessageHistoryEnabled?: boolean;
8535
8873
  /**
8536
8874
  * This determines whether the SIP packet capture is enabled. Defaults to true. Only relevant for `phone` type calls where phone number's provider is `vapi` or `byo-phone-number`.
8537
8875
  *
@@ -8892,10 +9230,12 @@ export interface StartSpeakingPlan {
8892
9230
  */
8893
9231
  smartEndpointingEnabled?: boolean | "livekit";
8894
9232
  /**
8895
- * This is the plan for smart endpointing. Pick between Vapi smart endpointing or LiveKit smart endpointing (or nothing). We strongly recommend using livekit endpointing when working in English. LiveKit endpointing is not supported in other languages, yet.
9233
+ * This is the plan for smart endpointing. Pick between Vapi smart endpointing, LiveKit, or custom endpointing model (or nothing). We strongly recommend using livekit endpointing when working in English. LiveKit endpointing is not supported in other languages, yet.
8896
9234
  *
8897
9235
  * If this is set, it will override and take precedence over `transcriptionEndpointingPlan`.
8898
9236
  * This plan will still be overridden by any matching `customEndpointingRules`.
9237
+ *
9238
+ * If this is not set, the system will automatically use the transcriber's built-in endpointing capabilities if available.
8899
9239
  */
8900
9240
  smartEndpointingPlan?:
8901
9241
  | VapiSmartEndpointingPlan
@@ -8930,7 +9270,7 @@ export interface StartSpeakingPlan {
8930
9270
  *
8931
9271
  * Once an endpoint is triggered, the request is sent to `assistant.model`.
8932
9272
  *
8933
- * Note: This plan is only used if `smartEndpointingPlan` is not set. If both are provided, `smartEndpointingPlan` takes precedence.
9273
+ * Note: This plan is only used if `smartEndpointingPlan` is not set and transcriber does not have built-in endpointing capabilities. If both are provided, `smartEndpointingPlan` takes precedence.
8934
9274
  * This plan will also be overridden by any matching `customEndpointingRules`.
8935
9275
  */
8936
9276
  transcriptionEndpointingPlan?: TranscriptionEndpointingPlan;
@@ -9360,6 +9700,12 @@ export interface WorkflowUserEditable {
9360
9700
  provider: "minimax";
9361
9701
  } & CreateMinimaxCredentialDTO)
9362
9702
  )[];
9703
+ /** This is the voicemail detection plan for the workflow. */
9704
+ voicemailDetection?:
9705
+ | GoogleVoicemailDetectionPlan
9706
+ | OpenAIVoicemailDetectionPlan
9707
+ | TwilioVoicemailDetectionPlan
9708
+ | VapiVoicemailDetectionPlan;
9363
9709
  /** @maxLength 80 */
9364
9710
  name: string;
9365
9711
  edges: Edge[];
@@ -9426,6 +9772,13 @@ export interface WorkflowUserEditable {
9426
9772
  credentialIds?: string[];
9427
9773
  /** This is the plan for keypad input handling during workflow calls. */
9428
9774
  keypadInputPlan?: KeypadInputPlan;
9775
+ /**
9776
+ * This is the message that the assistant will say if the call is forwarded to voicemail.
9777
+ *
9778
+ * If unspecified, it will hang up.
9779
+ * @maxLength 1000
9780
+ */
9781
+ voicemailMessage?: string;
9429
9782
  }
9430
9783
 
9431
9784
  export interface VapiModel {
@@ -9980,7 +10333,17 @@ export interface DeepgramVoice {
9980
10333
  | "saturn"
9981
10334
  | "selene"
9982
10335
  | "theia"
9983
- | "vesta";
10336
+ | "vesta"
10337
+ | "celeste"
10338
+ | "estrella"
10339
+ | "nestor"
10340
+ | "sirio"
10341
+ | "carina"
10342
+ | "alvaro"
10343
+ | "diana"
10344
+ | "aquila"
10345
+ | "selena"
10346
+ | "javier";
9984
10347
  /**
9985
10348
  * This is the model that will be used. Defaults to 'aura-2' when not specified.
9986
10349
  * @example "aura-2"
@@ -11052,7 +11415,7 @@ export interface MinimaxVoice {
11052
11415
  * @default "speech-02-turbo"
11053
11416
  * @example "speech-02-turbo"
11054
11417
  */
11055
- model?: "speech-02-hd" | "speech-02-turbo";
11418
+ model?: "speech-02-hd" | "speech-02-turbo" | "speech-2.5-turbo-preview";
11056
11419
  /**
11057
11420
  * The emotion to use for the voice. If not provided, will use auto-detect mode.
11058
11421
  * Options include: 'happy', 'sad', 'angry', 'fearful', 'surprised', 'disgusted', 'neutral'
@@ -11091,6 +11454,54 @@ export interface MinimaxVoice {
11091
11454
  * @default "worldwide"
11092
11455
  */
11093
11456
  region?: "worldwide" | "china";
11457
+ /** Language hint for MiniMax T2A. Example: yue (Cantonese), zh (Chinese), en (English). */
11458
+ languageBoost?:
11459
+ | "Chinese"
11460
+ | "Chinese,Yue"
11461
+ | "English"
11462
+ | "Arabic"
11463
+ | "Russian"
11464
+ | "Spanish"
11465
+ | "French"
11466
+ | "Portuguese"
11467
+ | "German"
11468
+ | "Turkish"
11469
+ | "Dutch"
11470
+ | "Ukrainian"
11471
+ | "Vietnamese"
11472
+ | "Indonesian"
11473
+ | "Japanese"
11474
+ | "Italian"
11475
+ | "Korean"
11476
+ | "Thai"
11477
+ | "Polish"
11478
+ | "Romanian"
11479
+ | "Greek"
11480
+ | "Czech"
11481
+ | "Finnish"
11482
+ | "Hindi"
11483
+ | "Bulgarian"
11484
+ | "Danish"
11485
+ | "Hebrew"
11486
+ | "Malay"
11487
+ | "Persian"
11488
+ | "Slovak"
11489
+ | "Swedish"
11490
+ | "Croatian"
11491
+ | "Filipino"
11492
+ | "Hungarian"
11493
+ | "Norwegian"
11494
+ | "Slovenian"
11495
+ | "Catalan"
11496
+ | "Nynorsk"
11497
+ | "Tamil"
11498
+ | "Afrikaans"
11499
+ | "auto";
11500
+ /**
11501
+ * Enable MiniMax text normalization to improve number reading and formatting.
11502
+ * @default true
11503
+ */
11504
+ textNormalizationEnabled?: boolean;
11094
11505
  /** This is the plan for chunking the model output before it is sent to the voice provider. */
11095
11506
  chunkPlan?: ChunkPlan;
11096
11507
  /** This is the plan for voice provider fallbacks in the event that the primary voice provider fails. */
@@ -11261,7 +11672,17 @@ export interface FallbackDeepgramVoice {
11261
11672
  | "saturn"
11262
11673
  | "selene"
11263
11674
  | "theia"
11264
- | "vesta";
11675
+ | "vesta"
11676
+ | "celeste"
11677
+ | "estrella"
11678
+ | "nestor"
11679
+ | "sirio"
11680
+ | "carina"
11681
+ | "alvaro"
11682
+ | "diana"
11683
+ | "aquila"
11684
+ | "selena"
11685
+ | "javier";
11265
11686
  /**
11266
11687
  * This is the model that will be used. Defaults to 'aura-2' when not specified.
11267
11688
  * @example "aura-2"
@@ -12253,7 +12674,7 @@ export interface FallbackMinimaxVoice {
12253
12674
  * @default "speech-02-turbo"
12254
12675
  * @example "speech-02-turbo"
12255
12676
  */
12256
- model?: "speech-02-hd" | "speech-02-turbo";
12677
+ model?: "speech-02-hd" | "speech-02-turbo" | "speech-2.5-turbo-preview";
12257
12678
  /**
12258
12679
  * The emotion to use for the voice. If not provided, will use auto-detect mode.
12259
12680
  * Options include: 'happy', 'sad', 'angry', 'fearful', 'surprised', 'disgusted', 'neutral'
@@ -12292,6 +12713,54 @@ export interface FallbackMinimaxVoice {
12292
12713
  * @default "worldwide"
12293
12714
  */
12294
12715
  region?: "worldwide" | "china";
12716
+ /** Language hint for MiniMax T2A. Example: yue (Cantonese), zh (Chinese), en (English). */
12717
+ languageBoost?:
12718
+ | "Chinese"
12719
+ | "Chinese,Yue"
12720
+ | "English"
12721
+ | "Arabic"
12722
+ | "Russian"
12723
+ | "Spanish"
12724
+ | "French"
12725
+ | "Portuguese"
12726
+ | "German"
12727
+ | "Turkish"
12728
+ | "Dutch"
12729
+ | "Ukrainian"
12730
+ | "Vietnamese"
12731
+ | "Indonesian"
12732
+ | "Japanese"
12733
+ | "Italian"
12734
+ | "Korean"
12735
+ | "Thai"
12736
+ | "Polish"
12737
+ | "Romanian"
12738
+ | "Greek"
12739
+ | "Czech"
12740
+ | "Finnish"
12741
+ | "Hindi"
12742
+ | "Bulgarian"
12743
+ | "Danish"
12744
+ | "Hebrew"
12745
+ | "Malay"
12746
+ | "Persian"
12747
+ | "Slovak"
12748
+ | "Swedish"
12749
+ | "Croatian"
12750
+ | "Filipino"
12751
+ | "Hungarian"
12752
+ | "Norwegian"
12753
+ | "Slovenian"
12754
+ | "Catalan"
12755
+ | "Nynorsk"
12756
+ | "Tamil"
12757
+ | "Afrikaans"
12758
+ | "auto";
12759
+ /**
12760
+ * Enable MiniMax text normalization to improve number reading and formatting.
12761
+ * @default true
12762
+ */
12763
+ textNormalizationEnabled?: boolean;
12295
12764
  /** This is the plan for chunking the model output before it is sent to the voice provider. */
12296
12765
  chunkPlan?: ChunkPlan;
12297
12766
  }
@@ -13522,198 +13991,6 @@ export interface CallHookCustomerSpeechTimeout {
13522
13991
  name?: string;
13523
13992
  }
13524
13993
 
13525
- export interface VoicemailDetectionBackoffPlan {
13526
- /**
13527
- * This is the number of seconds to wait before starting the first retry attempt.
13528
- * @min 0
13529
- * @default 5
13530
- */
13531
- startAtSeconds?: number;
13532
- /**
13533
- * This is the interval in seconds between retry attempts.
13534
- * @min 2.5
13535
- * @default 5
13536
- */
13537
- frequencySeconds?: number;
13538
- /**
13539
- * This is the maximum number of retry attempts before giving up.
13540
- * @min 1
13541
- * @max 10
13542
- * @default 6
13543
- */
13544
- maxRetries?: number;
13545
- }
13546
-
13547
- export interface GoogleVoicemailDetectionPlan {
13548
- /**
13549
- * This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message
13550
- *
13551
- * - If we detect a voicemail beep before this, we will speak the message at that point.
13552
- *
13553
- * - Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.
13554
- *
13555
- * @default 30
13556
- * @min 0
13557
- * @max 60
13558
- * @min 0
13559
- * @max 30
13560
- * @default 30
13561
- */
13562
- beepMaxAwaitSeconds?: number;
13563
- /** This is the provider to use for voicemail detection. */
13564
- provider: "google";
13565
- /** This is the backoff plan for the voicemail detection. */
13566
- backoffPlan?: VoicemailDetectionBackoffPlan;
13567
- /**
13568
- * This is the detection type to use for voicemail detection.
13569
- * - 'audio': Uses native audio models (default)
13570
- * - 'transcript': Uses ASR/transcript-based detection
13571
- * @default 'audio' (audio detection)
13572
- */
13573
- type?: "audio" | "transcript";
13574
- }
13575
-
13576
- export interface OpenAIVoicemailDetectionPlan {
13577
- /**
13578
- * This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message
13579
- *
13580
- * - If we detect a voicemail beep before this, we will speak the message at that point.
13581
- *
13582
- * - Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.
13583
- *
13584
- * @default 30
13585
- * @min 0
13586
- * @max 60
13587
- * @min 0
13588
- * @max 30
13589
- * @default 30
13590
- */
13591
- beepMaxAwaitSeconds?: number;
13592
- /** This is the provider to use for voicemail detection. */
13593
- provider: "openai";
13594
- /** This is the backoff plan for the voicemail detection. */
13595
- backoffPlan?: VoicemailDetectionBackoffPlan;
13596
- /**
13597
- * This is the detection type to use for voicemail detection.
13598
- * - 'audio': Uses native audio models (default)
13599
- * - 'transcript': Uses ASR/transcript-based detection
13600
- * @default 'audio' (audio detection)
13601
- */
13602
- type?: "audio" | "transcript";
13603
- }
13604
-
13605
- export interface TwilioVoicemailDetectionPlan {
13606
- /** This is the provider to use for voicemail detection. */
13607
- provider: "twilio";
13608
- /**
13609
- * These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence'].
13610
- *
13611
- * @default {Array} ['machine_end_beep', 'machine_end_silence']
13612
- * @example ["machine_end_beep","machine_end_silence"]
13613
- */
13614
- voicemailDetectionTypes?:
13615
- | "machine_start"
13616
- | "human"
13617
- | "fax"
13618
- | "unknown"
13619
- | "machine_end_beep"
13620
- | "machine_end_silence"
13621
- | "machine_end_other";
13622
- /**
13623
- * This sets whether the assistant should detect voicemail. Defaults to true.
13624
- *
13625
- * @default true
13626
- */
13627
- enabled?: boolean;
13628
- /**
13629
- * The number of seconds that Twilio should attempt to perform answering machine detection before timing out and returning AnsweredBy as unknown. Default is 30 seconds.
13630
- *
13631
- * Increasing this value will provide the engine more time to make a determination. This can be useful when DetectMessageEnd is provided in the MachineDetection parameter and there is an expectation of long answering machine greetings that can exceed 30 seconds.
13632
- *
13633
- * Decreasing this value will reduce the amount of time the engine has to make a determination. This can be particularly useful when the Enable option is provided in the MachineDetection parameter and you want to limit the time for initial detection.
13634
- *
13635
- * Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.
13636
- *
13637
- * @default 30
13638
- * @min 3
13639
- * @max 59
13640
- */
13641
- machineDetectionTimeout?: number;
13642
- /**
13643
- * The number of milliseconds that is used as the measuring stick for the length of the speech activity. Durations lower than this value will be interpreted as a human, longer as a machine. Default is 2400 milliseconds.
13644
- *
13645
- * Increasing this value will reduce the chance of a False Machine (detected machine, actually human) for a long human greeting (e.g., a business greeting) but increase the time it takes to detect a machine.
13646
- *
13647
- * Decreasing this value will reduce the chances of a False Human (detected human, actually machine) for short voicemail greetings. The value of this parameter may need to be reduced by more than 1000ms to detect very short voicemail greetings. A reduction of that significance can result in increased False Machine detections. Adjusting the MachineDetectionSpeechEndThreshold is likely the better approach for short voicemails. Decreasing MachineDetectionSpeechThreshold will also reduce the time it takes to detect a machine.
13648
- *
13649
- * Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.
13650
- *
13651
- * @default 2400
13652
- * @min 1000
13653
- * @max 6000
13654
- */
13655
- machineDetectionSpeechThreshold?: number;
13656
- /**
13657
- * The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Default is 1200 milliseconds.
13658
- *
13659
- * Increasing this value will typically be used to better address the short voicemail greeting scenarios. For short voicemails, there is typically 1000-2000ms of audio followed by 1200-2400ms of silence and then additional audio before the beep. Increasing the MachineDetectionSpeechEndThreshold to ~2500ms will treat the 1200-2400ms of silence as a gap in the greeting but not the end of the greeting and will result in a machine detection. The downsides of such a change include:
13660
- * - Increasing the delay for human detection by the amount you increase this parameter, e.g., a change of 1200ms to 2500ms increases human detection delay by 1300ms.
13661
- * - Cases where a human has two utterances separated by a period of silence (e.g. a "Hello", then 2000ms of silence, and another "Hello") may be interpreted as a machine.
13662
- *
13663
- * Decreasing this value will result in faster human detection. The consequence is that it can lead to increased False Human (detected human, actually machine) detections because a silence gap in a voicemail greeting (not necessarily just in short voicemail scenarios) can be incorrectly interpreted as the end of speech.
13664
- *
13665
- * Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.
13666
- *
13667
- * @default 1200
13668
- * @min 500
13669
- * @max 5000
13670
- */
13671
- machineDetectionSpeechEndThreshold?: number;
13672
- /**
13673
- * The number of milliseconds of initial silence after which an unknown AnsweredBy result will be returned. Default is 5000 milliseconds.
13674
- *
13675
- * Increasing this value will result in waiting for a longer period of initial silence before returning an 'unknown' AMD result.
13676
- *
13677
- * Decreasing this value will result in waiting for a shorter period of initial silence before returning an 'unknown' AMD result.
13678
- *
13679
- * Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.
13680
- *
13681
- * @default 5000
13682
- * @min 2000
13683
- * @max 10000
13684
- */
13685
- machineDetectionSilenceTimeout?: number;
13686
- }
13687
-
13688
- export interface VapiVoicemailDetectionPlan {
13689
- /**
13690
- * This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message
13691
- *
13692
- * - If we detect a voicemail beep before this, we will speak the message at that point.
13693
- *
13694
- * - Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.
13695
- *
13696
- * @default 30
13697
- * @min 0
13698
- * @max 60
13699
- * @min 0
13700
- * @max 30
13701
- * @default 30
13702
- */
13703
- beepMaxAwaitSeconds?: number;
13704
- /** This is the provider to use for voicemail detection. */
13705
- provider: "vapi";
13706
- /** This is the backoff plan for the voicemail detection. */
13707
- backoffPlan?: VoicemailDetectionBackoffPlan;
13708
- /**
13709
- * This is the detection type to use for voicemail detection.
13710
- * - 'audio': Uses native audio models (default)
13711
- * - 'transcript': Uses ASR/transcript-based detection
13712
- * @default 'audio' (audio detection)
13713
- */
13714
- type?: "audio" | "transcript";
13715
- }
13716
-
13717
13994
  export interface SQLInjectionSecurityFilter {
13718
13995
  /** The type of security threat to filter. */
13719
13996
  type: "sql-injection";
@@ -14596,6 +14873,10 @@ export interface PaginationMeta {
14596
14873
  totalItems: number;
14597
14874
  currentPage: number;
14598
14875
  itemsBeyondRetention?: boolean;
14876
+ /** @format date-time */
14877
+ createdAtLe?: string;
14878
+ /** @format date-time */
14879
+ createdAtGe?: string;
14599
14880
  }
14600
14881
 
14601
14882
  export interface AssistantPaginatedResponse {
@@ -15760,6 +16041,12 @@ export interface Workflow {
15760
16041
  provider: "minimax";
15761
16042
  } & CreateMinimaxCredentialDTO)
15762
16043
  )[];
16044
+ /** This is the voicemail detection plan for the workflow. */
16045
+ voicemailDetection?:
16046
+ | GoogleVoicemailDetectionPlan
16047
+ | OpenAIVoicemailDetectionPlan
16048
+ | TwilioVoicemailDetectionPlan
16049
+ | VapiVoicemailDetectionPlan;
15763
16050
  id: string;
15764
16051
  orgId: string;
15765
16052
  /** @format date-time */
@@ -15832,304 +16119,17 @@ export interface Workflow {
15832
16119
  credentialIds?: string[];
15833
16120
  /** This is the plan for keypad input handling during workflow calls. */
15834
16121
  keypadInputPlan?: KeypadInputPlan;
15835
- }
15836
-
15837
- export interface CreateWorkflowDTO {
15838
- nodes: (ConversationNode | ToolNode)[];
15839
- /**
15840
- * This is the model for the workflow.
15841
- *
15842
- * This can be overridden at node level using `nodes[n].model`.
15843
- */
15844
- model?:
15845
- | WorkflowOpenAIModel
15846
- | WorkflowAnthropicModel
15847
- | WorkflowGoogleModel
15848
- | WorkflowCustomModel;
15849
- /**
15850
- * This is the transcriber for the workflow.
15851
- *
15852
- * This can be overridden at node level using `nodes[n].transcriber`.
15853
- */
15854
- transcriber?:
15855
- | AssemblyAITranscriber
15856
- | AzureSpeechTranscriber
15857
- | CustomTranscriber
15858
- | DeepgramTranscriber
15859
- | ElevenLabsTranscriber
15860
- | GladiaTranscriber
15861
- | GoogleTranscriber
15862
- | SpeechmaticsTranscriber
15863
- | TalkscriberTranscriber
15864
- | OpenAITranscriber
15865
- | CartesiaTranscriber;
15866
- /**
15867
- * This is the voice for the workflow.
15868
- *
15869
- * This can be overridden at node level using `nodes[n].voice`.
15870
- */
15871
- voice?:
15872
- | AzureVoice
15873
- | CartesiaVoice
15874
- | CustomVoice
15875
- | DeepgramVoice
15876
- | ElevenLabsVoice
15877
- | HumeVoice
15878
- | LMNTVoice
15879
- | NeuphonicVoice
15880
- | OpenAIVoice
15881
- | PlayHTVoice
15882
- | RimeAIVoice
15883
- | SmallestAIVoice
15884
- | TavusVoice
15885
- | VapiVoice
15886
- | SesameVoice
15887
- | InworldVoice
15888
- | MinimaxVoice;
15889
- /**
15890
- * This is the plan for observability of workflow's calls.
15891
- *
15892
- * Currently, only Langfuse is supported.
15893
- */
15894
- observabilityPlan?: LangfuseObservabilityPlan;
15895
- /**
15896
- * This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
15897
- * You can also provide a custom sound by providing a URL to an audio file.
15898
- */
15899
- backgroundSound?: "off" | "office" | string;
15900
- /** This is a set of actions that will be performed on certain events. */
15901
- hooks?: (
15902
- | CallHookCallEnding
15903
- | CallHookAssistantSpeechInterrupted
15904
- | CallHookCustomerSpeechInterrupted
15905
- | CallHookCustomerSpeechTimeout
15906
- )[];
15907
- /** These are dynamic credentials that will be used for the workflow calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. */
15908
- credentials?: (
15909
- | ({
15910
- provider: "11labs";
15911
- } & CreateElevenLabsCredentialDTO)
15912
- | ({
15913
- provider: "anthropic";
15914
- } & CreateAnthropicCredentialDTO)
15915
- | ({
15916
- provider: "anyscale";
15917
- } & CreateAnyscaleCredentialDTO)
15918
- | ({
15919
- provider: "assembly-ai";
15920
- } & CreateAssemblyAICredentialDTO)
15921
- | ({
15922
- provider: "azure-openai";
15923
- } & CreateAzureOpenAICredentialDTO)
15924
- | ({
15925
- provider: "azure";
15926
- } & CreateAzureCredentialDTO)
15927
- | ({
15928
- provider: "byo-sip-trunk";
15929
- } & CreateByoSipTrunkCredentialDTO)
15930
- | ({
15931
- provider: "cartesia";
15932
- } & CreateCartesiaCredentialDTO)
15933
- | ({
15934
- provider: "cerebras";
15935
- } & CreateCerebrasCredentialDTO)
15936
- | ({
15937
- provider: "cloudflare";
15938
- } & CreateCloudflareCredentialDTO)
15939
- | ({
15940
- provider: "custom-llm";
15941
- } & CreateCustomLLMCredentialDTO)
15942
- | ({
15943
- provider: "deepgram";
15944
- } & CreateDeepgramCredentialDTO)
15945
- | ({
15946
- provider: "deepinfra";
15947
- } & CreateDeepInfraCredentialDTO)
15948
- | ({
15949
- provider: "deep-seek";
15950
- } & CreateDeepSeekCredentialDTO)
15951
- | ({
15952
- provider: "gcp";
15953
- } & CreateGcpCredentialDTO)
15954
- | ({
15955
- provider: "gladia";
15956
- } & CreateGladiaCredentialDTO)
15957
- | ({
15958
- provider: "gohighlevel";
15959
- } & CreateGoHighLevelCredentialDTO)
15960
- | ({
15961
- provider: "google";
15962
- } & CreateGoogleCredentialDTO)
15963
- | ({
15964
- provider: "groq";
15965
- } & CreateGroqCredentialDTO)
15966
- | ({
15967
- provider: "inflection-ai";
15968
- } & CreateInflectionAICredentialDTO)
15969
- | ({
15970
- provider: "langfuse";
15971
- } & CreateLangfuseCredentialDTO)
15972
- | ({
15973
- provider: "lmnt";
15974
- } & CreateLmntCredentialDTO)
15975
- | ({
15976
- provider: "make";
15977
- } & CreateMakeCredentialDTO)
15978
- | ({
15979
- provider: "openai";
15980
- } & CreateOpenAICredentialDTO)
15981
- | ({
15982
- provider: "openrouter";
15983
- } & CreateOpenRouterCredentialDTO)
15984
- | ({
15985
- provider: "perplexity-ai";
15986
- } & CreatePerplexityAICredentialDTO)
15987
- | ({
15988
- provider: "playht";
15989
- } & CreatePlayHTCredentialDTO)
15990
- | ({
15991
- provider: "rime-ai";
15992
- } & CreateRimeAICredentialDTO)
15993
- | ({
15994
- provider: "runpod";
15995
- } & CreateRunpodCredentialDTO)
15996
- | ({
15997
- provider: "s3";
15998
- } & CreateS3CredentialDTO)
15999
- | ({
16000
- provider: "supabase";
16001
- } & CreateSupabaseCredentialDTO)
16002
- | ({
16003
- provider: "smallest-ai";
16004
- } & CreateSmallestAICredentialDTO)
16005
- | ({
16006
- provider: "tavus";
16007
- } & CreateTavusCredentialDTO)
16008
- | ({
16009
- provider: "together-ai";
16010
- } & CreateTogetherAICredentialDTO)
16011
- | ({
16012
- provider: "twilio";
16013
- } & CreateTwilioCredentialDTO)
16014
- | ({
16015
- provider: "vonage";
16016
- } & CreateVonageCredentialDTO)
16017
- | ({
16018
- provider: "webhook";
16019
- } & CreateWebhookCredentialDTO)
16020
- | ({
16021
- provider: "custom-credential";
16022
- } & CreateCustomCredentialDTO)
16023
- | ({
16024
- provider: "xai";
16025
- } & CreateXAiCredentialDTO)
16026
- | ({
16027
- provider: "neuphonic";
16028
- } & CreateNeuphonicCredentialDTO)
16029
- | ({
16030
- provider: "hume";
16031
- } & CreateHumeCredentialDTO)
16032
- | ({
16033
- provider: "mistral";
16034
- } & CreateMistralCredentialDTO)
16035
- | ({
16036
- provider: "speechmatics";
16037
- } & CreateSpeechmaticsCredentialDTO)
16038
- | ({
16039
- provider: "trieve";
16040
- } & CreateTrieveCredentialDTO)
16041
- | ({
16042
- provider: "google.calendar.oauth2-client";
16043
- } & CreateGoogleCalendarOAuth2ClientCredentialDTO)
16044
- | ({
16045
- provider: "google.calendar.oauth2-authorization";
16046
- } & CreateGoogleCalendarOAuth2AuthorizationCredentialDTO)
16047
- | ({
16048
- provider: "google.sheets.oauth2-authorization";
16049
- } & CreateGoogleSheetsOAuth2AuthorizationCredentialDTO)
16050
- | ({
16051
- provider: "slack.oauth2-authorization";
16052
- } & CreateSlackOAuth2AuthorizationCredentialDTO)
16053
- | ({
16054
- provider: "ghl.oauth2-authorization";
16055
- } & CreateGoHighLevelMCPCredentialDTO)
16056
- | ({
16057
- provider: "inworld";
16058
- } & CreateInworldCredentialDTO)
16059
- | ({
16060
- provider: "minimax";
16061
- } & CreateMinimaxCredentialDTO)
16062
- )[];
16063
- /** @maxLength 80 */
16064
- name: string;
16065
- edges: Edge[];
16066
- /** @maxLength 5000 */
16067
- globalPrompt?: string;
16068
16122
  /**
16069
- * This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema.
16070
- *
16071
- * The order of precedence is:
16072
- *
16073
- * 1. tool.server
16074
- * 2. workflow.server / assistant.server
16075
- * 3. phoneNumber.server
16076
- * 4. org.server
16077
- */
16078
- server?: Server;
16079
- /** This is the compliance plan for the workflow. It allows you to configure HIPAA and other compliance settings. */
16080
- compliancePlan?: CompliancePlan;
16081
- /** This is the plan for analysis of workflow's calls. Stored in `call.analysis`. */
16082
- analysisPlan?: AnalysisPlan;
16083
- /** This is the plan for artifacts generated during workflow's calls. Stored in `call.artifact`. */
16084
- artifactPlan?: ArtifactPlan;
16085
- /**
16086
- * This is the plan for when the workflow nodes should start talking.
16087
- *
16088
- * You should configure this if you're running into these issues:
16089
- * - The assistant is too slow to start talking after the customer is done speaking.
16090
- * - The assistant is too fast to start talking after the customer is done speaking.
16091
- * - The assistant is so fast that it's actually interrupting the customer.
16092
- */
16093
- startSpeakingPlan?: StartSpeakingPlan;
16094
- /**
16095
- * This is the plan for when workflow nodes should stop talking on customer interruption.
16096
- *
16097
- * You should configure this if you're running into these issues:
16098
- * - The assistant is too slow to recognize customer's interruption.
16099
- * - The assistant is too fast to recognize customer's interruption.
16100
- * - The assistant is getting interrupted by phrases that are just acknowledgments.
16101
- * - The assistant is getting interrupted by background noises.
16102
- * - The assistant is not properly stopping -- it starts talking right after getting interrupted.
16103
- */
16104
- stopSpeakingPlan?: StopSpeakingPlan;
16105
- /**
16106
- * This is the plan for real-time monitoring of the workflow's calls.
16107
- *
16108
- * Usage:
16109
- * - To enable live listening of the workflow's calls, set `monitorPlan.listenEnabled` to `true`.
16110
- * - To enable live control of the workflow's calls, set `monitorPlan.controlEnabled` to `true`.
16111
- */
16112
- monitorPlan?: MonitorPlan;
16113
- /**
16114
- * This enables filtering of noise and background speech while the user is talking.
16115
- *
16116
- * Features:
16117
- * - Smart denoising using Krisp
16118
- * - Fourier denoising
16123
+ * This is the message that the assistant will say if the call is forwarded to voicemail.
16119
16124
  *
16120
- * Both can be used together. Order of precedence:
16121
- * - Smart denoising
16122
- * - Fourier denoising
16125
+ * If unspecified, it will hang up.
16126
+ * @maxLength 1000
16123
16127
  */
16124
- backgroundSpeechDenoisingPlan?: BackgroundSpeechDenoisingPlan;
16125
- /** These are the credentials that will be used for the workflow calls. By default, all the credentials are available for use in the call but you can provide a subset using this. */
16126
- credentialIds?: string[];
16127
- /** This is the plan for keypad input handling during workflow calls. */
16128
- keypadInputPlan?: KeypadInputPlan;
16128
+ voicemailMessage?: string;
16129
16129
  }
16130
16130
 
16131
- export interface UpdateWorkflowDTO {
16132
- nodes?: (ConversationNode | ToolNode)[];
16131
+ export interface CreateWorkflowDTO {
16132
+ nodes: (ConversationNode | ToolNode)[];
16133
16133
  /**
16134
16134
  * This is the model for the workflow.
16135
16135
  *
@@ -16354,6 +16354,319 @@ export interface UpdateWorkflowDTO {
16354
16354
  provider: "minimax";
16355
16355
  } & CreateMinimaxCredentialDTO)
16356
16356
  )[];
16357
+ /** This is the voicemail detection plan for the workflow. */
16358
+ voicemailDetection?:
16359
+ | GoogleVoicemailDetectionPlan
16360
+ | OpenAIVoicemailDetectionPlan
16361
+ | TwilioVoicemailDetectionPlan
16362
+ | VapiVoicemailDetectionPlan;
16363
+ /** @maxLength 80 */
16364
+ name: string;
16365
+ edges: Edge[];
16366
+ /** @maxLength 5000 */
16367
+ globalPrompt?: string;
16368
+ /**
16369
+ * This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema.
16370
+ *
16371
+ * The order of precedence is:
16372
+ *
16373
+ * 1. tool.server
16374
+ * 2. workflow.server / assistant.server
16375
+ * 3. phoneNumber.server
16376
+ * 4. org.server
16377
+ */
16378
+ server?: Server;
16379
+ /** This is the compliance plan for the workflow. It allows you to configure HIPAA and other compliance settings. */
16380
+ compliancePlan?: CompliancePlan;
16381
+ /** This is the plan for analysis of workflow's calls. Stored in `call.analysis`. */
16382
+ analysisPlan?: AnalysisPlan;
16383
+ /** This is the plan for artifacts generated during workflow's calls. Stored in `call.artifact`. */
16384
+ artifactPlan?: ArtifactPlan;
16385
+ /**
16386
+ * This is the plan for when the workflow nodes should start talking.
16387
+ *
16388
+ * You should configure this if you're running into these issues:
16389
+ * - The assistant is too slow to start talking after the customer is done speaking.
16390
+ * - The assistant is too fast to start talking after the customer is done speaking.
16391
+ * - The assistant is so fast that it's actually interrupting the customer.
16392
+ */
16393
+ startSpeakingPlan?: StartSpeakingPlan;
16394
+ /**
16395
+ * This is the plan for when workflow nodes should stop talking on customer interruption.
16396
+ *
16397
+ * You should configure this if you're running into these issues:
16398
+ * - The assistant is too slow to recognize customer's interruption.
16399
+ * - The assistant is too fast to recognize customer's interruption.
16400
+ * - The assistant is getting interrupted by phrases that are just acknowledgments.
16401
+ * - The assistant is getting interrupted by background noises.
16402
+ * - The assistant is not properly stopping -- it starts talking right after getting interrupted.
16403
+ */
16404
+ stopSpeakingPlan?: StopSpeakingPlan;
16405
+ /**
16406
+ * This is the plan for real-time monitoring of the workflow's calls.
16407
+ *
16408
+ * Usage:
16409
+ * - To enable live listening of the workflow's calls, set `monitorPlan.listenEnabled` to `true`.
16410
+ * - To enable live control of the workflow's calls, set `monitorPlan.controlEnabled` to `true`.
16411
+ */
16412
+ monitorPlan?: MonitorPlan;
16413
+ /**
16414
+ * This enables filtering of noise and background speech while the user is talking.
16415
+ *
16416
+ * Features:
16417
+ * - Smart denoising using Krisp
16418
+ * - Fourier denoising
16419
+ *
16420
+ * Both can be used together. Order of precedence:
16421
+ * - Smart denoising
16422
+ * - Fourier denoising
16423
+ */
16424
+ backgroundSpeechDenoisingPlan?: BackgroundSpeechDenoisingPlan;
16425
+ /** These are the credentials that will be used for the workflow calls. By default, all the credentials are available for use in the call but you can provide a subset using this. */
16426
+ credentialIds?: string[];
16427
+ /** This is the plan for keypad input handling during workflow calls. */
16428
+ keypadInputPlan?: KeypadInputPlan;
16429
+ /**
16430
+ * This is the message that the assistant will say if the call is forwarded to voicemail.
16431
+ *
16432
+ * If unspecified, it will hang up.
16433
+ * @maxLength 1000
16434
+ */
16435
+ voicemailMessage?: string;
16436
+ }
16437
+
16438
+ export interface UpdateWorkflowDTO {
16439
+ nodes?: (ConversationNode | ToolNode)[];
16440
+ /**
16441
+ * This is the model for the workflow.
16442
+ *
16443
+ * This can be overridden at node level using `nodes[n].model`.
16444
+ */
16445
+ model?:
16446
+ | WorkflowOpenAIModel
16447
+ | WorkflowAnthropicModel
16448
+ | WorkflowGoogleModel
16449
+ | WorkflowCustomModel;
16450
+ /**
16451
+ * This is the transcriber for the workflow.
16452
+ *
16453
+ * This can be overridden at node level using `nodes[n].transcriber`.
16454
+ */
16455
+ transcriber?:
16456
+ | AssemblyAITranscriber
16457
+ | AzureSpeechTranscriber
16458
+ | CustomTranscriber
16459
+ | DeepgramTranscriber
16460
+ | ElevenLabsTranscriber
16461
+ | GladiaTranscriber
16462
+ | GoogleTranscriber
16463
+ | SpeechmaticsTranscriber
16464
+ | TalkscriberTranscriber
16465
+ | OpenAITranscriber
16466
+ | CartesiaTranscriber;
16467
+ /**
16468
+ * This is the voice for the workflow.
16469
+ *
16470
+ * This can be overridden at node level using `nodes[n].voice`.
16471
+ */
16472
+ voice?:
16473
+ | AzureVoice
16474
+ | CartesiaVoice
16475
+ | CustomVoice
16476
+ | DeepgramVoice
16477
+ | ElevenLabsVoice
16478
+ | HumeVoice
16479
+ | LMNTVoice
16480
+ | NeuphonicVoice
16481
+ | OpenAIVoice
16482
+ | PlayHTVoice
16483
+ | RimeAIVoice
16484
+ | SmallestAIVoice
16485
+ | TavusVoice
16486
+ | VapiVoice
16487
+ | SesameVoice
16488
+ | InworldVoice
16489
+ | MinimaxVoice;
16490
+ /**
16491
+ * This is the plan for observability of workflow's calls.
16492
+ *
16493
+ * Currently, only Langfuse is supported.
16494
+ */
16495
+ observabilityPlan?: LangfuseObservabilityPlan;
16496
+ /**
16497
+ * This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
16498
+ * You can also provide a custom sound by providing a URL to an audio file.
16499
+ */
16500
+ backgroundSound?: "off" | "office" | string;
16501
+ /** This is a set of actions that will be performed on certain events. */
16502
+ hooks?: (
16503
+ | CallHookCallEnding
16504
+ | CallHookAssistantSpeechInterrupted
16505
+ | CallHookCustomerSpeechInterrupted
16506
+ | CallHookCustomerSpeechTimeout
16507
+ )[];
16508
+ /** These are dynamic credentials that will be used for the workflow calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. */
16509
+ credentials?: (
16510
+ | ({
16511
+ provider: "11labs";
16512
+ } & CreateElevenLabsCredentialDTO)
16513
+ | ({
16514
+ provider: "anthropic";
16515
+ } & CreateAnthropicCredentialDTO)
16516
+ | ({
16517
+ provider: "anyscale";
16518
+ } & CreateAnyscaleCredentialDTO)
16519
+ | ({
16520
+ provider: "assembly-ai";
16521
+ } & CreateAssemblyAICredentialDTO)
16522
+ | ({
16523
+ provider: "azure-openai";
16524
+ } & CreateAzureOpenAICredentialDTO)
16525
+ | ({
16526
+ provider: "azure";
16527
+ } & CreateAzureCredentialDTO)
16528
+ | ({
16529
+ provider: "byo-sip-trunk";
16530
+ } & CreateByoSipTrunkCredentialDTO)
16531
+ | ({
16532
+ provider: "cartesia";
16533
+ } & CreateCartesiaCredentialDTO)
16534
+ | ({
16535
+ provider: "cerebras";
16536
+ } & CreateCerebrasCredentialDTO)
16537
+ | ({
16538
+ provider: "cloudflare";
16539
+ } & CreateCloudflareCredentialDTO)
16540
+ | ({
16541
+ provider: "custom-llm";
16542
+ } & CreateCustomLLMCredentialDTO)
16543
+ | ({
16544
+ provider: "deepgram";
16545
+ } & CreateDeepgramCredentialDTO)
16546
+ | ({
16547
+ provider: "deepinfra";
16548
+ } & CreateDeepInfraCredentialDTO)
16549
+ | ({
16550
+ provider: "deep-seek";
16551
+ } & CreateDeepSeekCredentialDTO)
16552
+ | ({
16553
+ provider: "gcp";
16554
+ } & CreateGcpCredentialDTO)
16555
+ | ({
16556
+ provider: "gladia";
16557
+ } & CreateGladiaCredentialDTO)
16558
+ | ({
16559
+ provider: "gohighlevel";
16560
+ } & CreateGoHighLevelCredentialDTO)
16561
+ | ({
16562
+ provider: "google";
16563
+ } & CreateGoogleCredentialDTO)
16564
+ | ({
16565
+ provider: "groq";
16566
+ } & CreateGroqCredentialDTO)
16567
+ | ({
16568
+ provider: "inflection-ai";
16569
+ } & CreateInflectionAICredentialDTO)
16570
+ | ({
16571
+ provider: "langfuse";
16572
+ } & CreateLangfuseCredentialDTO)
16573
+ | ({
16574
+ provider: "lmnt";
16575
+ } & CreateLmntCredentialDTO)
16576
+ | ({
16577
+ provider: "make";
16578
+ } & CreateMakeCredentialDTO)
16579
+ | ({
16580
+ provider: "openai";
16581
+ } & CreateOpenAICredentialDTO)
16582
+ | ({
16583
+ provider: "openrouter";
16584
+ } & CreateOpenRouterCredentialDTO)
16585
+ | ({
16586
+ provider: "perplexity-ai";
16587
+ } & CreatePerplexityAICredentialDTO)
16588
+ | ({
16589
+ provider: "playht";
16590
+ } & CreatePlayHTCredentialDTO)
16591
+ | ({
16592
+ provider: "rime-ai";
16593
+ } & CreateRimeAICredentialDTO)
16594
+ | ({
16595
+ provider: "runpod";
16596
+ } & CreateRunpodCredentialDTO)
16597
+ | ({
16598
+ provider: "s3";
16599
+ } & CreateS3CredentialDTO)
16600
+ | ({
16601
+ provider: "supabase";
16602
+ } & CreateSupabaseCredentialDTO)
16603
+ | ({
16604
+ provider: "smallest-ai";
16605
+ } & CreateSmallestAICredentialDTO)
16606
+ | ({
16607
+ provider: "tavus";
16608
+ } & CreateTavusCredentialDTO)
16609
+ | ({
16610
+ provider: "together-ai";
16611
+ } & CreateTogetherAICredentialDTO)
16612
+ | ({
16613
+ provider: "twilio";
16614
+ } & CreateTwilioCredentialDTO)
16615
+ | ({
16616
+ provider: "vonage";
16617
+ } & CreateVonageCredentialDTO)
16618
+ | ({
16619
+ provider: "webhook";
16620
+ } & CreateWebhookCredentialDTO)
16621
+ | ({
16622
+ provider: "custom-credential";
16623
+ } & CreateCustomCredentialDTO)
16624
+ | ({
16625
+ provider: "xai";
16626
+ } & CreateXAiCredentialDTO)
16627
+ | ({
16628
+ provider: "neuphonic";
16629
+ } & CreateNeuphonicCredentialDTO)
16630
+ | ({
16631
+ provider: "hume";
16632
+ } & CreateHumeCredentialDTO)
16633
+ | ({
16634
+ provider: "mistral";
16635
+ } & CreateMistralCredentialDTO)
16636
+ | ({
16637
+ provider: "speechmatics";
16638
+ } & CreateSpeechmaticsCredentialDTO)
16639
+ | ({
16640
+ provider: "trieve";
16641
+ } & CreateTrieveCredentialDTO)
16642
+ | ({
16643
+ provider: "google.calendar.oauth2-client";
16644
+ } & CreateGoogleCalendarOAuth2ClientCredentialDTO)
16645
+ | ({
16646
+ provider: "google.calendar.oauth2-authorization";
16647
+ } & CreateGoogleCalendarOAuth2AuthorizationCredentialDTO)
16648
+ | ({
16649
+ provider: "google.sheets.oauth2-authorization";
16650
+ } & CreateGoogleSheetsOAuth2AuthorizationCredentialDTO)
16651
+ | ({
16652
+ provider: "slack.oauth2-authorization";
16653
+ } & CreateSlackOAuth2AuthorizationCredentialDTO)
16654
+ | ({
16655
+ provider: "ghl.oauth2-authorization";
16656
+ } & CreateGoHighLevelMCPCredentialDTO)
16657
+ | ({
16658
+ provider: "inworld";
16659
+ } & CreateInworldCredentialDTO)
16660
+ | ({
16661
+ provider: "minimax";
16662
+ } & CreateMinimaxCredentialDTO)
16663
+ )[];
16664
+ /** This is the voicemail detection plan for the workflow. */
16665
+ voicemailDetection?:
16666
+ | GoogleVoicemailDetectionPlan
16667
+ | OpenAIVoicemailDetectionPlan
16668
+ | TwilioVoicemailDetectionPlan
16669
+ | VapiVoicemailDetectionPlan;
16357
16670
  /** @maxLength 80 */
16358
16671
  name?: string;
16359
16672
  edges?: Edge[];
@@ -16420,6 +16733,13 @@ export interface UpdateWorkflowDTO {
16420
16733
  credentialIds?: string[];
16421
16734
  /** This is the plan for keypad input handling during workflow calls. */
16422
16735
  keypadInputPlan?: KeypadInputPlan;
16736
+ /**
16737
+ * This is the message that the assistant will say if the call is forwarded to voicemail.
16738
+ *
16739
+ * If unspecified, it will hang up.
16740
+ * @maxLength 1000
16741
+ */
16742
+ voicemailMessage?: string;
16423
16743
  }
16424
16744
 
16425
16745
  export interface AnalysisCostBreakdown {
@@ -16605,6 +16925,24 @@ export interface Artifact {
16605
16925
  * To enable, set `assistant.artifactPlan.structuredOutputIds` with the IDs of the structured outputs you want to extract.
16606
16926
  */
16607
16927
  structuredOutputs?: object;
16928
+ /** These are the transfer records from warm transfers, including destinations, transcripts, and status. */
16929
+ transfers?: string[];
16930
+ }
16931
+
16932
+ export interface RecordingConsent {
16933
+ /** This is the type of recording consent. */
16934
+ type: object;
16935
+ /**
16936
+ * This is the date and time the recording consent was granted.
16937
+ * If not specified, it means the recording consent was not granted.
16938
+ * @format date-time
16939
+ */
16940
+ grantedAt?: string;
16941
+ }
16942
+
16943
+ export interface Compliance {
16944
+ /** This is the recording consent of the call. Configure in `assistant.compliancePlan.recordingConsentPlan`. */
16945
+ recordingConsent?: RecordingConsent;
16608
16946
  }
16609
16947
 
16610
16948
  export interface WorkflowOverrides {
@@ -16881,6 +17219,7 @@ export interface Call {
16881
17219
  | "call.start.error-vapi-number-outbound-daily-limit"
16882
17220
  | "call.start.error-get-transport"
16883
17221
  | "call.start.error-subscription-wallet-does-not-exist"
17222
+ | "call.start.error-fraud-check-failed"
16884
17223
  | "call.start.error-subscription-frozen"
16885
17224
  | "call.start.error-subscription-insufficient-credits"
16886
17225
  | "call.start.error-subscription-upgrade-failed"
@@ -16933,6 +17272,7 @@ export interface Call {
16933
17272
  | "call.in-progress.error-providerfault-vapi-500-server-error"
16934
17273
  | "call.in-progress.error-providerfault-vapi-503-server-overloaded-error"
16935
17274
  | "pipeline-error-deepgram-transcriber-failed"
17275
+ | "pipeline-error-deepgram-transcriber-api-key-missing"
16936
17276
  | "call.in-progress.error-vapifault-deepgram-transcriber-failed"
16937
17277
  | "pipeline-error-gladia-transcriber-failed"
16938
17278
  | "call.in-progress.error-vapifault-gladia-transcriber-failed"
@@ -17423,6 +17763,8 @@ export interface Call {
17423
17763
  monitor?: Monitor;
17424
17764
  /** These are the artifacts created from the call. Configure in `assistant.artifactPlan`. */
17425
17765
  artifact?: Artifact;
17766
+ /** This is the compliance of the call. Configure in `assistant.compliancePlan`. */
17767
+ compliance?: Compliance;
17426
17768
  /**
17427
17769
  * The ID of the call as provided by the phone number service. callSid in Twilio. conversationUuid in Vonage. callControlId in Telnyx.
17428
17770
  *
@@ -17801,6 +18143,15 @@ export interface CreateWebCallDTO {
17801
18143
  workflow?: CreateWorkflowDTO;
17802
18144
  /** These are the overrides for the `workflow` or `workflowId`'s settings and template variables. */
17803
18145
  workflowOverrides?: WorkflowOverrides;
18146
+ /**
18147
+ * This determines whether the daily room will be deleted and all participants will be kicked once the user leaves the room.
18148
+ * If set to `false`, the room will be kept alive even after the user leaves, allowing clients to reconnect to the same room.
18149
+ * If set to `true`, the room will be deleted and reconnection will not be allowed.
18150
+ *
18151
+ * Defaults to `true`.
18152
+ * @example true
18153
+ */
18154
+ roomDeleteOnUserLeaveEnabled?: boolean;
17804
18155
  }
17805
18156
 
17806
18157
  export interface UpdateCallDTO {
@@ -17861,6 +18212,8 @@ export interface UserMessage {
17861
18212
  detectedThreats?: string[];
17862
18213
  /** The original message before filtering (only included if content was filtered). */
17863
18214
  originalMessage?: string;
18215
+ /** The metadata associated with the message. Currently used to store the transcriber's word level confidence. */
18216
+ metadata?: object;
17864
18217
  }
17865
18218
 
17866
18219
  export interface ToolCallFunction {
@@ -17868,7 +18221,7 @@ export interface ToolCallFunction {
17868
18221
  arguments: string;
17869
18222
  /**
17870
18223
  * This is the name of the function to call
17871
- * @maxLength 40
18224
+ * @maxLength 80
17872
18225
  */
17873
18226
  name: string;
17874
18227
  }
@@ -17951,6 +18304,10 @@ export interface Chat {
17951
18304
  * Only variable substitution is supported in chat contexts - other assistant properties cannot be overridden.
17952
18305
  */
17953
18306
  assistantOverrides?: AssistantOverrides;
18307
+ /** This is the squad that will be used for the chat. To use a transient squad, use `squad` instead. */
18308
+ squadId?: string;
18309
+ /** This is the squad that will be used for the chat. To use an existing squad, use `squadId` instead. */
18310
+ squad?: CreateSquadDTO;
17954
18311
  /**
17955
18312
  * This is the name of the chat. This is just for your own reference.
17956
18313
  * @maxLength 40
@@ -18025,6 +18382,33 @@ export interface Chat {
18025
18382
  cost?: number;
18026
18383
  }
18027
18384
 
18385
+ export interface TwilioSMSChatTransport {
18386
+ /**
18387
+ * This is the phone number that will be used to send the SMS.
18388
+ * If provided, will create a new session. If not provided, uses existing session's phoneNumberId.
18389
+ * The phone number must have SMS enabled and belong to your organization.
18390
+ */
18391
+ phoneNumberId?: string;
18392
+ /**
18393
+ * This is the customer who will receive the SMS.
18394
+ * If provided, will create a new session. If not provided, uses existing session's customer.
18395
+ */
18396
+ customer?: CreateCustomerDTO;
18397
+ /**
18398
+ * Whether to use LLM-generated messages for outbound SMS.
18399
+ * When true (default), input is processed by the assistant for a response.
18400
+ * When false, the input text is forwarded directly as the SMS message without LLM processing.
18401
+ * Useful for sending pre-defined messages or notifications.
18402
+ * @default true
18403
+ */
18404
+ useLLMGeneratedMessageForOutbound?: boolean;
18405
+ /**
18406
+ * The type of transport to use for sending the chat response.
18407
+ * Currently supports 'twilio.sms' for SMS delivery via Twilio.
18408
+ */
18409
+ type: "twilio.sms";
18410
+ }
18411
+
18028
18412
  export interface CreateChatDTO {
18029
18413
  /** This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. */
18030
18414
  assistantId?: string;
@@ -18035,6 +18419,10 @@ export interface CreateChatDTO {
18035
18419
  * Only variable substitution is supported in chat contexts - other assistant properties cannot be overridden.
18036
18420
  */
18037
18421
  assistantOverrides?: AssistantOverrides;
18422
+ /** This is the squad that will be used for the chat. To use a transient squad, use `squad` instead. */
18423
+ squadId?: string;
18424
+ /** This is the squad that will be used for the chat. To use an existing squad, use `squadId` instead. */
18425
+ squad?: CreateSquadDTO;
18038
18426
  /**
18039
18427
  * This is the name of the chat. This is just for your own reference.
18040
18428
  * @maxLength 40
@@ -18071,11 +18459,20 @@ export interface CreateChatDTO {
18071
18459
  * Mutually exclusive with sessionId.
18072
18460
  */
18073
18461
  previousChatId?: string;
18462
+ /**
18463
+ * This is used to send the chat through a transport like SMS.
18464
+ * If transport.phoneNumberId and transport.customer are provided, creates a new session.
18465
+ * If sessionId is provided without transport fields, uses existing session data.
18466
+ * Cannot specify both sessionId and transport fields (phoneNumberId/customer) together.
18467
+ */
18468
+ transport?: TwilioSMSChatTransport;
18074
18469
  }
18075
18470
 
18076
18471
  export interface GetChatPaginatedDTO {
18077
18472
  /** This is the unique identifier for the assistant that will be used for the chat. */
18078
18473
  assistantId?: string;
18474
+ /** This is the unique identifier for the squad that will be used for the chat. */
18475
+ squadId?: string;
18079
18476
  /** This is the unique identifier for the workflow that will be used for the chat. */
18080
18477
  workflowId?: string;
18081
18478
  /** This is the unique identifier for the session that will be used for the chat. */
@@ -18168,6 +18565,10 @@ export interface OpenAIResponsesRequest {
18168
18565
  * Only variable substitution is supported in chat contexts - other assistant properties cannot be overridden.
18169
18566
  */
18170
18567
  assistantOverrides?: AssistantOverrides;
18568
+ /** This is the squad that will be used for the chat. To use a transient squad, use `squad` instead. */
18569
+ squadId?: string;
18570
+ /** This is the squad that will be used for the chat. To use an existing squad, use `squadId` instead. */
18571
+ squad?: CreateSquadDTO;
18171
18572
  /**
18172
18573
  * This is the name of the chat. This is just for your own reference.
18173
18574
  * @maxLength 40
@@ -18203,6 +18604,13 @@ export interface OpenAIResponsesRequest {
18203
18604
  * Mutually exclusive with sessionId.
18204
18605
  */
18205
18606
  previousChatId?: string;
18607
+ /**
18608
+ * This is used to send the chat through a transport like SMS.
18609
+ * If transport.phoneNumberId and transport.customer are provided, creates a new session.
18610
+ * If sessionId is provided without transport fields, uses existing session data.
18611
+ * Cannot specify both sessionId and transport fields (phoneNumberId/customer) together.
18612
+ */
18613
+ transport?: TwilioSMSChatTransport;
18206
18614
  }
18207
18615
 
18208
18616
  export interface ChatAssistantOverrides {
@@ -18622,6 +19030,13 @@ export interface Session {
18622
19030
  * If assistantId is provided, this will be ignored.
18623
19031
  */
18624
19032
  assistant?: CreateAssistantDTO;
19033
+ /** This is the squad ID associated with this session. Use this when referencing an existing squad. */
19034
+ squadId?: string;
19035
+ /**
19036
+ * This is the squad configuration for this session. Use this when creating a new squad configuration.
19037
+ * If squadId is provided, this will be ignored.
19038
+ */
19039
+ squad?: CreateSquadDTO;
18625
19040
  /** This is an array of chat messages in the session. */
18626
19041
  messages?: (
18627
19042
  | SystemMessage
@@ -18660,6 +19075,13 @@ export interface CreateSessionDTO {
18660
19075
  * If assistantId is provided, this will be ignored.
18661
19076
  */
18662
19077
  assistant?: CreateAssistantDTO;
19078
+ /** This is the squad ID associated with this session. Use this when referencing an existing squad. */
19079
+ squadId?: string;
19080
+ /**
19081
+ * This is the squad configuration for this session. Use this when creating a new squad configuration.
19082
+ * If squadId is provided, this will be ignored.
19083
+ */
19084
+ squad?: CreateSquadDTO;
18663
19085
  /** This is an array of chat messages in the session. */
18664
19086
  messages?: (
18665
19087
  | SystemMessage
@@ -18706,6 +19128,8 @@ export interface GetSessionPaginatedDTO {
18706
19128
  name?: string;
18707
19129
  /** This is the ID of the assistant to filter sessions by. */
18708
19130
  assistantId?: string;
19131
+ /** This is the ID of the squad to filter sessions by. */
19132
+ squadId?: string;
18709
19133
  /** This is the ID of the workflow to filter sessions by. */
18710
19134
  workflowId?: string;
18711
19135
  /**
@@ -27298,6 +27722,939 @@ export interface UpdateTestSuiteRunDto {
27298
27722
  name?: string;
27299
27723
  }
27300
27724
 
27725
+ export interface CreateEvalDTO {
27726
+ /**
27727
+ * This is the mock conversation that will be used to evaluate the flow of the conversation.
27728
+ *
27729
+ * Mock Messages are used to simulate the flow of the conversation
27730
+ *
27731
+ * Evaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls
27732
+ * @example "[{ role: "user", content: "Hello, how are you?" }, { role: "assistant", judgePlan: { type: "exact", content: "I am good, thank you!" } }]"
27733
+ */
27734
+ messages: (
27735
+ | ChatEvalAssistantMessageMock
27736
+ | ChatEvalSystemMessageMock
27737
+ | ChatEvalToolResponseMessageMock
27738
+ | ChatEvalUserMessageMock
27739
+ | ChatEvalAssistantMessageEvaluation
27740
+ )[];
27741
+ /**
27742
+ * This is the name of the eval.
27743
+ * It helps identify what the eval is checking for.
27744
+ * @minLength 1
27745
+ * @maxLength 80
27746
+ * @example "Verified User Flow Eval"
27747
+ */
27748
+ name?: string;
27749
+ /**
27750
+ * This is the description of the eval.
27751
+ * This helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation.
27752
+ * @minLength 1
27753
+ * @maxLength 500
27754
+ * @example "This eval checks if the user flow is verified."
27755
+ */
27756
+ description?: string;
27757
+ /**
27758
+ * This is the type of the eval.
27759
+ * Currently it is fixed to `chat.mockConversation`.
27760
+ * @example "chat.mockConversation"
27761
+ */
27762
+ type: "chat.mockConversation";
27763
+ }
27764
+
27765
+ export interface Eval {
27766
+ /**
27767
+ * This is the mock conversation that will be used to evaluate the flow of the conversation.
27768
+ *
27769
+ * Mock Messages are used to simulate the flow of the conversation
27770
+ *
27771
+ * Evaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls
27772
+ * @example "[{ role: "user", content: "Hello, how are you?" }, { role: "assistant", judgePlan: { type: "exact", content: "I am good, thank you!" } }]"
27773
+ */
27774
+ messages: (
27775
+ | ChatEvalAssistantMessageMock
27776
+ | ChatEvalSystemMessageMock
27777
+ | ChatEvalToolResponseMessageMock
27778
+ | ChatEvalUserMessageMock
27779
+ | ChatEvalAssistantMessageEvaluation
27780
+ )[];
27781
+ id: string;
27782
+ orgId: string;
27783
+ /** @format date-time */
27784
+ createdAt: string;
27785
+ /** @format date-time */
27786
+ updatedAt: string;
27787
+ /**
27788
+ * This is the name of the eval.
27789
+ * It helps identify what the eval is checking for.
27790
+ * @minLength 1
27791
+ * @maxLength 80
27792
+ * @example "Verified User Flow Eval"
27793
+ */
27794
+ name?: string;
27795
+ /**
27796
+ * This is the description of the eval.
27797
+ * This helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation.
27798
+ * @minLength 1
27799
+ * @maxLength 500
27800
+ * @example "This eval checks if the user flow is verified."
27801
+ */
27802
+ description?: string;
27803
+ /**
27804
+ * This is the type of the eval.
27805
+ * Currently it is fixed to `chat.mockConversation`.
27806
+ * @example "chat.mockConversation"
27807
+ */
27808
+ type: "chat.mockConversation";
27809
+ }
27810
+
27811
+ export interface EvalModelListOptions {
27812
+ /** This is the provider of the model. */
27813
+ provider: "openai" | "anthropic" | "google" | "groq" | "custom-llm";
27814
+ }
27815
+
27816
+ export interface EvalUserEditable {
27817
+ /**
27818
+ * This is the mock conversation that will be used to evaluate the flow of the conversation.
27819
+ *
27820
+ * Mock Messages are used to simulate the flow of the conversation
27821
+ *
27822
+ * Evaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls
27823
+ * @example "[{ role: "user", content: "Hello, how are you?" }, { role: "assistant", judgePlan: { type: "exact", content: "I am good, thank you!" } }]"
27824
+ */
27825
+ messages: (
27826
+ | ChatEvalAssistantMessageMock
27827
+ | ChatEvalSystemMessageMock
27828
+ | ChatEvalToolResponseMessageMock
27829
+ | ChatEvalUserMessageMock
27830
+ | ChatEvalAssistantMessageEvaluation
27831
+ )[];
27832
+ /**
27833
+ * This is the name of the eval.
27834
+ * It helps identify what the eval is checking for.
27835
+ * @minLength 1
27836
+ * @maxLength 80
27837
+ * @example "Verified User Flow Eval"
27838
+ */
27839
+ name?: string;
27840
+ /**
27841
+ * This is the description of the eval.
27842
+ * This helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation.
27843
+ * @minLength 1
27844
+ * @maxLength 500
27845
+ * @example "This eval checks if the user flow is verified."
27846
+ */
27847
+ description?: string;
27848
+ /**
27849
+ * This is the type of the eval.
27850
+ * Currently it is fixed to `chat.mockConversation`.
27851
+ * @example "chat.mockConversation"
27852
+ */
27853
+ type: "chat.mockConversation";
27854
+ }
27855
+
27856
+ export interface ChatEvalAssistantMessageMockToolCall {
27857
+ /**
27858
+ * This is the name of the tool that will be called.
27859
+ * It should be one of the tools created in the organization.
27860
+ * @maxLength 100
27861
+ * @example "get_weather"
27862
+ */
27863
+ name: string;
27864
+ /**
27865
+ * This is the arguments that will be passed to the tool call.
27866
+ * @example ""{"city": "San Francisco"}""
27867
+ */
27868
+ arguments?: object;
27869
+ }
27870
+
27871
+ export interface ChatEvalAssistantMessageMock {
27872
+ /**
27873
+ * This is the role of the message author.
27874
+ * For a mock assistant message, the role is always 'assistant'
27875
+ * @default 'assistant'
27876
+ * @default "assistant"
27877
+ */
27878
+ role: "assistant";
27879
+ /**
27880
+ * This is the content of the assistant message.
27881
+ * This is the message that the assistant would have sent.
27882
+ * @maxLength 1000
27883
+ * @example "The weather in San Francisco is sunny."
27884
+ */
27885
+ content?: string;
27886
+ /**
27887
+ * This is the tool calls that will be made by the assistant.
27888
+ * @example "[{ name: "get_weather", arguments: { city: "San Francisco" } }]"
27889
+ */
27890
+ toolCalls?: ChatEvalAssistantMessageMockToolCall[];
27891
+ }
27892
+
27893
+ export interface ChatEvalSystemMessageMock {
27894
+ /**
27895
+ * This is the role of the message author.
27896
+ * For a mock system message, the role is always 'system'
27897
+ * @default 'system'
27898
+ * @default "system"
27899
+ */
27900
+ role: "system";
27901
+ /**
27902
+ * This is the content of the system message that would have been added in the middle of the conversation.
27903
+ * Do not include the assistant prompt as a part of this message. It will automatically be fetched during runtime.
27904
+ * @maxLength 100000000
27905
+ * @example "You are a helpful assistant."
27906
+ */
27907
+ content: string;
27908
+ }
27909
+
27910
+ export interface ChatEvalToolResponseMessageMock {
27911
+ /**
27912
+ * This is the role of the message author.
27913
+ * For a mock tool response message, the role is always 'tool'
27914
+ * @default 'tool'
27915
+ * @default "tool"
27916
+ */
27917
+ role: "tool";
27918
+ /**
27919
+ * This is the content of the tool response message. JSON Objects should be stringified.
27920
+ * @maxLength 1000
27921
+ */
27922
+ content: string;
27923
+ }
27924
+
27925
+ export interface ChatEvalUserMessageMock {
27926
+ /**
27927
+ * This is the role of the message author.
27928
+ * For a mock user message, the role is always 'user'
27929
+ * @default 'user'
27930
+ * @default "user"
27931
+ */
27932
+ role: "user";
27933
+ /**
27934
+ * This is the content of the user message.
27935
+ * This is the message that the user would have sent.
27936
+ * @maxLength 1000
27937
+ * @example "Hello, how are you?"
27938
+ */
27939
+ content: string;
27940
+ }
27941
+
27942
+ export interface AssistantMessageEvaluationContinuePlan {
27943
+ /**
27944
+ * This is whether the evaluation should exit if the assistant message evaluates to false.
27945
+ * By default, it is false and the evaluation will continue.
27946
+ * @default false
27947
+ */
27948
+ exitOnFailureEnabled?: boolean;
27949
+ /**
27950
+ * This is the content that will be used in the conversation for this assistant turn moving forward if provided.
27951
+ * It will override the content received from the model.
27952
+ * @maxLength 1000
27953
+ * @example "The weather in San Francisco is sunny."
27954
+ */
27955
+ contentOverride?: string;
27956
+ /**
27957
+ * This is the tool calls that will be used in the conversation for this assistant turn moving forward if provided.
27958
+ * It will override the tool calls received from the model.
27959
+ * @example "[{ name: "get_weather", arguments: { city: "San Francisco" } }]"
27960
+ */
27961
+ toolCallsOverride?: ChatEvalAssistantMessageMockToolCall[];
27962
+ }
27963
+
27964
+ export interface ChatEvalAssistantMessageEvaluation {
27965
+ /**
27966
+ * This is the role of the message author.
27967
+ * For an assistant message evaluation, the role is always 'assistant'
27968
+ * @default 'assistant'
27969
+ * @default "assistant"
27970
+ */
27971
+ role: "assistant";
27972
+ /**
27973
+ * This is the judge plan that instructs how to evaluate the assistant message.
27974
+ * The assistant message can be evaluated against fixed content (exact match or RegEx) or with an LLM-as-judge by defining the evaluation criteria in a prompt.
27975
+ */
27976
+ judgePlan:
27977
+ | AssistantMessageJudgePlanExact
27978
+ | AssistantMessageJudgePlanRegex
27979
+ | AssistantMessageJudgePlanAI;
27980
+ /**
27981
+ * This is the plan for how the overall evaluation will proceed after the assistant message is evaluated.
27982
+ * This lets you configure whether to stop the evaluation if this message fails, and whether to override any content for future turns
27983
+ */
27984
+ continuePlan?: AssistantMessageEvaluationContinuePlan;
27985
+ }
27986
+
27987
+ export interface AssistantMessageJudgePlanExact {
27988
+ /**
27989
+ * This is the type of the judge plan.
27990
+ * Use 'exact' for an exact match on the content and tool calls - without using LLM-as-a-judge.
27991
+ * @default 'exact'
27992
+ */
27993
+ type: "exact";
27994
+ /**
27995
+ * This is what that will be used to evaluate the model's message content.
27996
+ * If you provide a string, the assistant message content will be evaluated against it as an exact match, case-insensitive.
27997
+ * @maxLength 1000
27998
+ * @example "The weather in San Francisco is sunny."
27999
+ */
28000
+ content: string;
28001
+ /**
28002
+ * This is the tool calls that will be used to evaluate the model's message content.
28003
+ * The tool name must be a valid tool that the assistant is allowed to call.
28004
+ *
28005
+ * For the Query tool, the arguments for the tool call are in the format - {knowledgeBaseNames: ['kb_name', 'kb_name_2']}
28006
+ *
28007
+ * For the DTMF tool, the arguments for the tool call are in the format - {dtmf: "1234*"}
28008
+ *
28009
+ * For the Handoff tool, the arguments for the tool call are in the format - {destination: "assistant_id"}
28010
+ *
28011
+ * For the Transfer Call tool, the arguments for the tool call are in the format - {destination: "phone_number_or_assistant_id"}
28012
+ *
28013
+ * For all other tools, they are called without arguments or with user-defined arguments
28014
+ * @example "[{ name: "get_weather", arguments: { city: "San Francisco" } }]"
28015
+ */
28016
+ toolCalls?: ChatEvalAssistantMessageMockToolCall[];
28017
+ }
28018
+
28019
+ export interface EvalOpenAIModel {
28020
+ /** This is the provider of the model (`openai`). */
28021
+ provider: "openai";
28022
+ /**
28023
+ * This is the OpenAI model that will be used.
28024
+ *
28025
+ * When using Vapi OpenAI or your own Azure Credentials, you have the option to specify the region for the selected model. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest region that make sense.
28026
+ * This is helpful when you are required to comply with Data Residency rules. Learn more about Azure regions here https://azure.microsoft.com/en-us/explore/global-infrastructure/data-residency/.
28027
+ * @maxLength 100
28028
+ */
28029
+ model:
28030
+ | "gpt-5"
28031
+ | "gpt-5-mini"
28032
+ | "gpt-5-nano"
28033
+ | "gpt-4.1-2025-04-14"
28034
+ | "gpt-4.1-mini-2025-04-14"
28035
+ | "gpt-4.1-nano-2025-04-14"
28036
+ | "gpt-4.1"
28037
+ | "gpt-4.1-mini"
28038
+ | "gpt-4.1-nano"
28039
+ | "chatgpt-4o-latest"
28040
+ | "o3"
28041
+ | "o3-mini"
28042
+ | "o4-mini"
28043
+ | "o1-mini"
28044
+ | "o1-mini-2024-09-12"
28045
+ | "gpt-4o-mini-2024-07-18"
28046
+ | "gpt-4o-mini"
28047
+ | "gpt-4o"
28048
+ | "gpt-4o-2024-05-13"
28049
+ | "gpt-4o-2024-08-06"
28050
+ | "gpt-4o-2024-11-20"
28051
+ | "gpt-4-turbo"
28052
+ | "gpt-4-turbo-2024-04-09"
28053
+ | "gpt-4-turbo-preview"
28054
+ | "gpt-4-0125-preview"
28055
+ | "gpt-4-1106-preview"
28056
+ | "gpt-4"
28057
+ | "gpt-4-0613"
28058
+ | "gpt-3.5-turbo"
28059
+ | "gpt-3.5-turbo-0125"
28060
+ | "gpt-3.5-turbo-1106"
28061
+ | "gpt-3.5-turbo-16k"
28062
+ | "gpt-3.5-turbo-0613"
28063
+ | "gpt-4.1-2025-04-14:westus"
28064
+ | "gpt-4.1-2025-04-14:eastus2"
28065
+ | "gpt-4.1-2025-04-14:eastus"
28066
+ | "gpt-4.1-2025-04-14:westus3"
28067
+ | "gpt-4.1-2025-04-14:northcentralus"
28068
+ | "gpt-4.1-2025-04-14:southcentralus"
28069
+ | "gpt-4.1-mini-2025-04-14:westus"
28070
+ | "gpt-4.1-mini-2025-04-14:eastus2"
28071
+ | "gpt-4.1-mini-2025-04-14:eastus"
28072
+ | "gpt-4.1-mini-2025-04-14:westus3"
28073
+ | "gpt-4.1-mini-2025-04-14:northcentralus"
28074
+ | "gpt-4.1-mini-2025-04-14:southcentralus"
28075
+ | "gpt-4.1-nano-2025-04-14:westus"
28076
+ | "gpt-4.1-nano-2025-04-14:eastus2"
28077
+ | "gpt-4.1-nano-2025-04-14:westus3"
28078
+ | "gpt-4.1-nano-2025-04-14:northcentralus"
28079
+ | "gpt-4.1-nano-2025-04-14:southcentralus"
28080
+ | "gpt-4o-2024-11-20:swedencentral"
28081
+ | "gpt-4o-2024-11-20:westus"
28082
+ | "gpt-4o-2024-11-20:eastus2"
28083
+ | "gpt-4o-2024-11-20:eastus"
28084
+ | "gpt-4o-2024-11-20:westus3"
28085
+ | "gpt-4o-2024-11-20:southcentralus"
28086
+ | "gpt-4o-2024-08-06:westus"
28087
+ | "gpt-4o-2024-08-06:westus3"
28088
+ | "gpt-4o-2024-08-06:eastus"
28089
+ | "gpt-4o-2024-08-06:eastus2"
28090
+ | "gpt-4o-2024-08-06:northcentralus"
28091
+ | "gpt-4o-2024-08-06:southcentralus"
28092
+ | "gpt-4o-mini-2024-07-18:westus"
28093
+ | "gpt-4o-mini-2024-07-18:westus3"
28094
+ | "gpt-4o-mini-2024-07-18:eastus"
28095
+ | "gpt-4o-mini-2024-07-18:eastus2"
28096
+ | "gpt-4o-mini-2024-07-18:northcentralus"
28097
+ | "gpt-4o-mini-2024-07-18:southcentralus"
28098
+ | "gpt-4o-2024-05-13:eastus2"
28099
+ | "gpt-4o-2024-05-13:eastus"
28100
+ | "gpt-4o-2024-05-13:northcentralus"
28101
+ | "gpt-4o-2024-05-13:southcentralus"
28102
+ | "gpt-4o-2024-05-13:westus3"
28103
+ | "gpt-4o-2024-05-13:westus"
28104
+ | "gpt-4-turbo-2024-04-09:eastus2"
28105
+ | "gpt-4-0125-preview:eastus"
28106
+ | "gpt-4-0125-preview:northcentralus"
28107
+ | "gpt-4-0125-preview:southcentralus"
28108
+ | "gpt-4-1106-preview:australia"
28109
+ | "gpt-4-1106-preview:canadaeast"
28110
+ | "gpt-4-1106-preview:france"
28111
+ | "gpt-4-1106-preview:india"
28112
+ | "gpt-4-1106-preview:norway"
28113
+ | "gpt-4-1106-preview:swedencentral"
28114
+ | "gpt-4-1106-preview:uk"
28115
+ | "gpt-4-1106-preview:westus"
28116
+ | "gpt-4-1106-preview:westus3"
28117
+ | "gpt-4-0613:canadaeast"
28118
+ | "gpt-3.5-turbo-0125:canadaeast"
28119
+ | "gpt-3.5-turbo-0125:northcentralus"
28120
+ | "gpt-3.5-turbo-0125:southcentralus"
28121
+ | "gpt-3.5-turbo-1106:canadaeast"
28122
+ | "gpt-3.5-turbo-1106:westus";
28123
+ /**
28124
+ * This is the temperature of the model. For LLM-as-a-judge, it's recommended to set it between 0 - 0.3 to avoid hallucinations and ensure the model judges the output correctly based on the instructions.
28125
+ * @min 0
28126
+ * @max 2
28127
+ */
28128
+ temperature?: number;
28129
+ /**
28130
+ * This is the max tokens of the model.
28131
+ * If your Judge instructions return `true` or `false` takes only 1 token (as per the OpenAI Tokenizer), and therefore is recommended to set it to a low number to force the model to return a short response.
28132
+ * @min 50
28133
+ * @max 10000
28134
+ */
28135
+ maxTokens?: number;
28136
+ }
28137
+
28138
+ export interface EvalAnthropicModel {
28139
+ /** This is the provider of the model (`anthropic`). */
28140
+ provider: "anthropic";
28141
+ /**
28142
+ * This is the specific model that will be used.
28143
+ * @maxLength 100
28144
+ */
28145
+ model:
28146
+ | "claude-3-opus-20240229"
28147
+ | "claude-3-sonnet-20240229"
28148
+ | "claude-3-haiku-20240307"
28149
+ | "claude-3-5-sonnet-20240620"
28150
+ | "claude-3-5-sonnet-20241022"
28151
+ | "claude-3-5-haiku-20241022"
28152
+ | "claude-3-7-sonnet-20250219"
28153
+ | "claude-opus-4-20250514"
28154
+ | "claude-sonnet-4-20250514";
28155
+ /**
28156
+ * This is the optional configuration for Anthropic's thinking feature.
28157
+ *
28158
+ * - Only applicable for `claude-3-7-sonnet-20250219` model.
28159
+ * - If provided, `maxTokens` must be greater than `thinking.budgetTokens`.
28160
+ */
28161
+ thinking?: AnthropicThinkingConfig;
28162
+ /**
28163
+ * This is the temperature of the model. For LLM-as-a-judge, it's recommended to set it between 0 - 0.3 to avoid hallucinations and ensure the model judges the output correctly based on the instructions.
28164
+ * @min 0
28165
+ * @max 2
28166
+ */
28167
+ temperature?: number;
28168
+ /**
28169
+ * This is the max tokens of the model.
28170
+ * If your Judge instructions return `true` or `false` takes only 1 token (as per the OpenAI Tokenizer), and therefore is recommended to set it to a low number to force the model to return a short response.
28171
+ * @min 50
28172
+ * @max 10000
28173
+ */
28174
+ maxTokens?: number;
28175
+ }
28176
+
28177
+ export interface EvalGoogleModel {
28178
+ /** This is the provider of the model (`google`). */
28179
+ provider: "google";
28180
+ /**
28181
+ * This is the name of the model. Ex. gpt-4o
28182
+ * @maxLength 100
28183
+ */
28184
+ model:
28185
+ | "gemini-2.5-pro"
28186
+ | "gemini-2.5-flash"
28187
+ | "gemini-2.5-flash-lite"
28188
+ | "gemini-2.0-flash-thinking-exp"
28189
+ | "gemini-2.0-pro-exp-02-05"
28190
+ | "gemini-2.0-flash"
28191
+ | "gemini-2.0-flash-lite"
28192
+ | "gemini-2.0-flash-exp"
28193
+ | "gemini-2.0-flash-realtime-exp"
28194
+ | "gemini-1.5-flash"
28195
+ | "gemini-1.5-flash-002"
28196
+ | "gemini-1.5-pro"
28197
+ | "gemini-1.5-pro-002"
28198
+ | "gemini-1.0-pro";
28199
+ /**
28200
+ * This is the temperature of the model. For LLM-as-a-judge, it's recommended to set it between 0 - 0.3 to avoid hallucinations and ensure the model judges the output correctly based on the instructions.
28201
+ * @min 0
28202
+ * @max 2
28203
+ */
28204
+ temperature?: number;
28205
+ /**
28206
+ * This is the max tokens of the model.
28207
+ * If your Judge instructions return `true` or `false` takes only 1 token (as per the OpenAI Tokenizer), and therefore is recommended to set it to a low number to force the model to return a short response.
28208
+ * @min 50
28209
+ * @max 10000
28210
+ */
28211
+ maxTokens?: number;
28212
+ }
28213
+
28214
+ export interface EvalGroqModel {
28215
+ /** This is the provider of the model (`groq`). */
28216
+ provider: "groq";
28217
+ /**
28218
+ * This is the name of the model. Ex. gpt-4o
28219
+ * @maxLength 100
28220
+ */
28221
+ model:
28222
+ | "openai/gpt-oss-20b"
28223
+ | "openai/gpt-oss-120b"
28224
+ | "deepseek-r1-distill-llama-70b"
28225
+ | "llama-3.3-70b-versatile"
28226
+ | "llama-3.1-405b-reasoning"
28227
+ | "llama-3.1-8b-instant"
28228
+ | "llama3-8b-8192"
28229
+ | "llama3-70b-8192"
28230
+ | "gemma2-9b-it"
28231
+ | "moonshotai/kimi-k2-instruct-0905"
28232
+ | "meta-llama/llama-4-maverick-17b-128e-instruct"
28233
+ | "meta-llama/llama-4-scout-17b-16e-instruct"
28234
+ | "mistral-saba-24b"
28235
+ | "compound-beta"
28236
+ | "compound-beta-mini";
28237
+ /**
28238
+ * This is the temperature of the model. For LLM-as-a-judge, it's recommended to set it between 0 - 0.3 to avoid hallucinations and ensure the model judges the output correctly based on the instructions.
28239
+ * @min 0
28240
+ * @max 2
28241
+ */
28242
+ temperature?: number;
28243
+ /**
28244
+ * This is the max tokens of the model.
28245
+ * If your Judge instructions return `true` or `false` takes only 1 token (as per the OpenAI Tokenizer), and therefore is recommended to set it to a low number to force the model to return a short response.
28246
+ * @min 50
28247
+ * @max 10000
28248
+ */
28249
+ maxTokens?: number;
28250
+ }
28251
+
28252
+ export interface EvalCustomModel {
28253
+ /** This is the provider of the model (`custom-llm`). */
28254
+ provider: "custom-llm";
28255
+ /** These is the URL we'll use for the OpenAI client's `baseURL`. Ex. https://openrouter.ai/api/v1 */
28256
+ url: string;
28257
+ /** These are the headers we'll use for the OpenAI client's `headers`. */
28258
+ headers?: object;
28259
+ /**
28260
+ * This sets the timeout for the connection to the custom provider without needing to stream any tokens back. Default is 20 seconds.
28261
+ * @min 20
28262
+ * @max 600
28263
+ */
28264
+ timeoutSeconds?: number;
28265
+ /**
28266
+ * This is the name of the model. Ex. gpt-4o
28267
+ * @maxLength 100
28268
+ */
28269
+ model: string;
28270
+ /**
28271
+ * This is the temperature of the model. For LLM-as-a-judge, it's recommended to set it between 0 - 0.3 to avoid hallucinations and ensure the model judges the output correctly based on the instructions.
28272
+ * @min 0
28273
+ * @max 2
28274
+ */
28275
+ temperature?: number;
28276
+ /**
28277
+ * This is the max tokens of the model.
28278
+ * If your Judge instructions return `true` or `false` takes only 1 token (as per the OpenAI Tokenizer), and therefore is recommended to set it to a low number to force the model to return a short response.
28279
+ * @min 50
28280
+ * @max 10000
28281
+ */
28282
+ maxTokens?: number;
28283
+ }
28284
+
28285
+ export interface AssistantMessageJudgePlanAI {
28286
+ /**
28287
+ * This is the model to use for the LLM-as-a-judge.
28288
+ * If not provided, will default to the assistant's model.
28289
+ *
28290
+ * The instructions on how to evaluate the model output with this LLM-Judge must be passed as a system message in the messages array of the model.
28291
+ *
28292
+ * The Mock conversation can be passed to the LLM-Judge to evaluate using the prompt {{messages}} and will be evaluated as a LiquidJS Variable. To access and judge only the last message, use {{messages[-1]}}
28293
+ *
28294
+ * The LLM-Judge must respond with "pass" or "fail" and only those two responses are allowed.
28295
+ * @example "{"
28296
+ */
28297
+ model:
28298
+ | EvalOpenAIModel
28299
+ | EvalAnthropicModel
28300
+ | EvalGoogleModel
28301
+ | EvalCustomModel;
28302
+ /**
28303
+ * This is the type of the judge plan.
28304
+ * Use 'ai' to evaluate the assistant message content using LLM-as-a-judge.
28305
+ * @default 'ai'
28306
+ */
28307
+ type: "ai";
28308
+ }
28309
+
28310
+ export interface AssistantMessageJudgePlanRegex {
28311
+ /**
28312
+ * This is the type of the judge plan.
28313
+ * Use 'regex' for a regex match on the content and tool calls - without using LLM-as-a-judge.
28314
+ * @default 'regex'
28315
+ */
28316
+ type: "regex";
28317
+ /**
28318
+ * This is what that will be used to evaluate the model's message content.
28319
+ * The content will be evaluated against the regex pattern provided in the Judge Plan content field.
28320
+ * Evaluation is considered successful if the regex pattern matches any part of the assistant message content.
28321
+ * @maxLength 1000
28322
+ * @example "/sunny/i"
28323
+ */
28324
+ content: string;
28325
+ /**
28326
+ * This is the tool calls that will be used to evaluate the model's message content.
28327
+ * The tool name must be a valid tool that the assistant is allowed to call.
28328
+ * The values to the arguments for the tool call should be a Regular Expression.
28329
+ * Evaluation is considered successful if the regex pattern matches any part of each tool call argument.
28330
+ *
28331
+ * For the Query tool, the arguments for the tool call are in the format - {knowledgeBaseNames: ['kb_name', 'kb_name_2']}
28332
+ *
28333
+ * For the DTMF tool, the arguments for the tool call are in the format - {dtmf: "1234*"}
28334
+ *
28335
+ * For the Handoff tool, the arguments for the tool call are in the format - {destination: "assistant_id"}
28336
+ *
28337
+ * For the Transfer Call tool, the arguments for the tool call are in the format - {destination: "phone_number_or_assistant_id"}
28338
+ *
28339
+ * For all other tools, they are called without arguments or with user-defined arguments
28340
+ * @example "[{ name: "get_weather", arguments: { city: "/San Francisco/i" } }]"
28341
+ */
28342
+ toolCalls?: ChatEvalAssistantMessageMockToolCall[];
28343
+ }
28344
+
28345
+ export interface GetEvalPaginatedDTO {
28346
+ id?: string;
28347
+ /**
28348
+ * This is the page number to return. Defaults to 1.
28349
+ * @min 1
28350
+ */
28351
+ page?: number;
28352
+ /** This is the sort order for pagination. Defaults to 'DESC'. */
28353
+ sortOrder?: "ASC" | "DESC";
28354
+ /**
28355
+ * This is the maximum number of items to return. Defaults to 100.
28356
+ * @min 0
28357
+ * @max 1000
28358
+ */
28359
+ limit?: number;
28360
+ /**
28361
+ * This will return items where the createdAt is greater than the specified value.
28362
+ * @format date-time
28363
+ */
28364
+ createdAtGt?: string;
28365
+ /**
28366
+ * This will return items where the createdAt is less than the specified value.
28367
+ * @format date-time
28368
+ */
28369
+ createdAtLt?: string;
28370
+ /**
28371
+ * This will return items where the createdAt is greater than or equal to the specified value.
28372
+ * @format date-time
28373
+ */
28374
+ createdAtGe?: string;
28375
+ /**
28376
+ * This will return items where the createdAt is less than or equal to the specified value.
28377
+ * @format date-time
28378
+ */
28379
+ createdAtLe?: string;
28380
+ /**
28381
+ * This will return items where the updatedAt is greater than the specified value.
28382
+ * @format date-time
28383
+ */
28384
+ updatedAtGt?: string;
28385
+ /**
28386
+ * This will return items where the updatedAt is less than the specified value.
28387
+ * @format date-time
28388
+ */
28389
+ updatedAtLt?: string;
28390
+ /**
28391
+ * This will return items where the updatedAt is greater than or equal to the specified value.
28392
+ * @format date-time
28393
+ */
28394
+ updatedAtGe?: string;
28395
+ /**
28396
+ * This will return items where the updatedAt is less than or equal to the specified value.
28397
+ * @format date-time
28398
+ */
28399
+ updatedAtLe?: string;
28400
+ }
28401
+
28402
+ export interface EvalPaginatedResponse {
28403
+ results: Eval[];
28404
+ metadata: PaginationMeta;
28405
+ }
28406
+
28407
+ export interface UpdateEvalDTO {
28408
+ /**
28409
+ * This is the mock conversation that will be used to evaluate the flow of the conversation.
28410
+ *
28411
+ * Mock Messages are used to simulate the flow of the conversation
28412
+ *
28413
+ * Evaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls
28414
+ * @example "[{ role: "user", content: "Hello, how are you?" }, { role: "assistant", judgePlan: { type: "exact", content: "I am good, thank you!" } }]"
28415
+ */
28416
+ messages?: (
28417
+ | ChatEvalAssistantMessageMock
28418
+ | ChatEvalSystemMessageMock
28419
+ | ChatEvalToolResponseMessageMock
28420
+ | ChatEvalUserMessageMock
28421
+ | ChatEvalAssistantMessageEvaluation
28422
+ )[];
28423
+ /**
28424
+ * This is the name of the eval.
28425
+ * It helps identify what the eval is checking for.
28426
+ * @minLength 1
28427
+ * @maxLength 80
28428
+ * @example "Verified User Flow Eval"
28429
+ */
28430
+ name?: string;
28431
+ /**
28432
+ * This is the description of the eval.
28433
+ * This helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation.
28434
+ * @minLength 1
28435
+ * @maxLength 500
28436
+ * @example "This eval checks if the user flow is verified."
28437
+ */
28438
+ description?: string;
28439
+ /**
28440
+ * This is the type of the eval.
28441
+ * Currently it is fixed to `chat.mockConversation`.
28442
+ * @example "chat.mockConversation"
28443
+ */
28444
+ type?: "chat.mockConversation";
28445
+ }
28446
+
28447
+ export interface CreateEvalRunDTO {
28448
+ /** This is the transient eval that will be run */
28449
+ eval?: CreateEvalDTO;
28450
+ /** This is the target that will be run against the eval */
28451
+ target: EvalRunTargetAssistant | EvalRunTargetSquad;
28452
+ /**
28453
+ * This is the type of the run.
28454
+ * Currently it is fixed to `eval`.
28455
+ * @example "eval"
28456
+ */
28457
+ type: "eval";
28458
+ /**
28459
+ * This is the id of the eval that will be run.
28460
+ * @example "123e4567-e89b-12d3-a456-426614174000"
28461
+ */
28462
+ evalId?: string;
28463
+ }
28464
+
28465
+ export interface EvalRunResult {
28466
+ /**
28467
+ * This is the status of the eval run result.
28468
+ * The status is only 'pass' or 'fail' for an eval run result.
28469
+ * Currently, An eval is considered `pass` only if all the Assistant Judge messages are evaluated to pass.
28470
+ * @example "pass"
28471
+ */
28472
+ status: "pass" | "fail";
28473
+ /**
28474
+ * This is the messages of the eval run result.
28475
+ * It contains the user/system messages
28476
+ */
28477
+ messages: (
28478
+ | ChatEvalUserMessageMock
28479
+ | ChatEvalSystemMessageMock
28480
+ | ChatEvalToolResponseMessageMock
28481
+ | ChatEvalAssistantMessageMock
28482
+ )[];
28483
+ /**
28484
+ * This is the start time of the eval run result.
28485
+ * @format date-time
28486
+ * @example "2021-01-01T00:00:00.000Z"
28487
+ */
28488
+ startedAt: string;
28489
+ /**
28490
+ * This is the end time of the eval run result.
28491
+ * @format date-time
28492
+ * @example "2021-01-01T00:00:00.000Z"
28493
+ */
28494
+ endedAt: string;
28495
+ }
28496
+
28497
+ export interface EvalRun {
28498
+ /**
28499
+ * This is the status of the eval run. When an eval run is created, the status is 'running'.
28500
+ * When the eval run is completed, the status is 'ended'.
28501
+ * @example "running"
28502
+ */
28503
+ status: "running" | "ended" | "queued";
28504
+ /**
28505
+ * This is the reason for the eval run to end.
28506
+ * When the eval run is completed normally i.e end of mock conversation, the status is 'mockConversation.done'.
28507
+ * When the eval fails due to an error like Chat error or incorrect configuration, the status is 'error'.
28508
+ * When the eval runs for too long, due to model issues or tool call issues, the status is 'timeout'.
28509
+ * When the eval run is cancelled by the user, the status is 'cancelled'.
28510
+ * When the eval run is cancelled by Vapi for any reason, the status is 'aborted'.
28511
+ * @example "mockConversation.done"
28512
+ */
28513
+ endedReason:
28514
+ | "mockConversation.done"
28515
+ | "error"
28516
+ | "timeout"
28517
+ | "cancelled"
28518
+ | "aborted";
28519
+ /** This is the transient eval that will be run */
28520
+ eval?: CreateEvalDTO;
28521
+ /** This is the target that will be run against the eval */
28522
+ target: EvalRunTargetAssistant | EvalRunTargetSquad;
28523
+ id: string;
28524
+ orgId: string;
28525
+ /** @format date-time */
28526
+ createdAt: string;
28527
+ /** @format date-time */
28528
+ startedAt: string;
28529
+ /** @format date-time */
28530
+ endedAt: string;
28531
+ /**
28532
+ * This is the ended message when the eval run ended for any reason apart from mockConversation.done
28533
+ * @example "The Assistant returned an error"
28534
+ */
28535
+ endedMessage?: string;
28536
+ /**
28537
+ * This is the results of the eval or suite run.
28538
+ * The array will have a single item for an eval run, and multiple items each corresponding to the an eval in a suite run in the same order as the evals in the suite.
28539
+ */
28540
+ results: EvalRunResult[];
28541
+ /**
28542
+ * This is the type of the run.
28543
+ * Currently it is fixed to `eval`.
28544
+ * @example "eval"
28545
+ */
28546
+ type: "eval";
28547
+ /**
28548
+ * This is the id of the eval that will be run.
28549
+ * @example "123e4567-e89b-12d3-a456-426614174000"
28550
+ */
28551
+ evalId?: string;
28552
+ }
28553
+
28554
+ export interface EvalRunPaginatedResponse {
28555
+ results: EvalRun[];
28556
+ metadata: PaginationMeta;
28557
+ }
28558
+
28559
+ export interface GetEvalRunPaginatedDTO {
28560
+ id?: string;
28561
+ /**
28562
+ * This is the page number to return. Defaults to 1.
28563
+ * @min 1
28564
+ */
28565
+ page?: number;
28566
+ /** This is the sort order for pagination. Defaults to 'DESC'. */
28567
+ sortOrder?: "ASC" | "DESC";
28568
+ /**
28569
+ * This is the maximum number of items to return. Defaults to 100.
28570
+ * @min 0
28571
+ * @max 1000
28572
+ */
28573
+ limit?: number;
28574
+ /**
28575
+ * This will return items where the createdAt is greater than the specified value.
28576
+ * @format date-time
28577
+ */
28578
+ createdAtGt?: string;
28579
+ /**
28580
+ * This will return items where the createdAt is less than the specified value.
28581
+ * @format date-time
28582
+ */
28583
+ createdAtLt?: string;
28584
+ /**
28585
+ * This will return items where the createdAt is greater than or equal to the specified value.
28586
+ * @format date-time
28587
+ */
28588
+ createdAtGe?: string;
28589
+ /**
28590
+ * This will return items where the createdAt is less than or equal to the specified value.
28591
+ * @format date-time
28592
+ */
28593
+ createdAtLe?: string;
28594
+ /**
28595
+ * This will return items where the updatedAt is greater than the specified value.
28596
+ * @format date-time
28597
+ */
28598
+ updatedAtGt?: string;
28599
+ /**
28600
+ * This will return items where the updatedAt is less than the specified value.
28601
+ * @format date-time
28602
+ */
28603
+ updatedAtLt?: string;
28604
+ /**
28605
+ * This will return items where the updatedAt is greater than or equal to the specified value.
28606
+ * @format date-time
28607
+ */
28608
+ updatedAtGe?: string;
28609
+ /**
28610
+ * This will return items where the updatedAt is less than or equal to the specified value.
28611
+ * @format date-time
28612
+ */
28613
+ updatedAtLe?: string;
28614
+ }
28615
+
28616
+ export interface EvalRunTargetAssistant {
28617
+ /** This is the transient assistant that will be run against the eval */
28618
+ assistant?: CreateAssistantDTO;
28619
+ /**
28620
+ * This is the overrides that will be applied to the assistant.
28621
+ * @example "{"
28622
+ */
28623
+ assistantOverrides?: AssistantOverrides;
28624
+ /**
28625
+ * This is the type of the target.
28626
+ * Currently it is fixed to `assistant`.
28627
+ * @example "assistant"
28628
+ */
28629
+ type: "assistant";
28630
+ /**
28631
+ * This is the id of the assistant that will be run against the eval
28632
+ * @example "123e4567-e89b-12d3-a456-426614174000"
28633
+ */
28634
+ assistantId?: string;
28635
+ }
28636
+
28637
+ export interface EvalRunTargetSquad {
28638
+ /** This is the transient squad that will be run against the eval */
28639
+ squad?: CreateSquadDTO;
28640
+ /**
28641
+ * This is the overrides that will be applied to the assistants.
28642
+ * @example "{"
28643
+ */
28644
+ assistantOverrides?: AssistantOverrides;
28645
+ /**
28646
+ * This is the type of the target.
28647
+ * Currently it is fixed to `squad`.
28648
+ * @example "squad"
28649
+ */
28650
+ type: "squad";
28651
+ /**
28652
+ * This is the id of the squad that will be run against the eval
28653
+ * @example "123e4567-e89b-12d3-a456-426614174000"
28654
+ */
28655
+ squadId?: string;
28656
+ }
28657
+
27301
28658
  export interface CreateOrgDTO {
27302
28659
  /**
27303
28660
  * When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false.
@@ -30745,6 +32102,14 @@ export interface CloneVoiceDTO {
30745
32102
  files: File[];
30746
32103
  }
30747
32104
 
32105
+ export interface VariableValueGroupBy {
32106
+ /**
32107
+ * This is the key of the variable value to group by.
32108
+ * @maxLength 100
32109
+ */
32110
+ key: string;
32111
+ }
32112
+
30748
32113
  export interface TimeRange {
30749
32114
  /**
30750
32115
  * This is the time step for aggregations.
@@ -30822,6 +32187,8 @@ export interface AnalyticsQuery {
30822
32187
  | "endedReason"
30823
32188
  | "analysis.successEvaluation"
30824
32189
  | "status";
32190
+ /** This is the list of variable value keys you want to group by. */
32191
+ groupByVariableValue?: VariableValueGroupBy[];
30825
32192
  /**
30826
32193
  * This is the name of the query. This will be used to identify the query in the response.
30827
32194
  * @maxLength 40
@@ -31416,6 +32783,7 @@ export interface ServerMessageEndOfCallReport {
31416
32783
  | "call.start.error-vapi-number-outbound-daily-limit"
31417
32784
  | "call.start.error-get-transport"
31418
32785
  | "call.start.error-subscription-wallet-does-not-exist"
32786
+ | "call.start.error-fraud-check-failed"
31419
32787
  | "call.start.error-subscription-frozen"
31420
32788
  | "call.start.error-subscription-insufficient-credits"
31421
32789
  | "call.start.error-subscription-upgrade-failed"
@@ -31468,6 +32836,7 @@ export interface ServerMessageEndOfCallReport {
31468
32836
  | "call.in-progress.error-providerfault-vapi-500-server-error"
31469
32837
  | "call.in-progress.error-providerfault-vapi-503-server-overloaded-error"
31470
32838
  | "pipeline-error-deepgram-transcriber-failed"
32839
+ | "pipeline-error-deepgram-transcriber-api-key-missing"
31471
32840
  | "call.in-progress.error-vapifault-deepgram-transcriber-failed"
31472
32841
  | "pipeline-error-gladia-transcriber-failed"
31473
32842
  | "call.in-progress.error-vapifault-gladia-transcriber-failed"
@@ -31957,6 +33326,38 @@ export interface ServerMessageEndOfCallReport {
31957
33326
  * @format date-time
31958
33327
  */
31959
33328
  endedAt?: string;
33329
+ /** This is the compliance result of the call. This can also be found at `call.compliance` on GET /call/:id. */
33330
+ compliance?: Compliance;
33331
+ }
33332
+
33333
+ export interface ServerMessageHandoffDestinationRequest {
33334
+ /** This is the phone number that the message is associated with. */
33335
+ phoneNumber?:
33336
+ | CreateByoPhoneNumberDTO
33337
+ | CreateTwilioPhoneNumberDTO
33338
+ | CreateVonagePhoneNumberDTO
33339
+ | CreateVapiPhoneNumberDTO
33340
+ | CreateTelnyxPhoneNumberDTO;
33341
+ /** This is the type of the message. "handoff-destination-request" is sent when the model is requesting handoff but destination is unknown. */
33342
+ type: "handoff-destination-request";
33343
+ /** This is the timestamp of the message. */
33344
+ timestamp?: number;
33345
+ /**
33346
+ * This is a live version of the `call.artifact`.
33347
+ *
33348
+ * This matches what is stored on `call.artifact` after the call.
33349
+ */
33350
+ artifact?: Artifact;
33351
+ /** This is the assistant that the message is associated with. */
33352
+ assistant?: CreateAssistantDTO;
33353
+ /** This is the customer that the message is associated with. */
33354
+ customer?: CreateCustomerDTO;
33355
+ /** This is the call that the message is associated with. */
33356
+ call?: Call;
33357
+ /** This is the chat object. */
33358
+ chat?: Chat;
33359
+ /** This is the parameters of the handoff destination request. */
33360
+ parameters: object;
31960
33361
  }
31961
33362
 
31962
33363
  export interface ServerMessageHang {
@@ -32169,6 +33570,7 @@ export interface ServerMessageStatusUpdate {
32169
33570
  | "call.start.error-vapi-number-outbound-daily-limit"
32170
33571
  | "call.start.error-get-transport"
32171
33572
  | "call.start.error-subscription-wallet-does-not-exist"
33573
+ | "call.start.error-fraud-check-failed"
32172
33574
  | "call.start.error-subscription-frozen"
32173
33575
  | "call.start.error-subscription-insufficient-credits"
32174
33576
  | "call.start.error-subscription-upgrade-failed"
@@ -32221,6 +33623,7 @@ export interface ServerMessageStatusUpdate {
32221
33623
  | "call.in-progress.error-providerfault-vapi-500-server-error"
32222
33624
  | "call.in-progress.error-providerfault-vapi-503-server-overloaded-error"
32223
33625
  | "pipeline-error-deepgram-transcriber-failed"
33626
+ | "pipeline-error-deepgram-transcriber-api-key-missing"
32224
33627
  | "call.in-progress.error-vapifault-deepgram-transcriber-failed"
32225
33628
  | "pipeline-error-gladia-transcriber-failed"
32226
33629
  | "call.in-progress.error-vapifault-gladia-transcriber-failed"
@@ -33231,6 +34634,7 @@ export interface ServerMessage {
33231
34634
  | ServerMessageAssistantRequest
33232
34635
  | ServerMessageConversationUpdate
33233
34636
  | ServerMessageEndOfCallReport
34637
+ | ServerMessageHandoffDestinationRequest
33234
34638
  | ServerMessageHang
33235
34639
  | ServerMessageKnowledgeBaseRequest
33236
34640
  | ServerMessageModelOutput
@@ -33329,6 +34733,8 @@ export interface ServerMessageResponseAssistantRequest {
33329
34733
  export interface ServerMessageResponseHandoffDestinationRequest {
33330
34734
  /** This is the destination you'd like the call to be transferred to. */
33331
34735
  destination: HandoffDestinationAssistant;
34736
+ /** This is the error message if the handoff should not be made. */
34737
+ error?: string;
33332
34738
  }
33333
34739
 
33334
34740
  export interface KnowledgeBaseResponseDocument {
@@ -33481,11 +34887,18 @@ export interface ClientInboundMessageControl {
33481
34887
  * This is the type of the message. Send "control" message to control the assistant. `control` options are:
33482
34888
  * - "mute-assistant" - mute the assistant
33483
34889
  * - "unmute-assistant" - unmute the assistant
34890
+ * - "mute-customer" - mute the user
34891
+ * - "unmute-customer" - unmute the user
33484
34892
  * - "say-first-message" - say the first message (this is used when video recording is enabled and the conversation is only started once the client side kicks off the recording)
33485
34893
  */
33486
34894
  type: "control";
33487
34895
  /** This is the control action */
33488
- control: "mute-assistant" | "unmute-assistant" | "say-first-message";
34896
+ control:
34897
+ | "mute-assistant"
34898
+ | "unmute-assistant"
34899
+ | "mute-customer"
34900
+ | "unmute-customer"
34901
+ | "say-first-message";
33489
34902
  }
33490
34903
 
33491
34904
  export interface ClientInboundMessageSay {
@@ -33580,7 +34993,13 @@ export interface ToolCallResultMessage {
33580
34993
  export interface TransportCost {
33581
34994
  /** This is the type of cost, always 'transport' for this class. */
33582
34995
  type: "transport";
33583
- provider?: "twilio" | "vonage" | "vapi";
34996
+ provider?:
34997
+ | "daily"
34998
+ | "vapi.websocket"
34999
+ | "twilio"
35000
+ | "vonage"
35001
+ | "telnyx"
35002
+ | "vapi.sip";
33584
35003
  /** This is the minutes of `transport` usage. This should match `call.endedAt` - `call.startedAt`. */
33585
35004
  minutes: number;
33586
35005
  /** This is the cost of the component in USD. */
@@ -35215,9 +36634,10 @@ export class HttpClient<SecurityDataType = unknown> {
35215
36634
  r.data = null as unknown as T;
35216
36635
  r.error = null as unknown as E;
35217
36636
 
36637
+ const responseToParse = responseFormat ? response.clone() : response;
35218
36638
  const data = !responseFormat
35219
36639
  ? r
35220
- : await response[responseFormat]()
36640
+ : await responseToParse[responseFormat]()
35221
36641
  .then((data) => {
35222
36642
  if (r.ok) {
35223
36643
  r.data = data;
@@ -35662,6 +37082,31 @@ export class Api<
35662
37082
  * @maxLength 40
35663
37083
  */
35664
37084
  externalId?: string;
37085
+ /**
37086
+ * Filter calls by structured output values. Use structured output ID as key and filter operators as values.
37087
+ * @example {"c9dddda4-d70a-4dad-aa5c-aaf117f85cea":{"eq":"2","gt":"1"}}
37088
+ */
37089
+ structuredOutputs?: Record<
37090
+ string,
37091
+ {
37092
+ /** Equal to */
37093
+ eq?: string;
37094
+ /** Not equal to */
37095
+ neq?: string;
37096
+ /** Greater than */
37097
+ gt?: string;
37098
+ /** Greater than or equal to */
37099
+ gte?: string;
37100
+ /** Less than */
37101
+ lt?: string;
37102
+ /** Less than or equal to */
37103
+ lte?: string;
37104
+ /** Contains */
37105
+ contains?: string;
37106
+ /** Not contains */
37107
+ notContains?: string;
37108
+ }
37109
+ >;
35665
37110
  /**
35666
37111
  * This is the page number to return. Defaults to 1.
35667
37112
  * @min 1
@@ -35815,6 +37260,31 @@ export class Api<
35815
37260
  * @maxLength 40
35816
37261
  */
35817
37262
  externalId?: string;
37263
+ /**
37264
+ * Filter calls by structured output values. Use structured output ID as key and filter operators as values.
37265
+ * @example {"c9dddda4-d70a-4dad-aa5c-aaf117f85cea":{"eq":"2","gt":"1"}}
37266
+ */
37267
+ structuredOutputs?: Record<
37268
+ string,
37269
+ {
37270
+ /** Equal to */
37271
+ eq?: string;
37272
+ /** Not equal to */
37273
+ neq?: string;
37274
+ /** Greater than */
37275
+ gt?: string;
37276
+ /** Greater than or equal to */
37277
+ gte?: string;
37278
+ /** Less than */
37279
+ lt?: string;
37280
+ /** Less than or equal to */
37281
+ lte?: string;
37282
+ /** Contains */
37283
+ contains?: string;
37284
+ /** Not contains */
37285
+ notContains?: string;
37286
+ }
37287
+ >;
35818
37288
  /**
35819
37289
  * This is the page number to return. Defaults to 1.
35820
37290
  * @min 1
@@ -35969,6 +37439,31 @@ export class Api<
35969
37439
  * @maxLength 40
35970
37440
  */
35971
37441
  externalId?: string;
37442
+ /**
37443
+ * Filter calls by structured output values. Use structured output ID as key and filter operators as values.
37444
+ * @example {"c9dddda4-d70a-4dad-aa5c-aaf117f85cea":{"eq":"2","gt":"1"}}
37445
+ */
37446
+ structuredOutputs?: Record<
37447
+ string,
37448
+ {
37449
+ /** Equal to */
37450
+ eq?: string;
37451
+ /** Not equal to */
37452
+ neq?: string;
37453
+ /** Greater than */
37454
+ gt?: string;
37455
+ /** Greater than or equal to */
37456
+ gte?: string;
37457
+ /** Less than */
37458
+ lt?: string;
37459
+ /** Less than or equal to */
37460
+ lte?: string;
37461
+ /** Contains */
37462
+ contains?: string;
37463
+ /** Not contains */
37464
+ notContains?: string;
37465
+ }
37466
+ >;
35972
37467
  /**
35973
37468
  * This is the page number to return. Defaults to 1.
35974
37469
  * @min 1
@@ -36588,6 +38083,8 @@ export class Api<
36588
38083
  query?: {
36589
38084
  /** This is the unique identifier for the assistant that will be used for the chat. */
36590
38085
  assistantId?: string;
38086
+ /** This is the unique identifier for the squad that will be used for the chat. */
38087
+ squadId?: string;
36591
38088
  /** This is the unique identifier for the workflow that will be used for the chat. */
36592
38089
  workflowId?: string;
36593
38090
  /** This is the unique identifier for the session that will be used for the chat. */
@@ -36658,7 +38155,7 @@ export class Api<
36658
38155
  }),
36659
38156
 
36660
38157
  /**
36661
- * @description Creates a new chat. Requires at least one of: assistantId/assistant, sessionId, or previousChatId. Note: sessionId and previousChatId are mutually exclusive.
38158
+ * @description Creates a new chat with optional SMS delivery via transport field. Requires at least one of: assistantId/assistant, sessionId, or previousChatId. Note: sessionId and previousChatId are mutually exclusive. Transport field enables SMS delivery with two modes: (1) New conversation - provide transport.phoneNumberId and transport.customer to create a new session, (2) Existing conversation - provide sessionId to use existing session data. Cannot specify both sessionId and transport fields together. The transport.useLLMGeneratedMessageForOutbound flag controls whether input is processed by LLM (true, default) or forwarded directly as SMS (false).
36662
38159
  *
36663
38160
  * @tags Chats
36664
38161
  * @name ChatControllerCreateChat
@@ -37000,6 +38497,8 @@ export class Api<
37000
38497
  name?: string;
37001
38498
  /** This is the ID of the assistant to filter sessions by. */
37002
38499
  assistantId?: string;
38500
+ /** This is the ID of the squad to filter sessions by. */
38501
+ squadId?: string;
37003
38502
  /** This is the ID of the workflow to filter sessions by. */
37004
38503
  workflowId?: string;
37005
38504
  /**
@@ -39112,6 +40611,296 @@ export class Api<
39112
40611
  ...params,
39113
40612
  }),
39114
40613
  };
40614
+ eval = {
40615
+ /**
40616
+ * No description
40617
+ *
40618
+ * @tags Eval
40619
+ * @name EvalControllerCreate
40620
+ * @summary Create Eval
40621
+ * @request POST:/eval
40622
+ * @secure
40623
+ */
40624
+ evalControllerCreate: (data: CreateEvalDTO, params: RequestParams = {}) =>
40625
+ this.request<Eval, any>({
40626
+ path: `/eval`,
40627
+ method: "POST",
40628
+ body: data,
40629
+ secure: true,
40630
+ type: ContentType.Json,
40631
+ format: "json",
40632
+ ...params,
40633
+ }),
40634
+
40635
+ /**
40636
+ * No description
40637
+ *
40638
+ * @tags Eval
40639
+ * @name EvalControllerGetPaginated
40640
+ * @summary List Evals
40641
+ * @request GET:/eval
40642
+ * @secure
40643
+ */
40644
+ evalControllerGetPaginated: (
40645
+ query?: {
40646
+ id?: string;
40647
+ /**
40648
+ * This is the page number to return. Defaults to 1.
40649
+ * @min 1
40650
+ */
40651
+ page?: number;
40652
+ /** This is the sort order for pagination. Defaults to 'DESC'. */
40653
+ sortOrder?: "ASC" | "DESC";
40654
+ /**
40655
+ * This is the maximum number of items to return. Defaults to 100.
40656
+ * @min 0
40657
+ * @max 1000
40658
+ */
40659
+ limit?: number;
40660
+ /**
40661
+ * This will return items where the createdAt is greater than the specified value.
40662
+ * @format date-time
40663
+ */
40664
+ createdAtGt?: string;
40665
+ /**
40666
+ * This will return items where the createdAt is less than the specified value.
40667
+ * @format date-time
40668
+ */
40669
+ createdAtLt?: string;
40670
+ /**
40671
+ * This will return items where the createdAt is greater than or equal to the specified value.
40672
+ * @format date-time
40673
+ */
40674
+ createdAtGe?: string;
40675
+ /**
40676
+ * This will return items where the createdAt is less than or equal to the specified value.
40677
+ * @format date-time
40678
+ */
40679
+ createdAtLe?: string;
40680
+ /**
40681
+ * This will return items where the updatedAt is greater than the specified value.
40682
+ * @format date-time
40683
+ */
40684
+ updatedAtGt?: string;
40685
+ /**
40686
+ * This will return items where the updatedAt is less than the specified value.
40687
+ * @format date-time
40688
+ */
40689
+ updatedAtLt?: string;
40690
+ /**
40691
+ * This will return items where the updatedAt is greater than or equal to the specified value.
40692
+ * @format date-time
40693
+ */
40694
+ updatedAtGe?: string;
40695
+ /**
40696
+ * This will return items where the updatedAt is less than or equal to the specified value.
40697
+ * @format date-time
40698
+ */
40699
+ updatedAtLe?: string;
40700
+ },
40701
+ params: RequestParams = {},
40702
+ ) =>
40703
+ this.request<EvalPaginatedResponse, any>({
40704
+ path: `/eval`,
40705
+ method: "GET",
40706
+ query: query,
40707
+ secure: true,
40708
+ format: "json",
40709
+ ...params,
40710
+ }),
40711
+
40712
+ /**
40713
+ * No description
40714
+ *
40715
+ * @tags Eval
40716
+ * @name EvalControllerUpdate
40717
+ * @summary Update Eval
40718
+ * @request PATCH:/eval/{id}
40719
+ * @secure
40720
+ */
40721
+ evalControllerUpdate: (
40722
+ id: string,
40723
+ data: UpdateEvalDTO,
40724
+ params: RequestParams = {},
40725
+ ) =>
40726
+ this.request<Eval, any>({
40727
+ path: `/eval/${id}`,
40728
+ method: "PATCH",
40729
+ body: data,
40730
+ secure: true,
40731
+ type: ContentType.Json,
40732
+ format: "json",
40733
+ ...params,
40734
+ }),
40735
+
40736
+ /**
40737
+ * No description
40738
+ *
40739
+ * @tags Eval
40740
+ * @name EvalControllerRemove
40741
+ * @summary Delete Eval
40742
+ * @request DELETE:/eval/{id}
40743
+ * @secure
40744
+ */
40745
+ evalControllerRemove: (id: string, params: RequestParams = {}) =>
40746
+ this.request<Eval, any>({
40747
+ path: `/eval/${id}`,
40748
+ method: "DELETE",
40749
+ secure: true,
40750
+ format: "json",
40751
+ ...params,
40752
+ }),
40753
+
40754
+ /**
40755
+ * No description
40756
+ *
40757
+ * @tags Eval
40758
+ * @name EvalControllerGet
40759
+ * @summary Get Eval
40760
+ * @request GET:/eval/{id}
40761
+ * @secure
40762
+ */
40763
+ evalControllerGet: (id: string, params: RequestParams = {}) =>
40764
+ this.request<Eval, any>({
40765
+ path: `/eval/${id}`,
40766
+ method: "GET",
40767
+ secure: true,
40768
+ format: "json",
40769
+ ...params,
40770
+ }),
40771
+
40772
+ /**
40773
+ * No description
40774
+ *
40775
+ * @tags Eval
40776
+ * @name EvalControllerRemoveRun
40777
+ * @summary Delete Eval Run
40778
+ * @request DELETE:/eval/run/{id}
40779
+ * @secure
40780
+ */
40781
+ evalControllerRemoveRun: (id: string, params: RequestParams = {}) =>
40782
+ this.request<EvalRun, any>({
40783
+ path: `/eval/run/${id}`,
40784
+ method: "DELETE",
40785
+ secure: true,
40786
+ format: "json",
40787
+ ...params,
40788
+ }),
40789
+
40790
+ /**
40791
+ * No description
40792
+ *
40793
+ * @tags Eval
40794
+ * @name EvalControllerGetRun
40795
+ * @summary Get Eval Run
40796
+ * @request GET:/eval/run/{id}
40797
+ * @secure
40798
+ */
40799
+ evalControllerGetRun: (id: string, params: RequestParams = {}) =>
40800
+ this.request<EvalRun, any>({
40801
+ path: `/eval/run/${id}`,
40802
+ method: "GET",
40803
+ secure: true,
40804
+ format: "json",
40805
+ ...params,
40806
+ }),
40807
+
40808
+ /**
40809
+ * No description
40810
+ *
40811
+ * @tags Eval
40812
+ * @name EvalControllerRun
40813
+ * @summary Create Eval Run
40814
+ * @request POST:/eval/run
40815
+ * @secure
40816
+ */
40817
+ evalControllerRun: (data: CreateEvalRunDTO, params: RequestParams = {}) =>
40818
+ this.request<void, any>({
40819
+ path: `/eval/run`,
40820
+ method: "POST",
40821
+ body: data,
40822
+ secure: true,
40823
+ type: ContentType.Json,
40824
+ ...params,
40825
+ }),
40826
+
40827
+ /**
40828
+ * No description
40829
+ *
40830
+ * @tags Eval
40831
+ * @name EvalControllerGetRunsPaginated
40832
+ * @summary List Eval Runs
40833
+ * @request GET:/eval/run
40834
+ * @secure
40835
+ */
40836
+ evalControllerGetRunsPaginated: (
40837
+ query?: {
40838
+ id?: string;
40839
+ /**
40840
+ * This is the page number to return. Defaults to 1.
40841
+ * @min 1
40842
+ */
40843
+ page?: number;
40844
+ /** This is the sort order for pagination. Defaults to 'DESC'. */
40845
+ sortOrder?: "ASC" | "DESC";
40846
+ /**
40847
+ * This is the maximum number of items to return. Defaults to 100.
40848
+ * @min 0
40849
+ * @max 1000
40850
+ */
40851
+ limit?: number;
40852
+ /**
40853
+ * This will return items where the createdAt is greater than the specified value.
40854
+ * @format date-time
40855
+ */
40856
+ createdAtGt?: string;
40857
+ /**
40858
+ * This will return items where the createdAt is less than the specified value.
40859
+ * @format date-time
40860
+ */
40861
+ createdAtLt?: string;
40862
+ /**
40863
+ * This will return items where the createdAt is greater than or equal to the specified value.
40864
+ * @format date-time
40865
+ */
40866
+ createdAtGe?: string;
40867
+ /**
40868
+ * This will return items where the createdAt is less than or equal to the specified value.
40869
+ * @format date-time
40870
+ */
40871
+ createdAtLe?: string;
40872
+ /**
40873
+ * This will return items where the updatedAt is greater than the specified value.
40874
+ * @format date-time
40875
+ */
40876
+ updatedAtGt?: string;
40877
+ /**
40878
+ * This will return items where the updatedAt is less than the specified value.
40879
+ * @format date-time
40880
+ */
40881
+ updatedAtLt?: string;
40882
+ /**
40883
+ * This will return items where the updatedAt is greater than or equal to the specified value.
40884
+ * @format date-time
40885
+ */
40886
+ updatedAtGe?: string;
40887
+ /**
40888
+ * This will return items where the updatedAt is less than or equal to the specified value.
40889
+ * @format date-time
40890
+ */
40891
+ updatedAtLe?: string;
40892
+ },
40893
+ params: RequestParams = {},
40894
+ ) =>
40895
+ this.request<EvalRunPaginatedResponse, any>({
40896
+ path: `/eval/run`,
40897
+ method: "GET",
40898
+ query: query,
40899
+ secure: true,
40900
+ format: "json",
40901
+ ...params,
40902
+ }),
40903
+ };
39115
40904
  org = {
39116
40905
  /**
39117
40906
  * No description