client.assistants.list(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.assistants.list()
-
-
-
limit:
typing.Optional[float]
— This is the maximum number of items to return. Defaults to 100.
-
created_at_gt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than the specified value.
-
created_at_lt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than the specified value.
-
created_at_ge:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than or equal to the specified value.
-
created_at_le:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than or equal to the specified value.
-
updated_at_gt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than the specified value.
-
updated_at_lt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than the specified value.
-
updated_at_ge:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than or equal to the specified value.
-
updated_at_le:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than or equal to the specified value.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.assistants.create(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.assistants.create()
-
-
-
transcriber:
typing.Optional[CreateAssistantDtoTranscriber]
— These are the options for the assistant's transcriber.
-
model:
typing.Optional[CreateAssistantDtoModel]
— These are the options for the assistant's LLM.
-
voice:
typing.Optional[CreateAssistantDtoVoice]
— These are the options for the assistant's voice.
-
first_message:
typing.Optional[str]
This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
-
first_message_interruptions_enabled:
typing.Optional[bool]
-
first_message_mode:
typing.Optional[CreateAssistantDtoFirstMessageMode]
This is the mode for the first message. Default is 'assistant-speaks-first'.
Use:
- 'assistant-speaks-first' to have the assistant speak first.
- 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
- 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state. (
assistant.model.messages
at call start,call.messages
at squad transfer points).
@default 'assistant-speaks-first'
-
voicemail_detection:
typing.Optional[CreateAssistantDtoVoicemailDetection]
These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool]. This uses Twilio's built-in detection while the VoicemailTool relies on the model to detect if a voicemail was reached. You can use neither of them, one of them, or both of them. By default, Twilio built-in detection is enabled while VoicemailTool is not.
-
client_messages:
typing.Optional[typing.Sequence[CreateAssistantDtoClientMessagesItem]]
— These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started. You can check the shape of the messages in ClientMessage schema.
-
server_messages:
typing.Optional[typing.Sequence[CreateAssistantDtoServerMessagesItem]]
— These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,handoff-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema.
-
max_duration_seconds:
typing.Optional[float]
This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.
@default 600 (10 minutes)
-
background_sound:
typing.Optional[CreateAssistantDtoBackgroundSound]
This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. You can also provide a custom sound by providing a URL to an audio file.
-
model_output_in_messages_enabled:
typing.Optional[bool]
This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech.
Default
false
while in beta.@default false
-
transport_configurations:
typing.Optional[typing.Sequence[TransportConfigurationTwilio]]
— These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used.
-
observability_plan:
typing.Optional[LangfuseObservabilityPlan]
This is the plan for observability of assistant's calls.
Currently, only Langfuse is supported.
-
credentials:
typing.Optional[typing.Sequence[CreateAssistantDtoCredentialsItem]]
— These are dynamic credentials that will be used for the assistant 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.
-
hooks:
typing.Optional[typing.Sequence[CreateAssistantDtoHooksItem]]
— This is a set of actions that will be performed on certain events.
-
name:
typing.Optional[str]
This is the name of the assistant.
This is required when you want to transfer between assistants in a call.
-
voicemail_message:
typing.Optional[str]
This is the message that the assistant will say if the call is forwarded to voicemail.
If unspecified, it will hang up.
-
end_call_message:
typing.Optional[str]
This is the message that the assistant will say if it ends the call.
If unspecified, it will hang up without saying anything.
-
end_call_phrases:
typing.Optional[typing.Sequence[str]]
— This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive.
-
compliance_plan:
typing.Optional[CompliancePlan]
-
metadata:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
— This is for metadata you want to store on the assistant.
-
background_speech_denoising_plan:
typing.Optional[BackgroundSpeechDenoisingPlan]
This enables filtering of noise and background speech while the user is talking.
Features:
- Smart denoising using Krisp
- Fourier denoising
Smart denoising can be combined with or used independently of Fourier denoising.
Order of precedence:
- Smart denoising
- Fourier denoising
-
analysis_plan:
typing.Optional[AnalysisPlan]
— This is the plan for analysis of assistant's calls. Stored incall.analysis
.
-
artifact_plan:
typing.Optional[ArtifactPlan]
— This is the plan for artifacts generated during assistant's calls. Stored incall.artifact
.
-
start_speaking_plan:
typing.Optional[StartSpeakingPlan]
This is the plan for when the assistant should start talking.
You should configure this if you're running into these issues:
- The assistant is too slow to start talking after the customer is done speaking.
- The assistant is too fast to start talking after the customer is done speaking.
- The assistant is so fast that it's actually interrupting the customer.
-
stop_speaking_plan:
typing.Optional[StopSpeakingPlan]
This is the plan for when assistant should stop talking on customer interruption.
You should configure this if you're running into these issues:
- The assistant is too slow to recognize customer's interruption.
- The assistant is too fast to recognize customer's interruption.
- The assistant is getting interrupted by phrases that are just acknowledgments.
- The assistant is getting interrupted by background noises.
- The assistant is not properly stopping -- it starts talking right after getting interrupted.
-
monitor_plan:
typing.Optional[MonitorPlan]
This is the plan for real-time monitoring of the assistant's calls.
Usage:
- To enable live listening of the assistant's calls, set
monitorPlan.listenEnabled
totrue
. - To enable live control of the assistant's calls, set
monitorPlan.controlEnabled
totrue
.
- To enable live listening of the assistant's calls, set
-
credential_ids:
typing.Optional[typing.Sequence[str]]
— These are the credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can provide a subset using this.
-
server:
typing.Optional[Server]
This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema.
The order of precedence is:
- assistant.server.url
- phoneNumber.serverUrl
- org.serverUrl
-
keypad_input_plan:
typing.Optional[KeypadInputPlan]
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.assistants.get(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.assistants.get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.assistants.delete(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.assistants.delete( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.assistants.update(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.assistants.update( id="id", )
-
-
-
id:
str
-
transcriber:
typing.Optional[UpdateAssistantDtoTranscriber]
— These are the options for the assistant's transcriber.
-
model:
typing.Optional[UpdateAssistantDtoModel]
— These are the options for the assistant's LLM.
-
voice:
typing.Optional[UpdateAssistantDtoVoice]
— These are the options for the assistant's voice.
-
first_message:
typing.Optional[str]
This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
-
first_message_interruptions_enabled:
typing.Optional[bool]
-
first_message_mode:
typing.Optional[UpdateAssistantDtoFirstMessageMode]
This is the mode for the first message. Default is 'assistant-speaks-first'.
Use:
- 'assistant-speaks-first' to have the assistant speak first.
- 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
- 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state. (
assistant.model.messages
at call start,call.messages
at squad transfer points).
@default 'assistant-speaks-first'
-
voicemail_detection:
typing.Optional[UpdateAssistantDtoVoicemailDetection]
These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool]. This uses Twilio's built-in detection while the VoicemailTool relies on the model to detect if a voicemail was reached. You can use neither of them, one of them, or both of them. By default, Twilio built-in detection is enabled while VoicemailTool is not.
-
client_messages:
typing.Optional[typing.Sequence[UpdateAssistantDtoClientMessagesItem]]
— These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started. You can check the shape of the messages in ClientMessage schema.
-
server_messages:
typing.Optional[typing.Sequence[UpdateAssistantDtoServerMessagesItem]]
— These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,handoff-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema.
-
max_duration_seconds:
typing.Optional[float]
This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.
@default 600 (10 minutes)
-
background_sound:
typing.Optional[UpdateAssistantDtoBackgroundSound]
This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'. You can also provide a custom sound by providing a URL to an audio file.
-
model_output_in_messages_enabled:
typing.Optional[bool]
This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech.
Default
false
while in beta.@default false
-
transport_configurations:
typing.Optional[typing.Sequence[TransportConfigurationTwilio]]
— These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used.
-
observability_plan:
typing.Optional[LangfuseObservabilityPlan]
This is the plan for observability of assistant's calls.
Currently, only Langfuse is supported.
-
credentials:
typing.Optional[typing.Sequence[UpdateAssistantDtoCredentialsItem]]
— These are dynamic credentials that will be used for the assistant 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.
-
hooks:
typing.Optional[typing.Sequence[UpdateAssistantDtoHooksItem]]
— This is a set of actions that will be performed on certain events.
-
name:
typing.Optional[str]
This is the name of the assistant.
This is required when you want to transfer between assistants in a call.
-
voicemail_message:
typing.Optional[str]
This is the message that the assistant will say if the call is forwarded to voicemail.
If unspecified, it will hang up.
-
end_call_message:
typing.Optional[str]
This is the message that the assistant will say if it ends the call.
If unspecified, it will hang up without saying anything.
-
end_call_phrases:
typing.Optional[typing.Sequence[str]]
— This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive.
-
compliance_plan:
typing.Optional[CompliancePlan]
-
metadata:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
— This is for metadata you want to store on the assistant.
-
background_speech_denoising_plan:
typing.Optional[BackgroundSpeechDenoisingPlan]
This enables filtering of noise and background speech while the user is talking.
Features:
- Smart denoising using Krisp
- Fourier denoising
Smart denoising can be combined with or used independently of Fourier denoising.
Order of precedence:
- Smart denoising
- Fourier denoising
-
analysis_plan:
typing.Optional[AnalysisPlan]
— This is the plan for analysis of assistant's calls. Stored incall.analysis
.
-
artifact_plan:
typing.Optional[ArtifactPlan]
— This is the plan for artifacts generated during assistant's calls. Stored incall.artifact
.
-
start_speaking_plan:
typing.Optional[StartSpeakingPlan]
This is the plan for when the assistant should start talking.
You should configure this if you're running into these issues:
- The assistant is too slow to start talking after the customer is done speaking.
- The assistant is too fast to start talking after the customer is done speaking.
- The assistant is so fast that it's actually interrupting the customer.
-
stop_speaking_plan:
typing.Optional[StopSpeakingPlan]
This is the plan for when assistant should stop talking on customer interruption.
You should configure this if you're running into these issues:
- The assistant is too slow to recognize customer's interruption.
- The assistant is too fast to recognize customer's interruption.
- The assistant is getting interrupted by phrases that are just acknowledgments.
- The assistant is getting interrupted by background noises.
- The assistant is not properly stopping -- it starts talking right after getting interrupted.
-
monitor_plan:
typing.Optional[MonitorPlan]
This is the plan for real-time monitoring of the assistant's calls.
Usage:
- To enable live listening of the assistant's calls, set
monitorPlan.listenEnabled
totrue
. - To enable live control of the assistant's calls, set
monitorPlan.controlEnabled
totrue
.
- To enable live listening of the assistant's calls, set
-
credential_ids:
typing.Optional[typing.Sequence[str]]
— These are the credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can provide a subset using this.
-
server:
typing.Optional[Server]
This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema.
The order of precedence is:
- assistant.server.url
- phoneNumber.serverUrl
- org.serverUrl
-
keypad_input_plan:
typing.Optional[KeypadInputPlan]
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.squads.list(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.squads.list()
-
-
-
limit:
typing.Optional[float]
— This is the maximum number of items to return. Defaults to 100.
-
created_at_gt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than the specified value.
-
created_at_lt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than the specified value.
-
created_at_ge:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than or equal to the specified value.
-
created_at_le:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than or equal to the specified value.
-
updated_at_gt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than the specified value.
-
updated_at_lt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than the specified value.
-
updated_at_ge:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than or equal to the specified value.
-
updated_at_le:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than or equal to the specified value.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.squads.create(...)
-
-
-
from vapi import SquadMemberDto, Vapi client = Vapi( token="YOUR_TOKEN", ) client.squads.create( members=[SquadMemberDto()], )
-
-
-
members:
typing.Sequence[SquadMemberDto]
This is the list of assistants that make up the squad.
The call will start with the first assistant in the list.
-
name:
typing.Optional[str]
— This is the name of the squad.
-
members_overrides:
typing.Optional[AssistantOverrides]
This can be used to override all the assistants' settings and provide values for their template variables.
Both
membersOverrides
andmembers[n].assistantOverrides
can be used together. First,members[n].assistantOverrides
is applied. Then,membersOverrides
is applied as a global override.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.squads.get(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.squads.get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.squads.delete(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.squads.delete( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.squads.update(...)
-
-
-
from vapi import SquadMemberDto, Vapi client = Vapi( token="YOUR_TOKEN", ) client.squads.update( id="id", members=[SquadMemberDto()], )
-
-
-
id:
str
-
members:
typing.Sequence[SquadMemberDto]
This is the list of assistants that make up the squad.
The call will start with the first assistant in the list.
-
name:
typing.Optional[str]
— This is the name of the squad.
-
members_overrides:
typing.Optional[AssistantOverrides]
This can be used to override all the assistants' settings and provide values for their template variables.
Both
membersOverrides
andmembers[n].assistantOverrides
can be used together. First,members[n].assistantOverrides
is applied. Then,membersOverrides
is applied as a global override.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.calls.list(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.calls.list()
-
-
-
id:
typing.Optional[str]
— This is the unique identifier for the call.
-
assistant_id:
typing.Optional[str]
— This will return calls with the specified assistantId.
-
phone_number_id:
typing.Optional[str]
This is the phone number that will be used for the call. To use a transient number, use
phoneNumber
instead.Only relevant for
outboundPhoneCall
andinboundPhoneCall
type.
-
limit:
typing.Optional[float]
— This is the maximum number of items to return. Defaults to 100.
-
created_at_gt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than the specified value.
-
created_at_lt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than the specified value.
-
created_at_ge:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than or equal to the specified value.
-
created_at_le:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than or equal to the specified value.
-
updated_at_gt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than the specified value.
-
updated_at_lt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than the specified value.
-
updated_at_ge:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than or equal to the specified value.
-
updated_at_le:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than or equal to the specified value.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.calls.create(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.calls.create()
-
-
-
customers:
typing.Optional[typing.Sequence[CreateCustomerDto]]
This is used to issue batch calls to multiple customers.
Only relevant for
outboundPhoneCall
. To call a single customer, usecustomer
instead.
-
name:
typing.Optional[str]
— This is the name of the call. This is just for your own reference.
-
schedule_plan:
typing.Optional[SchedulePlan]
— This is the schedule plan of the call.
-
transport:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
— This is the transport of the call.
-
assistant_id:
typing.Optional[str]
This is the assistant ID that will be used for the call. To use a transient assistant, use
assistant
instead.To start a call with:
- Assistant, use
assistantId
orassistant
- Squad, use
squadId
orsquad
- Workflow, use
workflowId
orworkflow
- Assistant, use
-
assistant:
typing.Optional[CreateAssistantDto]
This is the assistant that will be used for the call. To use an existing assistant, use
assistantId
instead.To start a call with:
- Assistant, use
assistant
- Squad, use
squad
- Workflow, use
workflow
- Assistant, use
-
assistant_overrides:
typing.Optional[AssistantOverrides]
— These are the overrides for theassistant
orassistantId
's settings and template variables.
-
squad_id:
typing.Optional[str]
This is the squad that will be used for the call. To use a transient squad, use
squad
instead.To start a call with:
- Assistant, use
assistant
orassistantId
- Squad, use
squad
orsquadId
- Workflow, use
workflow
orworkflowId
- Assistant, use
-
squad:
typing.Optional[CreateSquadDto]
This is a squad that will be used for the call. To use an existing squad, use
squadId
instead.To start a call with:
- Assistant, use
assistant
orassistantId
- Squad, use
squad
orsquadId
- Workflow, use
workflow
orworkflowId
- Assistant, use
-
workflow_id:
typing.Optional[str]
This is the workflow that will be used for the call. To use a transient workflow, use
workflow
instead.To start a call with:
- Assistant, use
assistant
orassistantId
- Squad, use
squad
orsquadId
- Workflow, use
workflow
orworkflowId
- Assistant, use
-
workflow:
typing.Optional[CreateWorkflowDto]
This is a workflow that will be used for the call. To use an existing workflow, use
workflowId
instead.To start a call with:
- Assistant, use
assistant
orassistantId
- Squad, use
squad
orsquadId
- Workflow, use
workflow
orworkflowId
- Assistant, use
-
workflow_overrides:
typing.Optional[WorkflowOverrides]
— These are the overrides for theworkflow
orworkflowId
's settings and template variables.
-
phone_number_id:
typing.Optional[str]
This is the phone number that will be used for the call. To use a transient number, use
phoneNumber
instead.Only relevant for
outboundPhoneCall
andinboundPhoneCall
type.
-
phone_number:
typing.Optional[ImportTwilioPhoneNumberDto]
This is the phone number that will be used for the call. To use an existing number, use
phoneNumberId
instead.Only relevant for
outboundPhoneCall
andinboundPhoneCall
type.
-
customer_id:
typing.Optional[str]
This is the customer that will be called. To call a transient customer , use
customer
instead.Only relevant for
outboundPhoneCall
andinboundPhoneCall
type.
-
customer:
typing.Optional[CreateCustomerDto]
This is the customer that will be called. To call an existing customer, use
customerId
instead.Only relevant for
outboundPhoneCall
andinboundPhoneCall
type.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.calls.get(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.calls.get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.calls.delete(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.calls.delete( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.calls.update(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.calls.update( id="id", )
-
-
-
id:
str
-
name:
typing.Optional[str]
— This is the name of the call. This is just for your own reference.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.chats.list(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.chats.list()
-
-
-
assistant_id:
typing.Optional[str]
— This is the unique identifier for the assistant that will be used for the chat.
-
squad_id:
typing.Optional[str]
— This is the unique identifier for the squad that will be used for the chat.
-
workflow_id:
typing.Optional[str]
— This is the unique identifier for the workflow that will be used for the chat.
-
session_id:
typing.Optional[str]
— This is the unique identifier for the session that will be used for the chat.
-
page:
typing.Optional[float]
— This is the page number to return. Defaults to 1.
-
sort_order:
typing.Optional[ChatsListRequestSortOrder]
— This is the sort order for pagination. Defaults to 'DESC'.
-
limit:
typing.Optional[float]
— This is the maximum number of items to return. Defaults to 100.
-
created_at_gt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than the specified value.
-
created_at_lt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than the specified value.
-
created_at_ge:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than or equal to the specified value.
-
created_at_le:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than or equal to the specified value.
-
updated_at_gt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than the specified value.
-
updated_at_lt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than the specified value.
-
updated_at_ge:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than or equal to the specified value.
-
updated_at_le:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than or equal to the specified value.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.chats.create(...)
-
-
-
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).
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.chats.create( input="input", )
-
-
-
input:
CreateChatDtoInput
This is the input text for the chat. Can be a string or an array of chat messages. This field is REQUIRED for chat creation.
-
assistant_id:
typing.Optional[str]
— This is the assistant that will be used for the chat. To use an existing assistant, useassistantId
instead.
-
assistant:
typing.Optional[CreateAssistantDto]
— This is the assistant that will be used for the chat. To use an existing assistant, useassistantId
instead.
-
assistant_overrides:
typing.Optional[AssistantOverrides]
These are the variable values that will be used to replace template variables in the assistant messages. Only variable substitution is supported in chat contexts - other assistant properties cannot be overridden.
-
squad_id:
typing.Optional[str]
— This is the squad that will be used for the chat. To use a transient squad, usesquad
instead.
-
squad:
typing.Optional[CreateSquadDto]
— This is the squad that will be used for the chat. To use an existing squad, usesquadId
instead.
-
name:
typing.Optional[str]
— This is the name of the chat. This is just for your own reference.
-
session_id:
typing.Optional[str]
This is the ID of the session that will be used for the chat. Mutually exclusive with previousChatId.
-
stream:
typing.Optional[bool]
This is a flag that determines whether the response should be streamed. When true, the response will be sent as chunks of text.
-
previous_chat_id:
typing.Optional[str]
This is the ID of the chat that will be used as context for the new chat. The messages from the previous chat will be used as context. Mutually exclusive with sessionId.
-
transport:
typing.Optional[TwilioSmsChatTransport]
This is used to send the chat through a transport like SMS. If transport.phoneNumberId and transport.customer are provided, creates a new session. If sessionId is provided without transport fields, uses existing session data. Cannot specify both sessionId and transport fields (phoneNumberId/customer) together.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.chats.get(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.chats.get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.chats.delete(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.chats.delete( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.chats.create_response(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.chats.create_response( input="input", )
-
-
-
input:
OpenAiResponsesRequestInput
This is the input text for the chat. Can be a string or an array of chat messages. This field is REQUIRED for chat creation.
-
assistant_id:
typing.Optional[str]
— This is the assistant that will be used for the chat. To use an existing assistant, useassistantId
instead.
-
assistant:
typing.Optional[CreateAssistantDto]
— This is the assistant that will be used for the chat. To use an existing assistant, useassistantId
instead.
-
assistant_overrides:
typing.Optional[AssistantOverrides]
These are the variable values that will be used to replace template variables in the assistant messages. Only variable substitution is supported in chat contexts - other assistant properties cannot be overridden.
-
squad_id:
typing.Optional[str]
— This is the squad that will be used for the chat. To use a transient squad, usesquad
instead.
-
squad:
typing.Optional[CreateSquadDto]
— This is the squad that will be used for the chat. To use an existing squad, usesquadId
instead.
-
name:
typing.Optional[str]
— This is the name of the chat. This is just for your own reference.
-
session_id:
typing.Optional[str]
This is the ID of the session that will be used for the chat. Mutually exclusive with previousChatId.
-
stream:
typing.Optional[bool]
— Whether to stream the response or not.
-
previous_chat_id:
typing.Optional[str]
This is the ID of the chat that will be used as context for the new chat. The messages from the previous chat will be used as context. Mutually exclusive with sessionId.
-
transport:
typing.Optional[TwilioSmsChatTransport]
This is used to send the chat through a transport like SMS. If transport.phoneNumberId and transport.customer are provided, creates a new session. If sessionId is provided without transport fields, uses existing session data. Cannot specify both sessionId and transport fields (phoneNumberId/customer) together.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.campaigns.campaign_controller_find_all(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.campaigns.campaign_controller_find_all()
-
-
-
id:
typing.Optional[str]
-
status:
typing.Optional[CampaignControllerFindAllRequestStatus]
-
page:
typing.Optional[float]
— This is the page number to return. Defaults to 1.
-
sort_order:
typing.Optional[CampaignControllerFindAllRequestSortOrder]
— This is the sort order for pagination. Defaults to 'DESC'.
-
limit:
typing.Optional[float]
— This is the maximum number of items to return. Defaults to 100.
-
created_at_gt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than the specified value.
-
created_at_lt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than the specified value.
-
created_at_ge:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than or equal to the specified value.
-
created_at_le:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than or equal to the specified value.
-
updated_at_gt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than the specified value.
-
updated_at_lt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than the specified value.
-
updated_at_ge:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than or equal to the specified value.
-
updated_at_le:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than or equal to the specified value.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.campaigns.campaign_controller_create(...)
-
-
-
from vapi import CreateCustomerDto, Vapi client = Vapi( token="YOUR_TOKEN", ) client.campaigns.campaign_controller_create( name="Q2 Sales Campaign", phone_number_id="phoneNumberId", customers=[CreateCustomerDto()], )
-
-
-
name:
str
— This is the name of the campaign. This is just for your own reference.
-
phone_number_id:
str
— This is the phone number ID that will be used for the campaign calls.
-
customers:
typing.Sequence[CreateCustomerDto]
— These are the customers that will be called in the campaign.
-
assistant_id:
typing.Optional[str]
— This is the assistant ID that will be used for the campaign calls. Note: Either assistantId or workflowId can be used, but not both.
-
workflow_id:
typing.Optional[str]
— This is the workflow ID that will be used for the campaign calls. Note: Either assistantId or workflowId can be used, but not both.
-
schedule_plan:
typing.Optional[SchedulePlan]
— This is the schedule plan for the campaign.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.campaigns.campaign_controller_find_one(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.campaigns.campaign_controller_find_one( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.campaigns.campaign_controller_remove(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.campaigns.campaign_controller_remove( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.campaigns.campaign_controller_update(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.campaigns.campaign_controller_update( id="id", )
-
-
-
id:
str
-
name:
typing.Optional[str]
— This is the name of the campaign. This is just for your own reference.
-
assistant_id:
typing.Optional[str]
This is the assistant ID that will be used for the campaign calls. Can only be updated if campaign is not in progress or has ended.
-
workflow_id:
typing.Optional[str]
This is the workflow ID that will be used for the campaign calls. Can only be updated if campaign is not in progress or has ended.
-
phone_number_id:
typing.Optional[str]
This is the phone number ID that will be used for the campaign calls. Can only be updated if campaign is not in progress or has ended.
-
schedule_plan:
typing.Optional[SchedulePlan]
This is the schedule plan for the campaign. Can only be updated if campaign is not in progress or has ended.
-
status:
typing.Optional[typing.Literal["ended"]]
This is the status of the campaign. Can only be updated to 'ended' if you want to end the campaign. When set to 'ended', it will delete all scheduled calls. Calls in progress will be allowed to complete.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.sessions.list(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.sessions.list()
-
-
-
name:
typing.Optional[str]
— This is the name of the session to filter by.
-
assistant_id:
typing.Optional[str]
— This is the ID of the assistant to filter sessions by.
-
squad_id:
typing.Optional[str]
— This is the ID of the squad to filter sessions by.
-
workflow_id:
typing.Optional[str]
— This is the ID of the workflow to filter sessions by.
-
page:
typing.Optional[float]
— This is the page number to return. Defaults to 1.
-
sort_order:
typing.Optional[SessionsListRequestSortOrder]
— This is the sort order for pagination. Defaults to 'DESC'.
-
limit:
typing.Optional[float]
— This is the maximum number of items to return. Defaults to 100.
-
created_at_gt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than the specified value.
-
created_at_lt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than the specified value.
-
created_at_ge:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than or equal to the specified value.
-
created_at_le:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than or equal to the specified value.
-
updated_at_gt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than the specified value.
-
updated_at_lt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than the specified value.
-
updated_at_ge:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than or equal to the specified value.
-
updated_at_le:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than or equal to the specified value.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.sessions.create(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.sessions.create()
-
-
-
name:
typing.Optional[str]
— This is a user-defined name for the session. Maximum length is 40 characters.
-
status:
typing.Optional[CreateSessionDtoStatus]
— This is the current status of the session. Can be either 'active' or 'completed'.
-
expiration_seconds:
typing.Optional[float]
— Session expiration time in seconds. Defaults to 24 hours (86400 seconds) if not set.
-
assistant_id:
typing.Optional[str]
— This is the ID of the assistant associated with this session. Use this when referencing an existing assistant.
-
assistant:
typing.Optional[CreateAssistantDto]
This is the assistant configuration for this session. Use this when creating a new assistant configuration. If assistantId is provided, this will be ignored.
-
squad_id:
typing.Optional[str]
— This is the squad ID associated with this session. Use this when referencing an existing squad.
-
squad:
typing.Optional[CreateSquadDto]
This is the squad configuration for this session. Use this when creating a new squad configuration. If squadId is provided, this will be ignored.
-
messages:
typing.Optional[typing.Sequence[CreateSessionDtoMessagesItem]]
— This is an array of chat messages in the session.
-
customer:
typing.Optional[CreateCustomerDto]
— This is the customer information associated with this session.
-
phone_number_id:
typing.Optional[str]
— This is the ID of the phone number associated with this session.
-
phone_number:
typing.Optional[ImportTwilioPhoneNumberDto]
— This is the phone number configuration for this session.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.sessions.get(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.sessions.get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.sessions.delete(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.sessions.delete( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.sessions.update(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.sessions.update( id="id", )
-
-
-
id:
str
-
name:
typing.Optional[str]
— This is the new name for the session. Maximum length is 40 characters.
-
status:
typing.Optional[UpdateSessionDtoStatus]
— This is the new status for the session.
-
expiration_seconds:
typing.Optional[float]
— Session expiration time in seconds. Defaults to 24 hours (86400 seconds) if not set.
-
messages:
typing.Optional[typing.Sequence[UpdateSessionDtoMessagesItem]]
— This is the updated array of chat messages.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.phone_numbers.list(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.phone_numbers.list()
-
-
-
limit:
typing.Optional[float]
— This is the maximum number of items to return. Defaults to 100.
-
created_at_gt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than the specified value.
-
created_at_lt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than the specified value.
-
created_at_ge:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than or equal to the specified value.
-
created_at_le:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than or equal to the specified value.
-
updated_at_gt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than the specified value.
-
updated_at_lt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than the specified value.
-
updated_at_ge:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than or equal to the specified value.
-
updated_at_le:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than or equal to the specified value.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.phone_numbers.create(...)
-
-
-
from vapi import CreateByoPhoneNumberDto, Vapi client = Vapi( token="YOUR_TOKEN", ) client.phone_numbers.create( request=CreateByoPhoneNumberDto( credential_id="credentialId", ), )
-
-
-
request:
PhoneNumbersCreateRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.phone_numbers.get(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.phone_numbers.get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.phone_numbers.delete(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.phone_numbers.delete( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.phone_numbers.update(...)
-
-
-
from vapi import UpdateByoPhoneNumberDto, Vapi client = Vapi( token="YOUR_TOKEN", ) client.phone_numbers.update( id="id", request=UpdateByoPhoneNumberDto(), )
-
-
-
id:
str
-
request:
PhoneNumbersUpdateRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.tools.list(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.tools.list()
-
-
-
limit:
typing.Optional[float]
— This is the maximum number of items to return. Defaults to 100.
-
created_at_gt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than the specified value.
-
created_at_lt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than the specified value.
-
created_at_ge:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than or equal to the specified value.
-
created_at_le:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than or equal to the specified value.
-
updated_at_gt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than the specified value.
-
updated_at_lt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than the specified value.
-
updated_at_ge:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than or equal to the specified value.
-
updated_at_le:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than or equal to the specified value.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.tools.create(...)
-
-
-
from vapi import CreateApiRequestToolDto, Vapi client = Vapi( token="YOUR_TOKEN", ) client.tools.create( request=CreateApiRequestToolDto( method="POST", url="url", ), )
-
-
-
request:
ToolsCreateRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.tools.get(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.tools.get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.tools.delete(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.tools.delete( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.tools.update(...)
-
-
-
from vapi import UpdateApiRequestToolDto, Vapi client = Vapi( token="YOUR_TOKEN", ) client.tools.update( id="id", request=UpdateApiRequestToolDto(), )
-
-
-
id:
str
-
request:
ToolsUpdateRequest
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.files.list()
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.files.list()
-
-
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.files.create(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.files.create()
-
-
-
file: `from future import annotations
core.File` — See core.File for more documentation
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.files.get(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.files.get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.files.delete(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.files.delete( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.files.update(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.files.update( id="id", )
-
-
-
id:
str
-
name:
typing.Optional[str]
— This is the name of the file. This is just for your own reference.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.structured_outputs.structured_output_controller_find_all(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.structured_outputs.structured_output_controller_find_all()
-
-
-
id:
typing.Optional[str]
— This will return structured outputs where the id matches the specified value.
-
name:
typing.Optional[str]
— This will return structured outputs where the name matches the specified value.
-
page:
typing.Optional[float]
— This is the page number to return. Defaults to 1.
-
sort_order:
typing.Optional[StructuredOutputControllerFindAllRequestSortOrder]
— This is the sort order for pagination. Defaults to 'DESC'.
-
limit:
typing.Optional[float]
— This is the maximum number of items to return. Defaults to 100.
-
created_at_gt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than the specified value.
-
created_at_lt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than the specified value.
-
created_at_ge:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than or equal to the specified value.
-
created_at_le:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than or equal to the specified value.
-
updated_at_gt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than the specified value.
-
updated_at_lt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than the specified value.
-
updated_at_ge:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than or equal to the specified value.
-
updated_at_le:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than or equal to the specified value.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.structured_outputs.structured_output_controller_create(...)
-
-
-
from vapi import JsonSchema, Vapi client = Vapi( token="YOUR_TOKEN", ) client.structured_outputs.structured_output_controller_create( name="name", schema=JsonSchema( type="string", ), )
-
-
-
name:
str
— This is the name of the structured output.
-
schema:
JsonSchema
This is the JSON Schema definition for the structured output.
This is required when creating a structured output. Defines the structure and validation rules for the data that will be extracted. Supports all JSON Schema features including:
- Objects and nested properties
- Arrays and array validation
- String, number, boolean, and null types
- Enums and const values
- Validation constraints (min/max, patterns, etc.)
- Composition with allOf, anyOf, oneOf
-
model:
typing.Optional[CreateStructuredOutputDtoModel]
This is the model that will be used to extract the structured output.
To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. Between the system or user messages, you must reference either 'transcript' or 'messages' with the '{{}}' syntax to access the conversation history. Between the system or user messages, you must reference a variation of the structured output with the '{{}}' syntax to access the structured output definition. i.e.: {{structuredOutput}} {{structuredOutput.name}} {{structuredOutput.description}} {{structuredOutput.schema}}
If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. If messages or required fields are not specified, the default system and user prompts will be used.
-
description:
typing.Optional[str]
This is the description of what the structured output extracts.
Use this to provide context about what data will be extracted and how it will be used.
-
assistant_ids:
typing.Optional[typing.Sequence[str]]
These are the assistant IDs that this structured output is linked to.
When linked to assistants, this structured output will be available for extraction during those assistant's calls.
-
workflow_ids:
typing.Optional[typing.Sequence[str]]
These are the workflow IDs that this structured output is linked to.
When linked to workflows, this structured output will be available for extraction during those workflow's execution.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.structured_outputs.structured_output_controller_find_one(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.structured_outputs.structured_output_controller_find_one( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.structured_outputs.structured_output_controller_remove(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.structured_outputs.structured_output_controller_remove( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.structured_outputs.structured_output_controller_update(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.structured_outputs.structured_output_controller_update( id="id", schema_override="schemaOverride", )
-
-
-
id:
str
-
schema_override:
str
-
model:
typing.Optional[UpdateStructuredOutputDtoModel]
This is the model that will be used to extract the structured output.
To provide your own custom system and user prompts for structured output extraction, populate the messages array with your system and user messages. You can specify liquid templating in your system and user messages. Between the system or user messages, you must reference either 'transcript' or 'messages' with the '{{}}' syntax to access the conversation history. Between the system or user messages, you must reference a variation of the structured output with the '{{}}' syntax to access the structured output definition. i.e.: {{structuredOutput}} {{structuredOutput.name}} {{structuredOutput.description}} {{structuredOutput.schema}}
If model is not specified, GPT-4.1 will be used by default for extraction, utilizing default system and user prompts. If messages or required fields are not specified, the default system and user prompts will be used.
-
name:
typing.Optional[str]
— This is the name of the structured output.
-
description:
typing.Optional[str]
This is the description of what the structured output extracts.
Use this to provide context about what data will be extracted and how it will be used.
-
assistant_ids:
typing.Optional[typing.Sequence[str]]
These are the assistant IDs that this structured output is linked to.
When linked to assistants, this structured output will be available for extraction during those assistant's calls.
-
workflow_ids:
typing.Optional[typing.Sequence[str]]
These are the workflow IDs that this structured output is linked to.
When linked to workflows, this structured output will be available for extraction during those workflow's execution.
-
schema:
typing.Optional[JsonSchema]
This is the JSON Schema definition for the structured output.
Defines the structure and validation rules for the data that will be extracted. Supports all JSON Schema features including:
- Objects and nested properties
- Arrays and array validation
- String, number, boolean, and null types
- Enums and const values
- Validation constraints (min/max, patterns, etc.)
- Composition with allOf, anyOf, oneOf
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.eval.eval_controller_get_paginated(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.eval.eval_controller_get_paginated()
-
-
-
id:
typing.Optional[str]
-
page:
typing.Optional[float]
— This is the page number to return. Defaults to 1.
-
sort_order:
typing.Optional[EvalControllerGetPaginatedRequestSortOrder]
— This is the sort order for pagination. Defaults to 'DESC'.
-
limit:
typing.Optional[float]
— This is the maximum number of items to return. Defaults to 100.
-
created_at_gt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than the specified value.
-
created_at_lt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than the specified value.
-
created_at_ge:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than or equal to the specified value.
-
created_at_le:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than or equal to the specified value.
-
updated_at_gt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than the specified value.
-
updated_at_lt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than the specified value.
-
updated_at_ge:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than or equal to the specified value.
-
updated_at_le:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than or equal to the specified value.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.eval.eval_controller_create(...)
-
-
-
from vapi import ChatEvalAssistantMessageMock, Vapi client = Vapi( token="YOUR_TOKEN", ) client.eval.eval_controller_create( messages=[ChatEvalAssistantMessageMock()], )
-
-
-
messages:
typing.Sequence[CreateEvalDtoMessagesItem]
This is the mock conversation that will be used to evaluate the flow of the conversation. Mock Messages are used to simulate the flow of the conversation 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
-
name:
typing.Optional[str]
This is the name of the eval. It helps identify what the eval is checking for.
-
description:
typing.Optional[str]
This is the description of the eval. This helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.eval.eval_controller_get(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.eval.eval_controller_get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.eval.eval_controller_remove(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.eval.eval_controller_remove( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.eval.eval_controller_update(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.eval.eval_controller_update( id="id", )
-
-
-
id:
str
-
messages:
typing.Optional[typing.Sequence[UpdateEvalDtoMessagesItem]]
This is the mock conversation that will be used to evaluate the flow of the conversation. Mock Messages are used to simulate the flow of the conversation 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
-
name:
typing.Optional[str]
This is the name of the eval. It helps identify what the eval is checking for.
-
description:
typing.Optional[str]
This is the description of the eval. This helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation.
-
type:
typing.Optional[typing.Literal["chat.mockConversation"]]
This is the type of the eval. Currently it is fixed to
chat.mockConversation
.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.eval.eval_controller_get_run(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.eval.eval_controller_get_run( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.eval.eval_controller_remove_run(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.eval.eval_controller_remove_run( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.eval.eval_controller_get_runs_paginated(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.eval.eval_controller_get_runs_paginated()
-
-
-
id:
typing.Optional[str]
-
page:
typing.Optional[float]
— This is the page number to return. Defaults to 1.
-
sort_order:
typing.Optional[EvalControllerGetRunsPaginatedRequestSortOrder]
— This is the sort order for pagination. Defaults to 'DESC'.
-
limit:
typing.Optional[float]
— This is the maximum number of items to return. Defaults to 100.
-
created_at_gt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than the specified value.
-
created_at_lt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than the specified value.
-
created_at_ge:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than or equal to the specified value.
-
created_at_le:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than or equal to the specified value.
-
updated_at_gt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than the specified value.
-
updated_at_lt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than the specified value.
-
updated_at_ge:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than or equal to the specified value.
-
updated_at_le:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than or equal to the specified value.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.eval.eval_controller_run(...)
-
-
-
from vapi import EvalRunTargetAssistant, Vapi client = Vapi( token="YOUR_TOKEN", ) client.eval.eval_controller_run( target=EvalRunTargetAssistant(), )
-
-
-
target:
EvalRunTargetAssistant
— This is the target that will be run against the eval
-
eval:
typing.Optional[CreateEvalDto]
— This is the transient eval that will be run
-
eval_id:
typing.Optional[str]
— This is the id of the eval that will be run.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.provider_resources.provider_resource_controller_get_provider_resources_paginated(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.provider_resources.provider_resource_controller_get_provider_resources_paginated()
-
-
-
id:
typing.Optional[str]
-
resource_id:
typing.Optional[str]
-
page:
typing.Optional[float]
— This is the page number to return. Defaults to 1.
-
sort_order:
typing.Optional[ ProviderResourceControllerGetProviderResourcesPaginatedRequestSortOrder ]
— This is the sort order for pagination. Defaults to 'DESC'.
-
limit:
typing.Optional[float]
— This is the maximum number of items to return. Defaults to 100.
-
created_at_gt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than the specified value.
-
created_at_lt:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than the specified value.
-
created_at_ge:
typing.Optional[dt.datetime]
— This will return items where the createdAt is greater than or equal to the specified value.
-
created_at_le:
typing.Optional[dt.datetime]
— This will return items where the createdAt is less than or equal to the specified value.
-
updated_at_gt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than the specified value.
-
updated_at_lt:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than the specified value.
-
updated_at_ge:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is greater than or equal to the specified value.
-
updated_at_le:
typing.Optional[dt.datetime]
— This will return items where the updatedAt is less than or equal to the specified value.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.provider_resources.provider_resource_controller_create_provider_resource()
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.provider_resources.provider_resource_controller_create_provider_resource()
-
-
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.provider_resources.provider_resource_controller_get_provider_resource(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.provider_resources.provider_resource_controller_get_provider_resource( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.provider_resources.provider_resource_controller_delete_provider_resource(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.provider_resources.provider_resource_controller_delete_provider_resource( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.provider_resources.provider_resource_controller_update_provider_resource(...)
-
-
-
from vapi import Vapi client = Vapi( token="YOUR_TOKEN", ) client.provider_resources.provider_resource_controller_update_provider_resource( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-
client.analytics.get(...)
-
-
-
from vapi import AnalyticsOperation, AnalyticsQuery, Vapi client = Vapi( token="YOUR_TOKEN", ) client.analytics.get( queries=[ AnalyticsQuery( table="call", name="name", operations=[ AnalyticsOperation( operation="sum", column="id", ) ], ) ], )
-
-
-
queries:
typing.Sequence[AnalyticsQuery]
— This is the list of metric queries you want to perform.
-
request_options:
typing.Optional[RequestOptions]
— Request-specific configuration.
-
-