@vapi-ai/web 1.0.253 → 1.0.256
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/README.md +21 -3
- package/api.ts +681 -229
- package/dist/api.d.ts +590 -212
- package/dist/api.js +470 -326
- package/dist/client.js +2 -11
- package/dist/vapi.js +90 -108
- package/package.json +2 -2
- package/tsconfig.json +1 -1
- package/vapi.ts +3 -1
package/dist/api.d.ts
CHANGED
|
@@ -1,14 +1,90 @@
|
|
|
1
1
|
export interface DeepgramVoice {
|
|
2
|
-
/**
|
|
3
|
-
* This is the voice provider that will be used.
|
|
4
|
-
*
|
|
5
|
-
* Pro Voices: `11labs`, `playht`, `openai`
|
|
6
|
-
*
|
|
7
|
-
* Basic Voices: `rime-ai`, `deepgram`
|
|
8
|
-
*/
|
|
2
|
+
/** This is the voice provider that will be used. */
|
|
9
3
|
provider: "deepgram";
|
|
10
4
|
/** This is the provider-specific ID that will be used. */
|
|
11
|
-
voiceId: "
|
|
5
|
+
voiceId: "asteria" | "luna" | "hera" | "athena" | "varun" | "leo" | "perseus" | "helios" | "angus" | string;
|
|
6
|
+
}
|
|
7
|
+
export interface JsonSchema {
|
|
8
|
+
type: "string" | "number" | "integer" | "boolean" | "array" | "object";
|
|
9
|
+
/** This is of type JsonSchema. However, Swagger doesn't support circular references. */
|
|
10
|
+
items?: object;
|
|
11
|
+
/** This is an array of type JsonSchema. However, Swagger doesn't support circular references. */
|
|
12
|
+
prefixItems?: object;
|
|
13
|
+
/** This is of type JsonSchema. However, Swagger doesn't support circular references. */
|
|
14
|
+
contains?: object;
|
|
15
|
+
/** This is a map of string to JsonSchema. However, Swagger doesn't support circular references. */
|
|
16
|
+
properties?: object;
|
|
17
|
+
/** This is a map of string to JsonSchema objects. However, Swagger doesn't support circular references. */
|
|
18
|
+
patternProperties?: object;
|
|
19
|
+
/** This is of type JsonSchema. However, Swagger doesn't support circular references. */
|
|
20
|
+
additionalProperties?: object;
|
|
21
|
+
/** This is a map of string to JsonSchema objects. However, Swagger doesn't support circular references. */
|
|
22
|
+
dependentSchemas?: object;
|
|
23
|
+
/** This is of type JsonSchema. However, Swagger doesn't support circular references. */
|
|
24
|
+
propertyNames?: object;
|
|
25
|
+
/** This is of type JsonSchema. However, Swagger doesn't support circular references. */
|
|
26
|
+
unevaluatedProperties?: object;
|
|
27
|
+
/** This is of type JsonSchema. However, Swagger doesn't support circular references. */
|
|
28
|
+
const?: object;
|
|
29
|
+
/** This is of type JsonSchema. However, Swagger doesn't support circular references. */
|
|
30
|
+
not?: object;
|
|
31
|
+
/** This is an array of type JsonSchema. However, Swagger doesn't support circular references. */
|
|
32
|
+
oneOf?: object;
|
|
33
|
+
/** This is an array of type JsonSchema. However, Swagger doesn't support circular references. */
|
|
34
|
+
anyOf?: object;
|
|
35
|
+
/** This is an array of type JsonSchema. However, Swagger doesn't support circular references. */
|
|
36
|
+
allOf?: object;
|
|
37
|
+
/** This is of type JsonSchema. However, Swagger doesn't support circular references. */
|
|
38
|
+
if?: object;
|
|
39
|
+
/** This is of type JsonSchema. However, Swagger doesn't support circular references. */
|
|
40
|
+
then?: object;
|
|
41
|
+
/** This is of type JsonSchema. However, Swagger doesn't support circular references. */
|
|
42
|
+
else?: object;
|
|
43
|
+
title?: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
multipleOf?: number;
|
|
46
|
+
maximum?: number;
|
|
47
|
+
exclusiveMaximum?: number;
|
|
48
|
+
minimum?: number;
|
|
49
|
+
exclusiveMinimum?: number;
|
|
50
|
+
maxLength?: number;
|
|
51
|
+
/** @min 0 */
|
|
52
|
+
minLength?: number;
|
|
53
|
+
pattern?: string;
|
|
54
|
+
format?: string;
|
|
55
|
+
maxItems?: number;
|
|
56
|
+
/** @min 0 */
|
|
57
|
+
minItems?: number;
|
|
58
|
+
minContains?: number;
|
|
59
|
+
maxContains?: number;
|
|
60
|
+
maxProperties?: number;
|
|
61
|
+
/** @min 0 */
|
|
62
|
+
minProperties?: number;
|
|
63
|
+
required?: object[];
|
|
64
|
+
dependentRequired?: object;
|
|
65
|
+
enum?: object[];
|
|
66
|
+
$id?: string;
|
|
67
|
+
$ref?: string;
|
|
68
|
+
$schema?: string;
|
|
69
|
+
$comment?: string;
|
|
70
|
+
default?: object;
|
|
71
|
+
examples?: object[];
|
|
72
|
+
readOnly?: boolean;
|
|
73
|
+
writeOnly?: boolean;
|
|
74
|
+
contentEncoding?: string;
|
|
75
|
+
contentMediaType?: string;
|
|
76
|
+
}
|
|
77
|
+
export interface OpenAIFunctionParameters {
|
|
78
|
+
/** This must be set to 'object'. It instructs the model to return a JSON object containing the function call properties. */
|
|
79
|
+
type: "object";
|
|
80
|
+
/**
|
|
81
|
+
* This provides a description of the properties required by the function.
|
|
82
|
+
* JSON Schema can be used to specify expectations for each property.
|
|
83
|
+
* Refer to [this doc](https://ajv.js.org/json-schema.html#json-data-type) for a comprehensive guide on JSON Schema.
|
|
84
|
+
*/
|
|
85
|
+
properties: Record<string, JsonSchema>;
|
|
86
|
+
/** This specifies the properties that are required by the function. */
|
|
87
|
+
required?: string[];
|
|
12
88
|
}
|
|
13
89
|
export interface OpenAIFunction {
|
|
14
90
|
/**
|
|
@@ -16,6 +92,7 @@ export interface OpenAIFunction {
|
|
|
16
92
|
*
|
|
17
93
|
* Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
|
|
18
94
|
* @maxLength 64
|
|
95
|
+
* @pattern /^[a-zA-Z0-9_-]{1,64}$/
|
|
19
96
|
*/
|
|
20
97
|
name: string;
|
|
21
98
|
/** Setting async: true will cause the function to be called asynchronously, meaning that the Assistant will not wait for the function to return before continuing. */
|
|
@@ -25,86 +102,116 @@ export interface OpenAIFunction {
|
|
|
25
102
|
/**
|
|
26
103
|
* These are the parameters the functions accepts, described as a JSON Schema object.
|
|
27
104
|
*
|
|
28
|
-
* See the [OpenAI guide](https://platform.openai.com/docs/guides/
|
|
105
|
+
* See the [OpenAI guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema) for documentation about the format.
|
|
29
106
|
*
|
|
30
|
-
*
|
|
107
|
+
* Omitting parameters defines a function with an empty parameter list.
|
|
31
108
|
*/
|
|
32
|
-
parameters
|
|
109
|
+
parameters?: OpenAIFunctionParameters;
|
|
33
110
|
}
|
|
34
111
|
export interface TogetherAIModel {
|
|
35
112
|
provider: "together-ai";
|
|
36
113
|
/** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
|
|
37
114
|
model: string;
|
|
38
|
-
/** This sets the objective and understanding for the assistant. */
|
|
39
|
-
systemPrompt?: string;
|
|
40
115
|
/**
|
|
41
116
|
* This is the temperature that will be used for calls. Default is 1.
|
|
42
117
|
* @min 0
|
|
43
118
|
* @max 2
|
|
44
119
|
*/
|
|
45
120
|
temperature?: number;
|
|
121
|
+
/** This is the starting state for the conversation. */
|
|
122
|
+
messages: object[];
|
|
46
123
|
/** These are the functions that the assistant can execute during the call. */
|
|
47
124
|
functions?: OpenAIFunction[];
|
|
125
|
+
/**
|
|
126
|
+
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
127
|
+
* @min 50
|
|
128
|
+
* @max 1000
|
|
129
|
+
*/
|
|
130
|
+
maxTokens?: number;
|
|
48
131
|
}
|
|
49
132
|
export interface AnyscaleModel {
|
|
50
133
|
provider: "anyscale";
|
|
51
134
|
/** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
|
|
52
135
|
model: string;
|
|
53
|
-
/** This sets the objective and understanding for the assistant. */
|
|
54
|
-
systemPrompt?: string;
|
|
55
136
|
/**
|
|
56
137
|
* This is the temperature that will be used for calls. Default is 1.
|
|
57
138
|
* @min 0
|
|
58
139
|
* @max 2
|
|
59
140
|
*/
|
|
60
141
|
temperature?: number;
|
|
142
|
+
/** This is the starting state for the conversation. */
|
|
143
|
+
messages: object[];
|
|
61
144
|
/** These are the functions that the assistant can execute during the call. */
|
|
62
145
|
functions?: OpenAIFunction[];
|
|
146
|
+
/**
|
|
147
|
+
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
148
|
+
* @min 50
|
|
149
|
+
* @max 1000
|
|
150
|
+
*/
|
|
151
|
+
maxTokens?: number;
|
|
63
152
|
}
|
|
64
153
|
export interface OpenRouterModel {
|
|
65
154
|
provider: "openrouter";
|
|
66
155
|
/** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
|
|
67
156
|
model: string;
|
|
68
|
-
/** This sets the objective and understanding for the assistant. */
|
|
69
|
-
systemPrompt?: string;
|
|
70
157
|
/**
|
|
71
158
|
* This is the temperature that will be used for calls. Default is 1.
|
|
72
159
|
* @min 0
|
|
73
160
|
* @max 2
|
|
74
161
|
*/
|
|
75
162
|
temperature?: number;
|
|
163
|
+
/** This is the starting state for the conversation. */
|
|
164
|
+
messages: object[];
|
|
76
165
|
/** These are the functions that the assistant can execute during the call. */
|
|
77
166
|
functions?: OpenAIFunction[];
|
|
167
|
+
/**
|
|
168
|
+
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
169
|
+
* @min 50
|
|
170
|
+
* @max 1000
|
|
171
|
+
*/
|
|
172
|
+
maxTokens?: number;
|
|
78
173
|
}
|
|
79
174
|
export interface PerplexityAIModel {
|
|
80
175
|
provider: "perplexity-ai";
|
|
81
176
|
/** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
|
|
82
177
|
model: string;
|
|
83
|
-
/** This sets the objective and understanding for the assistant. */
|
|
84
|
-
systemPrompt?: string;
|
|
85
178
|
/**
|
|
86
179
|
* This is the temperature that will be used for calls. Default is 1.
|
|
87
180
|
* @min 0
|
|
88
181
|
* @max 2
|
|
89
182
|
*/
|
|
90
183
|
temperature?: number;
|
|
184
|
+
/** This is the starting state for the conversation. */
|
|
185
|
+
messages: object[];
|
|
91
186
|
/** These are the functions that the assistant can execute during the call. */
|
|
92
187
|
functions?: OpenAIFunction[];
|
|
188
|
+
/**
|
|
189
|
+
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
190
|
+
* @min 50
|
|
191
|
+
* @max 1000
|
|
192
|
+
*/
|
|
193
|
+
maxTokens?: number;
|
|
93
194
|
}
|
|
94
195
|
export interface DeepInfraModel {
|
|
95
196
|
provider: "deepinfra";
|
|
96
197
|
/** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
|
|
97
198
|
model: string;
|
|
98
|
-
/** This sets the objective and understanding for the assistant. */
|
|
99
|
-
systemPrompt?: string;
|
|
100
199
|
/**
|
|
101
200
|
* This is the temperature that will be used for calls. Default is 1.
|
|
102
201
|
* @min 0
|
|
103
202
|
* @max 2
|
|
104
203
|
*/
|
|
105
204
|
temperature?: number;
|
|
205
|
+
/** This is the starting state for the conversation. */
|
|
206
|
+
messages: object[];
|
|
106
207
|
/** These are the functions that the assistant can execute during the call. */
|
|
107
208
|
functions?: OpenAIFunction[];
|
|
209
|
+
/**
|
|
210
|
+
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
211
|
+
* @min 50
|
|
212
|
+
* @max 1000
|
|
213
|
+
*/
|
|
214
|
+
maxTokens?: number;
|
|
108
215
|
}
|
|
109
216
|
export interface CustomLLMModel {
|
|
110
217
|
/** This is the provider that will be used for the model. Any service, including your own server, that is compatible with the OpenAI API can be used. */
|
|
@@ -113,16 +220,43 @@ export interface CustomLLMModel {
|
|
|
113
220
|
url: string;
|
|
114
221
|
/** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
|
|
115
222
|
model: string;
|
|
116
|
-
/** This sets the objective and understanding for the assistant. */
|
|
117
|
-
systemPrompt?: string;
|
|
118
223
|
/**
|
|
119
224
|
* This is the temperature that will be used for calls. Default is 1.
|
|
120
225
|
* @min 0
|
|
121
226
|
* @max 2
|
|
122
227
|
*/
|
|
123
228
|
temperature?: number;
|
|
229
|
+
/** This is the starting state for the conversation. */
|
|
230
|
+
messages: object[];
|
|
124
231
|
/** These are the functions that the assistant can execute during the call. */
|
|
125
232
|
functions?: OpenAIFunction[];
|
|
233
|
+
/**
|
|
234
|
+
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
235
|
+
* @min 50
|
|
236
|
+
* @max 1000
|
|
237
|
+
*/
|
|
238
|
+
maxTokens?: number;
|
|
239
|
+
}
|
|
240
|
+
export interface GroqModel {
|
|
241
|
+
/** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
|
|
242
|
+
model: "mixtral-8x7b-32768";
|
|
243
|
+
provider: "groq";
|
|
244
|
+
/**
|
|
245
|
+
* This is the temperature that will be used for calls. Default is 1.
|
|
246
|
+
* @min 0
|
|
247
|
+
* @max 2
|
|
248
|
+
*/
|
|
249
|
+
temperature?: number;
|
|
250
|
+
/** This is the starting state for the conversation. */
|
|
251
|
+
messages: object[];
|
|
252
|
+
/** These are the functions that the assistant can execute during the call. */
|
|
253
|
+
functions?: OpenAIFunction[];
|
|
254
|
+
/**
|
|
255
|
+
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
256
|
+
* @min 50
|
|
257
|
+
* @max 1000
|
|
258
|
+
*/
|
|
259
|
+
maxTokens?: number;
|
|
126
260
|
}
|
|
127
261
|
export interface DeepgramTranscriber {
|
|
128
262
|
/** This is the transcription provider that will be used. Currently, only Deepgram is supported. */
|
|
@@ -133,38 +267,34 @@ export interface DeepgramTranscriber {
|
|
|
133
267
|
keywords?: string[];
|
|
134
268
|
}
|
|
135
269
|
export interface ElevenLabsVoice {
|
|
136
|
-
/**
|
|
137
|
-
* This is the voice provider that will be used.
|
|
138
|
-
*
|
|
139
|
-
* Pro Voices: `11labs`, `playht`
|
|
140
|
-
*
|
|
141
|
-
* Basic Voices: `rime-ai`, `deepgram`
|
|
142
|
-
*/
|
|
270
|
+
/** This is the voice provider that will be used. */
|
|
143
271
|
provider: "11labs";
|
|
144
272
|
/** This is the provider-specific ID that will be used. Ensure the Voice is present in your 11Labs Voice Library. */
|
|
145
|
-
voiceId: "burt" | "andrea" | "phillip" | "steve" | "joseph" | "myra" | "paula" | "ryan" | "drew" | "paul" | "mrb" | "matilda" | "mark" | string;
|
|
273
|
+
voiceId: "burt" | "marissa" | "andrea" | "phillip" | "steve" | "joseph" | "myra" | "paula" | "ryan" | "drew" | "paul" | "mrb" | "matilda" | "mark" | string;
|
|
146
274
|
/**
|
|
147
275
|
* Defines the stability for voice settings.
|
|
148
276
|
* @min 0
|
|
149
277
|
* @max 1
|
|
150
|
-
* @
|
|
278
|
+
* @example 0.5
|
|
151
279
|
*/
|
|
152
280
|
stability?: number;
|
|
153
281
|
/**
|
|
154
282
|
* Defines the similarity boost for voice settings.
|
|
155
283
|
* @min 0
|
|
156
284
|
* @max 1
|
|
157
|
-
* @
|
|
285
|
+
* @example 0.75
|
|
158
286
|
*/
|
|
159
287
|
similarityBoost?: number;
|
|
160
288
|
/**
|
|
161
289
|
* Defines the style for voice settings.
|
|
162
|
-
* @
|
|
290
|
+
* @min 0
|
|
291
|
+
* @max 1
|
|
292
|
+
* @example 0
|
|
163
293
|
*/
|
|
164
|
-
style?:
|
|
294
|
+
style?: number;
|
|
165
295
|
/**
|
|
166
296
|
* Defines the use speaker boost for voice settings.
|
|
167
|
-
* @
|
|
297
|
+
* @example false
|
|
168
298
|
*/
|
|
169
299
|
useSpeakerBoost?: boolean;
|
|
170
300
|
}
|
|
@@ -173,25 +303,25 @@ export interface OpenAIModel {
|
|
|
173
303
|
provider: "openai";
|
|
174
304
|
/** This is the OpenAI model that will be used. */
|
|
175
305
|
model: "gpt-4" | "gpt-3.5-turbo";
|
|
176
|
-
/** This sets the objective and understanding for the assistant. */
|
|
177
|
-
systemPrompt?: string;
|
|
178
306
|
/**
|
|
179
307
|
* This is the temperature that will be used for calls. Default is 1.
|
|
180
308
|
* @min 0
|
|
181
309
|
* @max 2
|
|
182
310
|
*/
|
|
183
311
|
temperature?: number;
|
|
312
|
+
/** This is the starting state for the conversation. */
|
|
313
|
+
messages: object[];
|
|
184
314
|
/** These are the functions that the assistant can execute during the call. */
|
|
185
315
|
functions?: OpenAIFunction[];
|
|
186
|
-
}
|
|
187
|
-
export interface PlayHTVoice {
|
|
188
316
|
/**
|
|
189
|
-
* This is the
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
* Basic Voices: `rime-ai`, `deepgram`
|
|
317
|
+
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
318
|
+
* @min 50
|
|
319
|
+
* @max 1000
|
|
194
320
|
*/
|
|
321
|
+
maxTokens?: number;
|
|
322
|
+
}
|
|
323
|
+
export interface PlayHTVoice {
|
|
324
|
+
/** This is the voice provider that will be used. */
|
|
195
325
|
provider: "playht";
|
|
196
326
|
/** This is the provider-specific ID that will be used. */
|
|
197
327
|
voiceId: "jennifer" | "melissa" | "will" | "chris" | "matt" | "jack" | "ruby" | "davis" | "donna" | "michael" | string;
|
|
@@ -199,69 +329,57 @@ export interface PlayHTVoice {
|
|
|
199
329
|
* This is the speed multiplier that will be used.
|
|
200
330
|
* @min 0
|
|
201
331
|
* @max 5
|
|
202
|
-
* @
|
|
332
|
+
* @example null
|
|
203
333
|
*/
|
|
204
334
|
speed?: number;
|
|
205
335
|
/**
|
|
206
|
-
* A floating point number between 0,
|
|
336
|
+
* A floating point number between 0, exclusive, and 2, inclusive. If equal to null or not provided, the model's default temperature will be used. The temperature parameter controls variance. Lower temperatures result in more predictable results, higher temperatures allow each run to vary more, so the voice may sound less like the baseline voice.
|
|
207
337
|
* @min 0.1
|
|
208
338
|
* @max 2
|
|
209
|
-
* @
|
|
339
|
+
* @example null
|
|
210
340
|
*/
|
|
211
341
|
temperature?: number;
|
|
212
342
|
/**
|
|
213
343
|
* An emotion to be applied to the speech.
|
|
214
|
-
* @
|
|
344
|
+
* @example null
|
|
215
345
|
*/
|
|
216
346
|
emotion?: "female_happy" | "female_sad" | "female_angry" | "female_fearful" | "female_disgust" | "female_surprised";
|
|
217
347
|
/**
|
|
218
348
|
* A number between 1 and 6. Use lower numbers to reduce how unique your chosen voice will be compared to other voices.
|
|
219
349
|
* @min 1
|
|
220
350
|
* @max 6
|
|
221
|
-
* @
|
|
351
|
+
* @example null
|
|
222
352
|
*/
|
|
223
353
|
voiceGuidance?: number;
|
|
224
354
|
/**
|
|
225
355
|
* A number between 1 and 30. Use lower numbers to to reduce how strong your chosen emotion will be. Higher numbers will create a very emotional performance.
|
|
226
356
|
* @min 1
|
|
227
357
|
* @max 30
|
|
228
|
-
* @
|
|
358
|
+
* @example null
|
|
229
359
|
*/
|
|
230
360
|
styleGuidance?: number;
|
|
231
361
|
/**
|
|
232
362
|
* A number between 1 and 2. This number influences how closely the generated speech adheres to the input text. Use lower values to create more fluid speech, but with a higher chance of deviating from the input text. Higher numbers will make the generated speech more accurate to the input text, ensuring that the words spoken align closely with the provided text.
|
|
233
363
|
* @min 1
|
|
234
364
|
* @max 2
|
|
235
|
-
* @
|
|
365
|
+
* @example null
|
|
236
366
|
*/
|
|
237
367
|
textGuidance?: number;
|
|
238
368
|
}
|
|
239
369
|
export interface RimeAIVoice {
|
|
240
|
-
/**
|
|
241
|
-
* This is the voice provider that will be used.
|
|
242
|
-
*
|
|
243
|
-
* Pro Voices: `11labs`, `playht`, `openai`
|
|
244
|
-
*
|
|
245
|
-
* Basic Voices: `rime-ai`, `deepgram`
|
|
246
|
-
*/
|
|
370
|
+
/** This is the voice provider that will be used. */
|
|
247
371
|
provider: "rime-ai";
|
|
248
372
|
/** This is the provider-specific ID that will be used. */
|
|
249
373
|
voiceId: "kai" | "zion" | "xavier" | "marty" | "hudson" | "savannah" | "colette" | "daphne" | "aurora" | "nova" | string;
|
|
250
374
|
/**
|
|
251
375
|
* This is the speed multiplier that will be used.
|
|
252
376
|
* @min 0
|
|
253
|
-
* @
|
|
377
|
+
* @example null
|
|
254
378
|
*/
|
|
255
379
|
speed?: number;
|
|
256
380
|
}
|
|
257
381
|
export interface OpenAIVoice {
|
|
258
|
-
/**
|
|
259
|
-
* This is the voice provider that will be used.
|
|
260
|
-
*
|
|
261
|
-
* Pro Voices: `11labs`, `playht`, `openai`
|
|
262
|
-
*
|
|
263
|
-
* Basic Voices: `rime-ai`, `deepgram`
|
|
264
|
-
*/
|
|
382
|
+
/** This is the voice provider that will be used. */
|
|
265
383
|
provider: "openai";
|
|
266
384
|
/** This is the provider-specific ID that will be used. */
|
|
267
385
|
voiceId: "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer" | string;
|
|
@@ -269,133 +387,90 @@ export interface OpenAIVoice {
|
|
|
269
387
|
* This is the speed multiplier that will be used.
|
|
270
388
|
* @min 0.25
|
|
271
389
|
* @max 4
|
|
272
|
-
* @
|
|
390
|
+
* @example null
|
|
273
391
|
*/
|
|
274
392
|
speed?: number;
|
|
275
393
|
}
|
|
394
|
+
export interface AzureVoice {
|
|
395
|
+
/** This is the voice provider that will be used. */
|
|
396
|
+
provider: "azure";
|
|
397
|
+
/** This is the provider-specific ID that will be used. */
|
|
398
|
+
voiceId: "andrew" | "brian" | "emma" | string;
|
|
399
|
+
}
|
|
276
400
|
export interface CreateAssistantDTO {
|
|
277
|
-
/**
|
|
278
|
-
* This is the name of the assistant. This is just for your own reference.
|
|
279
|
-
* @maxLength 100
|
|
280
|
-
* @default null
|
|
281
|
-
*/
|
|
282
|
-
name?: string;
|
|
283
|
-
/**
|
|
284
|
-
* These are the options for the assistant's transcriber.
|
|
285
|
-
* @default null
|
|
286
|
-
*/
|
|
287
|
-
transcriber?: DeepgramTranscriber;
|
|
288
401
|
/** These are the options for the assistant's LLM. */
|
|
289
|
-
model?: OpenAIModel | TogetherAIModel | AnyscaleModel | OpenRouterModel | PerplexityAIModel | DeepInfraModel | CustomLLMModel;
|
|
402
|
+
model?: OpenAIModel | TogetherAIModel | AnyscaleModel | OpenRouterModel | PerplexityAIModel | DeepInfraModel | GroqModel | CustomLLMModel;
|
|
290
403
|
/**
|
|
291
404
|
* These are the options for the assistant's voice.
|
|
292
405
|
* @default {"provider":"playht","voiceId":"jennifer"}
|
|
293
406
|
*/
|
|
294
|
-
voice?: ElevenLabsVoice | PlayHTVoice | RimeAIVoice | DeepgramVoice | OpenAIVoice;
|
|
407
|
+
voice?: AzureVoice | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | DeepgramVoice | OpenAIVoice;
|
|
295
408
|
/**
|
|
296
409
|
* This sets the spoken language of the user. The assistant will do its best to respond in the same language.
|
|
297
410
|
* When using a language other than `en-*`, only `11labs` voices will pronounce the words correctly. There will also be ~1sec of additional latency.
|
|
298
|
-
* @default null
|
|
299
411
|
*/
|
|
300
412
|
language?: "en" | "en-US" | "en-AU" | "en-GB" | "en-NZ" | "en-IN" | "fr" | "fr-CA" | "de" | "hi" | "hi-Latn" | "pt" | "pt-BR" | "es" | "es-419";
|
|
301
|
-
/** This is the number to forward to if assistant runs into issues. */
|
|
302
|
-
forwardingPhoneNumber?: string;
|
|
303
|
-
/**
|
|
304
|
-
* This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
|
|
305
|
-
*
|
|
306
|
-
* If unspecified, it will wait for the user to speak.
|
|
307
|
-
* @maxLength 1000
|
|
308
|
-
* @default "Hey there!"
|
|
309
|
-
*/
|
|
310
|
-
firstMessage?: string;
|
|
311
413
|
/**
|
|
312
|
-
* This is the
|
|
313
|
-
*
|
|
314
|
-
* If unspecified, it will hang up.
|
|
315
|
-
* @maxLength 1000
|
|
316
|
-
* @default null
|
|
414
|
+
* This is the number to forward to if assistant runs into issues.
|
|
415
|
+
* @example null
|
|
317
416
|
*/
|
|
318
|
-
|
|
319
|
-
/**
|
|
320
|
-
* This is the message that the assistant will say if it ends the call.
|
|
321
|
-
*
|
|
322
|
-
* If unspecified, it will hang up without saying anything.
|
|
323
|
-
* @maxLength 400
|
|
324
|
-
* @default null
|
|
325
|
-
*/
|
|
326
|
-
endCallMessage?: string;
|
|
417
|
+
forwardingPhoneNumber?: string;
|
|
327
418
|
/**
|
|
328
419
|
* This sets whether the user can interrupt the assistant while it's speaking. Defaults to true.
|
|
329
|
-
* @
|
|
420
|
+
* @example true
|
|
330
421
|
*/
|
|
331
422
|
interruptionsEnabled?: boolean;
|
|
332
423
|
/**
|
|
333
424
|
* This sets whether the assistant's calls are recorded. Defaults to true.
|
|
334
|
-
* @
|
|
425
|
+
* @example true
|
|
335
426
|
*/
|
|
336
427
|
recordingEnabled?: boolean;
|
|
337
428
|
/**
|
|
338
429
|
* This sets whether the assistant will be able to hang up the call. Defaults to false.
|
|
339
|
-
* @
|
|
430
|
+
* @example false
|
|
340
431
|
*/
|
|
341
432
|
endCallFunctionEnabled?: boolean;
|
|
342
433
|
/**
|
|
343
|
-
* This sets whether the assistant
|
|
434
|
+
* This sets whether the assistant can dial digits on the keypad. Defaults to false.
|
|
344
435
|
* @default null
|
|
345
436
|
*/
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
437
|
+
dialKeypadFunctionEnabled?: boolean;
|
|
438
|
+
/**
|
|
439
|
+
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'function-call', 'speech-update', 'metadata', 'conversation-update']
|
|
440
|
+
* @example ["transcript","hang","function-call","speech-update","metadata","conversation-update"]
|
|
441
|
+
*/
|
|
442
|
+
clientMessages?: "status-update" | "speech-update" | "transcript" | "hang" | "function-call" | "metadata" | "conversation-update";
|
|
443
|
+
/**
|
|
444
|
+
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'function-call']
|
|
445
|
+
* @example ["end-of-call-report","status-update","hang","function-call"]
|
|
446
|
+
*/
|
|
447
|
+
serverMessages?: "status-update" | "transcript" | "hang" | "function-call" | "end-of-call-report" | "conversation-update";
|
|
351
448
|
/**
|
|
352
449
|
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
353
450
|
* @min 10
|
|
354
451
|
* @max 600
|
|
355
|
-
* @
|
|
452
|
+
* @example 30
|
|
356
453
|
*/
|
|
357
454
|
silenceTimeoutSeconds?: number;
|
|
358
455
|
/**
|
|
359
456
|
* The minimum number of seconds after user speech to wait before the assistant starts speaking. Defaults to 0.4.
|
|
360
457
|
* @min 0
|
|
361
|
-
* @max
|
|
362
|
-
* @
|
|
458
|
+
* @max 2
|
|
459
|
+
* @example 0.4
|
|
363
460
|
*/
|
|
364
461
|
responseDelaySeconds?: number;
|
|
365
|
-
}
|
|
366
|
-
export interface Assistant {
|
|
367
462
|
/**
|
|
368
463
|
* This is the name of the assistant. This is just for your own reference.
|
|
369
464
|
* @maxLength 100
|
|
370
|
-
* @default null
|
|
371
465
|
*/
|
|
372
466
|
name?: string;
|
|
373
|
-
/**
|
|
374
|
-
* These are the options for the assistant's transcriber.
|
|
375
|
-
* @default null
|
|
376
|
-
*/
|
|
467
|
+
/** These are the options for the assistant's transcriber. */
|
|
377
468
|
transcriber?: DeepgramTranscriber;
|
|
378
|
-
/** These are the options for the assistant's LLM. */
|
|
379
|
-
model?: OpenAIModel | TogetherAIModel | AnyscaleModel | OpenRouterModel | PerplexityAIModel | DeepInfraModel | CustomLLMModel;
|
|
380
|
-
/**
|
|
381
|
-
* These are the options for the assistant's voice.
|
|
382
|
-
* @default {"provider":"playht","voiceId":"jennifer"}
|
|
383
|
-
*/
|
|
384
|
-
voice?: ElevenLabsVoice | PlayHTVoice | RimeAIVoice | DeepgramVoice | OpenAIVoice;
|
|
385
|
-
/**
|
|
386
|
-
* This sets the spoken language of the user. The assistant will do its best to respond in the same language.
|
|
387
|
-
* When using a language other than `en-*`, only `11labs` voices will pronounce the words correctly. There will also be ~1sec of additional latency.
|
|
388
|
-
* @default null
|
|
389
|
-
*/
|
|
390
|
-
language?: "en" | "en-US" | "en-AU" | "en-GB" | "en-NZ" | "en-IN" | "fr" | "fr-CA" | "de" | "hi" | "hi-Latn" | "pt" | "pt-BR" | "es" | "es-419";
|
|
391
|
-
/** This is the number to forward to if assistant runs into issues. */
|
|
392
|
-
forwardingPhoneNumber?: string;
|
|
393
469
|
/**
|
|
394
470
|
* This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
|
|
395
471
|
*
|
|
396
472
|
* If unspecified, it will wait for the user to speak.
|
|
397
473
|
* @maxLength 1000
|
|
398
|
-
* @default "Hey there!"
|
|
399
474
|
*/
|
|
400
475
|
firstMessage?: string;
|
|
401
476
|
/**
|
|
@@ -403,7 +478,6 @@ export interface Assistant {
|
|
|
403
478
|
*
|
|
404
479
|
* If unspecified, it will hang up.
|
|
405
480
|
* @maxLength 1000
|
|
406
|
-
* @default null
|
|
407
481
|
*/
|
|
408
482
|
voicemailMessage?: string;
|
|
409
483
|
/**
|
|
@@ -411,47 +485,131 @@ export interface Assistant {
|
|
|
411
485
|
*
|
|
412
486
|
* If unspecified, it will hang up without saying anything.
|
|
413
487
|
* @maxLength 400
|
|
414
|
-
* @default null
|
|
415
488
|
*/
|
|
416
489
|
endCallMessage?: string;
|
|
490
|
+
/** This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. */
|
|
491
|
+
endCallPhrases?: string[];
|
|
492
|
+
/**
|
|
493
|
+
* This is the URL Vapi will communicate with via HTTP GET and POST Requests. This is used for retrieving context, function calling, and end-of-call reports.
|
|
494
|
+
*
|
|
495
|
+
* All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation.
|
|
496
|
+
*
|
|
497
|
+
* This overrides the serverUrl set on the org.
|
|
498
|
+
*/
|
|
499
|
+
serverUrl?: string;
|
|
500
|
+
/**
|
|
501
|
+
* This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret.
|
|
502
|
+
*
|
|
503
|
+
* This overrides the serverUrlSecret set on the org.
|
|
504
|
+
*/
|
|
505
|
+
serverUrlSecret?: string;
|
|
506
|
+
}
|
|
507
|
+
export interface Assistant {
|
|
508
|
+
/** These are the options for the assistant's LLM. */
|
|
509
|
+
model?: OpenAIModel | TogetherAIModel | AnyscaleModel | OpenRouterModel | PerplexityAIModel | DeepInfraModel | GroqModel | CustomLLMModel;
|
|
510
|
+
/**
|
|
511
|
+
* These are the options for the assistant's voice.
|
|
512
|
+
* @default {"provider":"playht","voiceId":"jennifer"}
|
|
513
|
+
*/
|
|
514
|
+
voice?: AzureVoice | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | DeepgramVoice | OpenAIVoice;
|
|
515
|
+
/**
|
|
516
|
+
* This sets the spoken language of the user. The assistant will do its best to respond in the same language.
|
|
517
|
+
* When using a language other than `en-*`, only `11labs` voices will pronounce the words correctly. There will also be ~1sec of additional latency.
|
|
518
|
+
*/
|
|
519
|
+
language?: "en" | "en-US" | "en-AU" | "en-GB" | "en-NZ" | "en-IN" | "fr" | "fr-CA" | "de" | "hi" | "hi-Latn" | "pt" | "pt-BR" | "es" | "es-419";
|
|
520
|
+
/**
|
|
521
|
+
* This is the number to forward to if assistant runs into issues.
|
|
522
|
+
* @example null
|
|
523
|
+
*/
|
|
524
|
+
forwardingPhoneNumber?: string;
|
|
417
525
|
/**
|
|
418
526
|
* This sets whether the user can interrupt the assistant while it's speaking. Defaults to true.
|
|
419
|
-
* @
|
|
527
|
+
* @example true
|
|
420
528
|
*/
|
|
421
529
|
interruptionsEnabled?: boolean;
|
|
422
530
|
/**
|
|
423
531
|
* This sets whether the assistant's calls are recorded. Defaults to true.
|
|
424
|
-
* @
|
|
532
|
+
* @example true
|
|
425
533
|
*/
|
|
426
534
|
recordingEnabled?: boolean;
|
|
427
535
|
/**
|
|
428
536
|
* This sets whether the assistant will be able to hang up the call. Defaults to false.
|
|
429
|
-
* @
|
|
537
|
+
* @example false
|
|
430
538
|
*/
|
|
431
539
|
endCallFunctionEnabled?: boolean;
|
|
432
540
|
/**
|
|
433
|
-
* This sets whether the assistant
|
|
541
|
+
* This sets whether the assistant can dial digits on the keypad. Defaults to false.
|
|
434
542
|
* @default null
|
|
435
543
|
*/
|
|
436
|
-
|
|
437
|
-
/**
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
544
|
+
dialKeypadFunctionEnabled?: boolean;
|
|
545
|
+
/**
|
|
546
|
+
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'function-call', 'speech-update', 'metadata', 'conversation-update']
|
|
547
|
+
* @example ["transcript","hang","function-call","speech-update","metadata","conversation-update"]
|
|
548
|
+
*/
|
|
549
|
+
clientMessages?: "status-update" | "speech-update" | "transcript" | "hang" | "function-call" | "metadata" | "conversation-update";
|
|
550
|
+
/**
|
|
551
|
+
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'function-call']
|
|
552
|
+
* @example ["end-of-call-report","status-update","hang","function-call"]
|
|
553
|
+
*/
|
|
554
|
+
serverMessages?: "status-update" | "transcript" | "hang" | "function-call" | "end-of-call-report" | "conversation-update";
|
|
441
555
|
/**
|
|
442
556
|
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
443
557
|
* @min 10
|
|
444
558
|
* @max 600
|
|
445
|
-
* @
|
|
559
|
+
* @example 30
|
|
446
560
|
*/
|
|
447
561
|
silenceTimeoutSeconds?: number;
|
|
448
562
|
/**
|
|
449
563
|
* The minimum number of seconds after user speech to wait before the assistant starts speaking. Defaults to 0.4.
|
|
450
564
|
* @min 0
|
|
451
|
-
* @max
|
|
452
|
-
* @
|
|
565
|
+
* @max 2
|
|
566
|
+
* @example 0.4
|
|
453
567
|
*/
|
|
454
568
|
responseDelaySeconds?: number;
|
|
569
|
+
/**
|
|
570
|
+
* This is the name of the assistant. This is just for your own reference.
|
|
571
|
+
* @maxLength 100
|
|
572
|
+
*/
|
|
573
|
+
name?: string;
|
|
574
|
+
/** These are the options for the assistant's transcriber. */
|
|
575
|
+
transcriber?: DeepgramTranscriber;
|
|
576
|
+
/**
|
|
577
|
+
* This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
|
|
578
|
+
*
|
|
579
|
+
* If unspecified, it will wait for the user to speak.
|
|
580
|
+
* @maxLength 1000
|
|
581
|
+
*/
|
|
582
|
+
firstMessage?: string;
|
|
583
|
+
/**
|
|
584
|
+
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
585
|
+
*
|
|
586
|
+
* If unspecified, it will hang up.
|
|
587
|
+
* @maxLength 1000
|
|
588
|
+
*/
|
|
589
|
+
voicemailMessage?: string;
|
|
590
|
+
/**
|
|
591
|
+
* This is the message that the assistant will say if it ends the call.
|
|
592
|
+
*
|
|
593
|
+
* If unspecified, it will hang up without saying anything.
|
|
594
|
+
* @maxLength 400
|
|
595
|
+
*/
|
|
596
|
+
endCallMessage?: string;
|
|
597
|
+
/** This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. */
|
|
598
|
+
endCallPhrases?: string[];
|
|
599
|
+
/**
|
|
600
|
+
* This is the URL Vapi will communicate with via HTTP GET and POST Requests. This is used for retrieving context, function calling, and end-of-call reports.
|
|
601
|
+
*
|
|
602
|
+
* All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation.
|
|
603
|
+
*
|
|
604
|
+
* This overrides the serverUrl set on the org.
|
|
605
|
+
*/
|
|
606
|
+
serverUrl?: string;
|
|
607
|
+
/**
|
|
608
|
+
* This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret.
|
|
609
|
+
*
|
|
610
|
+
* This overrides the serverUrlSecret set on the org.
|
|
611
|
+
*/
|
|
612
|
+
serverUrlSecret?: string;
|
|
455
613
|
/** This is the unique identifier for the assistant. */
|
|
456
614
|
id: string;
|
|
457
615
|
/** This is the unique identifier for the org that this assistant belongs to. */
|
|
@@ -468,94 +626,111 @@ export interface Assistant {
|
|
|
468
626
|
updatedAt: string;
|
|
469
627
|
}
|
|
470
628
|
export interface UpdateAssistantDTO {
|
|
471
|
-
/**
|
|
472
|
-
* This is the name of the assistant. This is just for your own reference.
|
|
473
|
-
* @maxLength 100
|
|
474
|
-
* @default null
|
|
475
|
-
*/
|
|
476
|
-
name?: string;
|
|
477
|
-
/**
|
|
478
|
-
* These are the options for the assistant's transcriber.
|
|
479
|
-
* @default null
|
|
480
|
-
*/
|
|
481
|
-
transcriber?: DeepgramTranscriber;
|
|
482
629
|
/** These are the options for the assistant's LLM. */
|
|
483
|
-
model?: OpenAIModel | TogetherAIModel | AnyscaleModel | OpenRouterModel | PerplexityAIModel | DeepInfraModel | CustomLLMModel;
|
|
630
|
+
model?: OpenAIModel | TogetherAIModel | AnyscaleModel | OpenRouterModel | PerplexityAIModel | DeepInfraModel | GroqModel | CustomLLMModel;
|
|
484
631
|
/**
|
|
485
632
|
* These are the options for the assistant's voice.
|
|
486
633
|
* @default {"provider":"playht","voiceId":"jennifer"}
|
|
487
634
|
*/
|
|
488
|
-
voice?: ElevenLabsVoice | PlayHTVoice | RimeAIVoice | DeepgramVoice | OpenAIVoice;
|
|
635
|
+
voice?: AzureVoice | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | DeepgramVoice | OpenAIVoice;
|
|
489
636
|
/**
|
|
490
637
|
* This sets the spoken language of the user. The assistant will do its best to respond in the same language.
|
|
491
638
|
* When using a language other than `en-*`, only `11labs` voices will pronounce the words correctly. There will also be ~1sec of additional latency.
|
|
492
|
-
* @default null
|
|
493
639
|
*/
|
|
494
640
|
language?: "en" | "en-US" | "en-AU" | "en-GB" | "en-NZ" | "en-IN" | "fr" | "fr-CA" | "de" | "hi" | "hi-Latn" | "pt" | "pt-BR" | "es" | "es-419";
|
|
495
|
-
/** This is the number to forward to if assistant runs into issues. */
|
|
496
|
-
forwardingPhoneNumber?: string;
|
|
497
|
-
/**
|
|
498
|
-
* This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
|
|
499
|
-
*
|
|
500
|
-
* If unspecified, it will wait for the user to speak.
|
|
501
|
-
* @maxLength 1000
|
|
502
|
-
* @default "Hey there!"
|
|
503
|
-
*/
|
|
504
|
-
firstMessage?: string;
|
|
505
|
-
/**
|
|
506
|
-
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
507
|
-
*
|
|
508
|
-
* If unspecified, it will hang up.
|
|
509
|
-
* @maxLength 1000
|
|
510
|
-
* @default null
|
|
511
|
-
*/
|
|
512
|
-
voicemailMessage?: string;
|
|
513
641
|
/**
|
|
514
|
-
* This is the
|
|
515
|
-
*
|
|
516
|
-
* If unspecified, it will hang up without saying anything.
|
|
517
|
-
* @maxLength 400
|
|
518
|
-
* @default null
|
|
642
|
+
* This is the number to forward to if assistant runs into issues.
|
|
643
|
+
* @example null
|
|
519
644
|
*/
|
|
520
|
-
|
|
645
|
+
forwardingPhoneNumber?: string;
|
|
521
646
|
/**
|
|
522
647
|
* This sets whether the user can interrupt the assistant while it's speaking. Defaults to true.
|
|
523
|
-
* @
|
|
648
|
+
* @example true
|
|
524
649
|
*/
|
|
525
650
|
interruptionsEnabled?: boolean;
|
|
526
651
|
/**
|
|
527
652
|
* This sets whether the assistant's calls are recorded. Defaults to true.
|
|
528
|
-
* @
|
|
653
|
+
* @example true
|
|
529
654
|
*/
|
|
530
655
|
recordingEnabled?: boolean;
|
|
531
656
|
/**
|
|
532
657
|
* This sets whether the assistant will be able to hang up the call. Defaults to false.
|
|
533
|
-
* @
|
|
658
|
+
* @example false
|
|
534
659
|
*/
|
|
535
660
|
endCallFunctionEnabled?: boolean;
|
|
536
661
|
/**
|
|
537
|
-
* This sets whether the assistant
|
|
662
|
+
* This sets whether the assistant can dial digits on the keypad. Defaults to false.
|
|
538
663
|
* @default null
|
|
539
664
|
*/
|
|
540
|
-
|
|
541
|
-
/**
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
665
|
+
dialKeypadFunctionEnabled?: boolean;
|
|
666
|
+
/**
|
|
667
|
+
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'function-call', 'speech-update', 'metadata', 'conversation-update']
|
|
668
|
+
* @example ["transcript","hang","function-call","speech-update","metadata","conversation-update"]
|
|
669
|
+
*/
|
|
670
|
+
clientMessages?: "status-update" | "speech-update" | "transcript" | "hang" | "function-call" | "metadata" | "conversation-update";
|
|
671
|
+
/**
|
|
672
|
+
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'function-call']
|
|
673
|
+
* @example ["end-of-call-report","status-update","hang","function-call"]
|
|
674
|
+
*/
|
|
675
|
+
serverMessages?: "status-update" | "transcript" | "hang" | "function-call" | "end-of-call-report" | "conversation-update";
|
|
545
676
|
/**
|
|
546
677
|
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
547
678
|
* @min 10
|
|
548
679
|
* @max 600
|
|
549
|
-
* @
|
|
680
|
+
* @example 30
|
|
550
681
|
*/
|
|
551
682
|
silenceTimeoutSeconds?: number;
|
|
552
683
|
/**
|
|
553
684
|
* The minimum number of seconds after user speech to wait before the assistant starts speaking. Defaults to 0.4.
|
|
554
685
|
* @min 0
|
|
555
|
-
* @max
|
|
556
|
-
* @
|
|
686
|
+
* @max 2
|
|
687
|
+
* @example 0.4
|
|
557
688
|
*/
|
|
558
689
|
responseDelaySeconds?: number;
|
|
690
|
+
/**
|
|
691
|
+
* This is the name of the assistant. This is just for your own reference.
|
|
692
|
+
* @maxLength 100
|
|
693
|
+
*/
|
|
694
|
+
name?: string;
|
|
695
|
+
/** These are the options for the assistant's transcriber. */
|
|
696
|
+
transcriber?: DeepgramTranscriber;
|
|
697
|
+
/**
|
|
698
|
+
* This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
|
|
699
|
+
*
|
|
700
|
+
* If unspecified, it will wait for the user to speak.
|
|
701
|
+
* @maxLength 1000
|
|
702
|
+
*/
|
|
703
|
+
firstMessage?: string;
|
|
704
|
+
/**
|
|
705
|
+
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
706
|
+
*
|
|
707
|
+
* If unspecified, it will hang up.
|
|
708
|
+
* @maxLength 1000
|
|
709
|
+
*/
|
|
710
|
+
voicemailMessage?: string;
|
|
711
|
+
/**
|
|
712
|
+
* This is the message that the assistant will say if it ends the call.
|
|
713
|
+
*
|
|
714
|
+
* If unspecified, it will hang up without saying anything.
|
|
715
|
+
* @maxLength 400
|
|
716
|
+
*/
|
|
717
|
+
endCallMessage?: string;
|
|
718
|
+
/** This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. */
|
|
719
|
+
endCallPhrases?: string[];
|
|
720
|
+
/**
|
|
721
|
+
* This is the URL Vapi will communicate with via HTTP GET and POST Requests. This is used for retrieving context, function calling, and end-of-call reports.
|
|
722
|
+
*
|
|
723
|
+
* All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation.
|
|
724
|
+
*
|
|
725
|
+
* This overrides the serverUrl set on the org.
|
|
726
|
+
*/
|
|
727
|
+
serverUrl?: string;
|
|
728
|
+
/**
|
|
729
|
+
* This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret.
|
|
730
|
+
*
|
|
731
|
+
* This overrides the serverUrlSecret set on the org.
|
|
732
|
+
*/
|
|
733
|
+
serverUrlSecret?: string;
|
|
559
734
|
}
|
|
560
735
|
export interface CreateCustomerDTO {
|
|
561
736
|
/** This is the number of the customer. */
|
|
@@ -565,6 +740,11 @@ export interface CreateCustomerDTO {
|
|
|
565
740
|
* @maxLength 40
|
|
566
741
|
*/
|
|
567
742
|
name?: string;
|
|
743
|
+
/**
|
|
744
|
+
* This is the extension that will be dialed after the call is answered.
|
|
745
|
+
* @maxLength 30
|
|
746
|
+
*/
|
|
747
|
+
extension?: string;
|
|
568
748
|
}
|
|
569
749
|
export interface ImportTwilioPhoneNumberDTO {
|
|
570
750
|
/** These are the digits of the phone number you own on your Twilio. */
|
|
@@ -591,12 +771,12 @@ export interface Call {
|
|
|
591
771
|
/** This is the status of the call. */
|
|
592
772
|
status?: "queued" | "ringing" | "in-progress" | "forwarding" | "ended";
|
|
593
773
|
/** This is the explanation for how the call ended. */
|
|
594
|
-
endedReason?: "assistant-
|
|
774
|
+
endedReason?: "assistant-error" | "assistant-not-found" | "db-error" | "no-server-available" | "pipeline-error-extra-function-failed" | "pipeline-error-first-message-failed" | "pipeline-error-function-filler-failed" | "pipeline-error-function-failed" | "pipeline-error-openai-llm-failed" | "pipeline-error-azure-openai-llm-failed" | "pipeline-error-together-ai-llm-failed" | "pipeline-error-anyscale-llm-failed" | "pipeline-error-openrouter-llm-failed" | "pipeline-error-perplexity-ai-llm-failed" | "pipeline-error-deepinfra-llm-failed" | "pipeline-error-runpod-llm-failed" | "pipeline-error-groq-llm-failed" | "pipeline-error-openai-voice-failed" | "pipeline-error-deepgram-transcriber-failed" | "pipeline-error-deepgram-voice-failed" | "pipeline-error-eleven-labs-voice-failed" | "pipeline-error-eleven-labs-voice-not-found" | "pipeline-error-eleven-labs-quota-exceeded" | "pipeline-error-playht-voice-failed" | "pipeline-error-azure-voice-failed" | "pipeline-error-rime-ai-voice-failed" | "server-shutdown" | "twilio-closed-websocket" | "twilio-failed-to-connect-call" | "unknown-error" | "assistant-ended-call" | "assistant-said-end-call-phrase" | "assistant-forwarded-call" | "assistant-join-timed-out" | "customer-busy" | "customer-ended-call" | "customer-did-not-answer" | "customer-did-not-give-microphone-permission" | "exceeded-max-duration" | "manually-canceled" | "pipeline-error-custom-llm-llm-failed" | "silence-timed-out" | "voicemail";
|
|
595
775
|
/**
|
|
596
776
|
* This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.
|
|
597
777
|
* @min 10
|
|
598
778
|
* @max 3600
|
|
599
|
-
* @
|
|
779
|
+
* @example 1800
|
|
600
780
|
*/
|
|
601
781
|
maxDurationSeconds?: number;
|
|
602
782
|
/** This is the unique identifier for the call. */
|
|
@@ -625,10 +805,14 @@ export interface Call {
|
|
|
625
805
|
endedAt?: string;
|
|
626
806
|
/** This is the cost of the call in USD. */
|
|
627
807
|
cost?: number;
|
|
808
|
+
/** This is the cost of the call in USD. */
|
|
809
|
+
costBreakdown?: object;
|
|
628
810
|
/** This is the transcript of the call. */
|
|
629
811
|
transcript?: string;
|
|
630
812
|
/** This is the URL of the recording of the call. */
|
|
631
813
|
recordingUrl?: string;
|
|
814
|
+
/** This is the URL of the recording of the call in two channels. */
|
|
815
|
+
stereoRecordingUrl?: string;
|
|
632
816
|
/** This is the summary of the call. */
|
|
633
817
|
summary?: string;
|
|
634
818
|
/** These are the messages that were spoken during the call. */
|
|
@@ -673,13 +857,15 @@ export interface Call {
|
|
|
673
857
|
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
674
858
|
*/
|
|
675
859
|
phoneNumber?: ImportTwilioPhoneNumberDTO;
|
|
860
|
+
/** This is the metadata associated with the call. */
|
|
861
|
+
metadata?: object;
|
|
676
862
|
}
|
|
677
863
|
export interface CreateOutboundCallDTO {
|
|
678
864
|
/**
|
|
679
865
|
* This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.
|
|
680
866
|
* @min 10
|
|
681
867
|
* @max 3600
|
|
682
|
-
* @
|
|
868
|
+
* @example 1800
|
|
683
869
|
*/
|
|
684
870
|
maxDurationSeconds?: number;
|
|
685
871
|
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
@@ -710,12 +896,16 @@ export interface CreateOutboundCallDTO {
|
|
|
710
896
|
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
711
897
|
*/
|
|
712
898
|
phoneNumber?: ImportTwilioPhoneNumberDTO;
|
|
899
|
+
/** This is the metadata associated with the call. */
|
|
900
|
+
metadata?: object;
|
|
713
901
|
}
|
|
714
902
|
export interface CreateWebCallDTO {
|
|
715
903
|
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
716
904
|
assistantId?: string;
|
|
717
905
|
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
718
906
|
assistant?: CreateAssistantDTO;
|
|
907
|
+
/** This is the metadata associated with the call. */
|
|
908
|
+
metadata?: object;
|
|
719
909
|
}
|
|
720
910
|
export interface TwilioCredential {
|
|
721
911
|
provider: "twilio";
|
|
@@ -1269,7 +1459,54 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1269
1459
|
* @request GET:/assistant
|
|
1270
1460
|
* @secure
|
|
1271
1461
|
*/
|
|
1272
|
-
assistantControllerFindAll: (
|
|
1462
|
+
assistantControllerFindAll: (query?: {
|
|
1463
|
+
/**
|
|
1464
|
+
* This is the maximum number of items to return. Defaults to 100.
|
|
1465
|
+
* @min 0
|
|
1466
|
+
* @max 1000
|
|
1467
|
+
*/
|
|
1468
|
+
limit?: number;
|
|
1469
|
+
/**
|
|
1470
|
+
* This will return items where the createdAt is greater than the specified value.
|
|
1471
|
+
* @format date-time
|
|
1472
|
+
*/
|
|
1473
|
+
createdAtGt?: string;
|
|
1474
|
+
/**
|
|
1475
|
+
* This will return items where the createdAt is less than the specified value.
|
|
1476
|
+
* @format date-time
|
|
1477
|
+
*/
|
|
1478
|
+
createdAtLt?: string;
|
|
1479
|
+
/**
|
|
1480
|
+
* This will return items where the createdAt is greater than or equal to the specified value.
|
|
1481
|
+
* @format date-time
|
|
1482
|
+
*/
|
|
1483
|
+
createdAtGe?: string;
|
|
1484
|
+
/**
|
|
1485
|
+
* This will return items where the createdAt is less than or equal to the specified value.
|
|
1486
|
+
* @format date-time
|
|
1487
|
+
*/
|
|
1488
|
+
createdAtLe?: string;
|
|
1489
|
+
/**
|
|
1490
|
+
* This will return items where the updatedAt is greater than the specified value.
|
|
1491
|
+
* @format date-time
|
|
1492
|
+
*/
|
|
1493
|
+
updatedAtGt?: string;
|
|
1494
|
+
/**
|
|
1495
|
+
* This will return items where the updatedAt is less than the specified value.
|
|
1496
|
+
* @format date-time
|
|
1497
|
+
*/
|
|
1498
|
+
updatedAtLt?: string;
|
|
1499
|
+
/**
|
|
1500
|
+
* This will return items where the updatedAt is greater than or equal to the specified value.
|
|
1501
|
+
* @format date-time
|
|
1502
|
+
*/
|
|
1503
|
+
updatedAtGe?: string;
|
|
1504
|
+
/**
|
|
1505
|
+
* This will return items where the updatedAt is less than or equal to the specified value.
|
|
1506
|
+
* @format date-time
|
|
1507
|
+
*/
|
|
1508
|
+
updatedAtLe?: string;
|
|
1509
|
+
}, params?: RequestParams) => Promise<HttpResponse<Assistant[], any>>;
|
|
1273
1510
|
/**
|
|
1274
1511
|
* No description
|
|
1275
1512
|
*
|
|
@@ -1321,7 +1558,54 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1321
1558
|
* @request GET:/call
|
|
1322
1559
|
* @secure
|
|
1323
1560
|
*/
|
|
1324
|
-
callControllerFindAll: (
|
|
1561
|
+
callControllerFindAll: (query?: {
|
|
1562
|
+
/**
|
|
1563
|
+
* This is the maximum number of items to return. Defaults to 100.
|
|
1564
|
+
* @min 0
|
|
1565
|
+
* @max 1000
|
|
1566
|
+
*/
|
|
1567
|
+
limit?: number;
|
|
1568
|
+
/**
|
|
1569
|
+
* This will return items where the createdAt is greater than the specified value.
|
|
1570
|
+
* @format date-time
|
|
1571
|
+
*/
|
|
1572
|
+
createdAtGt?: string;
|
|
1573
|
+
/**
|
|
1574
|
+
* This will return items where the createdAt is less than the specified value.
|
|
1575
|
+
* @format date-time
|
|
1576
|
+
*/
|
|
1577
|
+
createdAtLt?: string;
|
|
1578
|
+
/**
|
|
1579
|
+
* This will return items where the createdAt is greater than or equal to the specified value.
|
|
1580
|
+
* @format date-time
|
|
1581
|
+
*/
|
|
1582
|
+
createdAtGe?: string;
|
|
1583
|
+
/**
|
|
1584
|
+
* This will return items where the createdAt is less than or equal to the specified value.
|
|
1585
|
+
* @format date-time
|
|
1586
|
+
*/
|
|
1587
|
+
createdAtLe?: string;
|
|
1588
|
+
/**
|
|
1589
|
+
* This will return items where the updatedAt is greater than the specified value.
|
|
1590
|
+
* @format date-time
|
|
1591
|
+
*/
|
|
1592
|
+
updatedAtGt?: string;
|
|
1593
|
+
/**
|
|
1594
|
+
* This will return items where the updatedAt is less than the specified value.
|
|
1595
|
+
* @format date-time
|
|
1596
|
+
*/
|
|
1597
|
+
updatedAtLt?: string;
|
|
1598
|
+
/**
|
|
1599
|
+
* This will return items where the updatedAt is greater than or equal to the specified value.
|
|
1600
|
+
* @format date-time
|
|
1601
|
+
*/
|
|
1602
|
+
updatedAtGe?: string;
|
|
1603
|
+
/**
|
|
1604
|
+
* This will return items where the updatedAt is less than or equal to the specified value.
|
|
1605
|
+
* @format date-time
|
|
1606
|
+
*/
|
|
1607
|
+
updatedAtLe?: string;
|
|
1608
|
+
}, params?: RequestParams) => Promise<HttpResponse<Call[], any>>;
|
|
1325
1609
|
/**
|
|
1326
1610
|
* No description
|
|
1327
1611
|
*
|
|
@@ -1425,7 +1709,54 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1425
1709
|
* @request GET:/credential
|
|
1426
1710
|
* @secure
|
|
1427
1711
|
*/
|
|
1428
|
-
credentialControllerFindAll: (
|
|
1712
|
+
credentialControllerFindAll: (query?: {
|
|
1713
|
+
/**
|
|
1714
|
+
* This is the maximum number of items to return. Defaults to 100.
|
|
1715
|
+
* @min 0
|
|
1716
|
+
* @max 1000
|
|
1717
|
+
*/
|
|
1718
|
+
limit?: number;
|
|
1719
|
+
/**
|
|
1720
|
+
* This will return items where the createdAt is greater than the specified value.
|
|
1721
|
+
* @format date-time
|
|
1722
|
+
*/
|
|
1723
|
+
createdAtGt?: string;
|
|
1724
|
+
/**
|
|
1725
|
+
* This will return items where the createdAt is less than the specified value.
|
|
1726
|
+
* @format date-time
|
|
1727
|
+
*/
|
|
1728
|
+
createdAtLt?: string;
|
|
1729
|
+
/**
|
|
1730
|
+
* This will return items where the createdAt is greater than or equal to the specified value.
|
|
1731
|
+
* @format date-time
|
|
1732
|
+
*/
|
|
1733
|
+
createdAtGe?: string;
|
|
1734
|
+
/**
|
|
1735
|
+
* This will return items where the createdAt is less than or equal to the specified value.
|
|
1736
|
+
* @format date-time
|
|
1737
|
+
*/
|
|
1738
|
+
createdAtLe?: string;
|
|
1739
|
+
/**
|
|
1740
|
+
* This will return items where the updatedAt is greater than the specified value.
|
|
1741
|
+
* @format date-time
|
|
1742
|
+
*/
|
|
1743
|
+
updatedAtGt?: string;
|
|
1744
|
+
/**
|
|
1745
|
+
* This will return items where the updatedAt is less than the specified value.
|
|
1746
|
+
* @format date-time
|
|
1747
|
+
*/
|
|
1748
|
+
updatedAtLt?: string;
|
|
1749
|
+
/**
|
|
1750
|
+
* This will return items where the updatedAt is greater than or equal to the specified value.
|
|
1751
|
+
* @format date-time
|
|
1752
|
+
*/
|
|
1753
|
+
updatedAtGe?: string;
|
|
1754
|
+
/**
|
|
1755
|
+
* This will return items where the updatedAt is less than or equal to the specified value.
|
|
1756
|
+
* @format date-time
|
|
1757
|
+
*/
|
|
1758
|
+
updatedAtLe?: string;
|
|
1759
|
+
}, params?: RequestParams) => Promise<HttpResponse<(({
|
|
1429
1760
|
provider: "twilio";
|
|
1430
1761
|
} & TwilioCredential) | ({
|
|
1431
1762
|
provider: "deepgram";
|
|
@@ -1617,7 +1948,54 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1617
1948
|
* @request GET:/phone-number
|
|
1618
1949
|
* @secure
|
|
1619
1950
|
*/
|
|
1620
|
-
phoneNumberControllerFindAll: (
|
|
1951
|
+
phoneNumberControllerFindAll: (query?: {
|
|
1952
|
+
/**
|
|
1953
|
+
* This is the maximum number of items to return. Defaults to 100.
|
|
1954
|
+
* @min 0
|
|
1955
|
+
* @max 1000
|
|
1956
|
+
*/
|
|
1957
|
+
limit?: number;
|
|
1958
|
+
/**
|
|
1959
|
+
* This will return items where the createdAt is greater than the specified value.
|
|
1960
|
+
* @format date-time
|
|
1961
|
+
*/
|
|
1962
|
+
createdAtGt?: string;
|
|
1963
|
+
/**
|
|
1964
|
+
* This will return items where the createdAt is less than the specified value.
|
|
1965
|
+
* @format date-time
|
|
1966
|
+
*/
|
|
1967
|
+
createdAtLt?: string;
|
|
1968
|
+
/**
|
|
1969
|
+
* This will return items where the createdAt is greater than or equal to the specified value.
|
|
1970
|
+
* @format date-time
|
|
1971
|
+
*/
|
|
1972
|
+
createdAtGe?: string;
|
|
1973
|
+
/**
|
|
1974
|
+
* This will return items where the createdAt is less than or equal to the specified value.
|
|
1975
|
+
* @format date-time
|
|
1976
|
+
*/
|
|
1977
|
+
createdAtLe?: string;
|
|
1978
|
+
/**
|
|
1979
|
+
* This will return items where the updatedAt is greater than the specified value.
|
|
1980
|
+
* @format date-time
|
|
1981
|
+
*/
|
|
1982
|
+
updatedAtGt?: string;
|
|
1983
|
+
/**
|
|
1984
|
+
* This will return items where the updatedAt is less than the specified value.
|
|
1985
|
+
* @format date-time
|
|
1986
|
+
*/
|
|
1987
|
+
updatedAtLt?: string;
|
|
1988
|
+
/**
|
|
1989
|
+
* This will return items where the updatedAt is greater than or equal to the specified value.
|
|
1990
|
+
* @format date-time
|
|
1991
|
+
*/
|
|
1992
|
+
updatedAtGe?: string;
|
|
1993
|
+
/**
|
|
1994
|
+
* This will return items where the updatedAt is less than or equal to the specified value.
|
|
1995
|
+
* @format date-time
|
|
1996
|
+
*/
|
|
1997
|
+
updatedAtLe?: string;
|
|
1998
|
+
}, params?: RequestParams) => Promise<HttpResponse<PhoneNumber[], any>>;
|
|
1621
1999
|
/**
|
|
1622
2000
|
* No description
|
|
1623
2001
|
*
|