Skip to content

Latest commit

 

History

History
7631 lines (5135 loc) · 118 KB

File metadata and controls

7631 lines (5135 loc) · 118 KB

Reference

Assistants

client.assistants.list(...) -> typing.List[Assistant]

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.assistants.list()

⚙️ Parameters

limit: typing.Optional[float] — This is the maximum number of items to return. Defaults to 100.

created_at_gt: typing.Optional[datetime.datetime] — This will return items where the createdAt is greater than the specified value.

created_at_lt: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than the specified value.

created_at_ge: typing.Optional[datetime.datetime] — This will return items where the createdAt is greater than or equal to the specified value.

created_at_le: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than or equal to the specified value.

updated_at_gt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than the specified value.

updated_at_lt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is less than the specified value.

updated_at_ge: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than or equal to the specified value.

updated_at_le: typing.Optional[datetime.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(...) -> Assistant

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.assistants.create()

⚙️ Parameters

request: CreateAssistantDto

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.assistants.get(...) -> Assistant

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.assistants.get(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.assistants.delete(...) -> Assistant

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.assistants.delete(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.assistants.update(...) -> Assistant

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.assistants.update(
    id="id",
)

⚙️ Parameters

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]. By default, voicemail detection is disabled.

client_messages: typing.Optional[typing.List[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,assistant.started. You can check the shape of the messages in ClientMessage schema.

server_messages: typing.Optional[typing.List[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,assistant.started. 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

transport_configurations: typing.Optional[typing.List[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.List[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.List[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.List[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.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 in call.analysis.

artifact_plan: typing.Optional[ArtifactPlan] — This is the plan for artifacts generated during assistant's calls. Stored in call.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 to true.
  • To enable live control of the assistant's calls, set monitorPlan.controlEnabled to true.
  • To attach monitors to the assistant, set monitorPlan.monitorIds to the set of monitor ids.

credential_ids: typing.Optional[typing.List[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:

  1. assistant.server.url
  2. phoneNumber.serverUrl
  3. org.serverUrl

keypad_input_plan: typing.Optional[KeypadInputPlan]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Squads

client.squads.list(...) -> typing.List[Squad]

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.squads.list()

⚙️ Parameters

limit: typing.Optional[float] — This is the maximum number of items to return. Defaults to 100.

created_at_gt: typing.Optional[datetime.datetime] — This will return items where the createdAt is greater than the specified value.

created_at_lt: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than the specified value.

created_at_ge: typing.Optional[datetime.datetime] — This will return items where the createdAt is greater than or equal to the specified value.

created_at_le: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than or equal to the specified value.

updated_at_gt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than the specified value.

updated_at_lt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is less than the specified value.

updated_at_ge: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than or equal to the specified value.

updated_at_le: typing.Optional[datetime.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(...) -> Squad

🔌 Usage

from vapi import Vapi, SquadMemberDto
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.squads.create(
    members=[
        SquadMemberDto()
    ],
)

⚙️ Parameters

request: CreateSquadDto

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.squads.get(...) -> Squad

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.squads.get(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.squads.delete(...) -> Squad

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.squads.delete(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.squads.update(...) -> Squad

🔌 Usage

from vapi import Vapi, SquadMemberDto
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.squads.update(
    id="id",
    members=[
        SquadMemberDto()
    ],
)

⚙️ Parameters

id: str

members: typing.List[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 and members[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.

Calls

client.calls.list(...) -> typing.List[Call]

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.calls.list()

⚙️ Parameters

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 and inboundPhoneCall type.

limit: typing.Optional[float] — This is the maximum number of items to return. Defaults to 100.

created_at_gt: typing.Optional[datetime.datetime] — This will return items where the createdAt is greater than the specified value.

created_at_lt: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than the specified value.

created_at_ge: typing.Optional[datetime.datetime] — This will return items where the createdAt is greater than or equal to the specified value.

created_at_le: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than or equal to the specified value.

updated_at_gt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than the specified value.

updated_at_lt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is less than the specified value.

updated_at_ge: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than or equal to the specified value.

updated_at_le: typing.Optional[datetime.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(...) -> CreateCallsResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.calls.create()

⚙️ Parameters

customers: typing.Optional[typing.List[CreateCustomerDto]]

This is used to issue batch calls to multiple customers.

Only relevant for outboundPhoneCall. To call a single customer, use customer 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.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 or assistant
  • Squad, use squadId or squad
  • Workflow, use workflowId or workflow

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_overrides: typing.Optional[AssistantOverrides] — These are the overrides for the assistant or assistantId'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 or assistantId
  • Squad, use squad or squadId
  • Workflow, use workflow or workflowId

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 or assistantId
  • Squad, use squad or squadId
  • Workflow, use workflow or workflowId

squad_overrides: typing.Optional[AssistantOverrides]

These are the overrides for the squad or squadId's member settings and template variables. This will apply to all members of the squad.

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 or assistantId
  • Squad, use squad or squadId
  • Workflow, use workflow or workflowId

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 or assistantId
  • Squad, use squad or squadId
  • Workflow, use workflow or workflowId

workflow_overrides: typing.Optional[WorkflowOverrides] — These are the overrides for the workflow or workflowId'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 and inboundPhoneCall 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 and inboundPhoneCall 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 and inboundPhoneCall 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 and inboundPhoneCall type.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.calls.get(...) -> Call

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.calls.get(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.calls.delete(...) -> Call

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.calls.delete(
    id="id",
)

⚙️ Parameters

id: str

ids: typing.Optional[typing.List[str]]

These are the Call IDs to be bulk deleted. If provided, the call ID if any in the request query will be ignored When requesting a bulk delete, updates when a call is deleted will be sent as a webhook to the server URL configured in the Org settings. It may take up to a few hours to complete the bulk delete, and will be asynchronous.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.calls.update(...) -> Call

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.calls.update(
    id="id",
)

⚙️ Parameters

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.

Chats

client.chats.list(...) -> ChatPaginatedResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.chats.list(
    assistant_id_any="assistant-1,assistant-2,assistant-3",
)

⚙️ Parameters

id: typing.Optional[str] — This is the unique identifier for the chat to filter by.

assistant_id: typing.Optional[str] — This is the unique identifier for the assistant that will be used for the chat.

assistant_id_any: typing.Optional[str] — Filter by multiple assistant IDs. Provide as comma-separated values.

squad_id: typing.Optional[str] — This is the unique identifier for the squad 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.

previous_chat_id: typing.Optional[str] — This is the unique identifier for the previous chat to filter by.

page: typing.Optional[float] — This is the page number to return. Defaults to 1.

sort_order: typing.Optional[ListChatsRequestSortOrder] — 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[datetime.datetime] — This will return items where the createdAt is greater than the specified value.

created_at_lt: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than the specified value.

created_at_ge: typing.Optional[datetime.datetime] — This will return items where the createdAt is greater than or equal to the specified value.

created_at_le: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than or equal to the specified value.

updated_at_gt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than the specified value.

updated_at_lt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is less than the specified value.

updated_at_ge: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than or equal to the specified value.

updated_at_le: typing.Optional[datetime.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(...) -> CreateChatsResponse

📝 Description

Creates a new chat with optional SMS delivery via transport field. Requires at least one of: assistantId/assistant, sessionId, or previousChatId. Note: sessionId and previousChatId are mutually exclusive. Transport field enables SMS delivery with two modes: (1) New conversation - provide transport.phoneNumberId and transport.customer to create a new session, (2) Existing conversation - provide sessionId to use existing session data. Cannot specify both sessionId and transport fields together. The transport.useLLMGeneratedMessageForOutbound flag controls whether input is processed by LLM (true, default) or forwarded directly as SMS (false).

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.chats.create(
    input="input",
)

⚙️ Parameters

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, use assistantId instead.

assistant: typing.Optional[CreateAssistantDto] — This is the assistant that will be used for the chat. To use an existing assistant, use assistantId 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, use squad instead.

squad: typing.Optional[CreateSquadDto] — This is the squad that will be used for the chat. To use an existing squad, use squadId 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(...) -> Chat

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.chats.get(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.chats.delete(...) -> Chat

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.chats.delete(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.chats.create_response(...) -> CreateResponseChatsResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.chats.create_response(
    input="input",
)

⚙️ Parameters

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, use assistantId instead.

assistant: typing.Optional[CreateAssistantDto] — This is the assistant that will be used for the chat. To use an existing assistant, use assistantId 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, use squad instead.

squad: typing.Optional[CreateSquadDto] — This is the squad that will be used for the chat. To use an existing squad, use squadId 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.

Campaigns

client.campaigns.campaign_controller_find_all(...) -> CampaignPaginatedResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.campaigns.campaign_controller_find_all()

⚙️ Parameters

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[datetime.datetime] — This will return items where the createdAt is greater than the specified value.

created_at_lt: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than the specified value.

created_at_ge: typing.Optional[datetime.datetime] — This will return items where the createdAt is greater than or equal to the specified value.

created_at_le: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than or equal to the specified value.

updated_at_gt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than the specified value.

updated_at_lt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is less than the specified value.

updated_at_ge: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than or equal to the specified value.

updated_at_le: typing.Optional[datetime.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(...) -> Campaign

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.campaigns.campaign_controller_create(
    name="Q2 Sales Campaign",
)

⚙️ Parameters

name: 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. Note: Only one of assistantId, workflowId, or squadId can be used.

workflow_id: typing.Optional[str] — This is the workflow ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used.

squad_id: typing.Optional[str] — This is the squad ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used.

phone_number_id: typing.Optional[str] — This is the phone number ID that will be used for the campaign calls. Required if dialPlan is not provided. Note: phoneNumberId and dialPlan are mutually exclusive.

dial_plan: typing.Optional[typing.List[DialPlanEntry]] — This is a list of dial entries, each specifying a phone number and the customers to call using that number. Use this when you want different phone numbers to call different sets of customers. Note: phoneNumberId and dialPlan are mutually exclusive.

schedule_plan: typing.Optional[SchedulePlan] — This is the schedule plan for the campaign. Calls will start at startedAt and continue until your organization’s concurrency limit is reached. Any remaining calls will be retried for up to one hour as capacity becomes available. After that hour or after latestAt, whichever comes first, any calls that couldn’t be placed won’t be retried.

customers: typing.Optional[typing.List[CreateCustomerDto]] — These are the customers that will be called in the campaign. Required if dialPlan is not provided.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.campaigns.campaign_controller_find_one(...) -> Campaign

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.campaigns.campaign_controller_find_one(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.campaigns.campaign_controller_remove(...) -> Campaign

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.campaigns.campaign_controller_remove(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.campaigns.campaign_controller_update(...) -> Campaign

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.campaigns.campaign_controller_update(
    id="id",
)

⚙️ Parameters

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.

squad_id: typing.Optional[str]

This is the squad 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. Note: phoneNumberId and dialPlan are mutually exclusive.

dial_plan: typing.Optional[typing.List[DialPlanEntry]] — This is a list of dial entries, each specifying a phone number and the customers to call using that number. Can only be updated if campaign is not in progress or has ended. Note: phoneNumberId and dialPlan are mutually exclusive.

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[UpdateCampaignDtoStatus]

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.

Sessions

client.sessions.list(...) -> SessionPaginatedResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.sessions.list(
    assistant_id_any="assistant-1,assistant-2,assistant-3",
    customer_number_any="+1234567890,+0987654321",
)

⚙️ Parameters

id: typing.Optional[str] — This is the unique identifier for the session to filter by.

name: typing.Optional[str]

This is the name of the customer. This is just for your own reference.

For SIP inbound calls, this is extracted from the From SIP header with format "Display Name" <sip:username@domain>.

assistant_id: typing.Optional[str] — This is the ID of the assistant to filter sessions by.

assistant_id_any: typing.Optional[str] — Filter by multiple assistant IDs. Provide as comma-separated values.

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.

number_e_164_check_enabled: typing.Optional[bool]

This is the flag to toggle the E164 check for the number field. This is an advanced property which should be used if you know your use case requires it.

Use cases:

  • false: To allow non-E164 numbers like +001234567890, 1234, or abc. This is useful for dialing out to non-E164 numbers on your SIP trunks.
  • true (default): To allow only E164 numbers like +14155551234. This is standard for PSTN calls.

If false, the number is still required to only contain alphanumeric characters (regex: /^\+?[a-zA-Z0-9]+$/).

@default true (E164 check is enabled)

extension: typing.Optional[str] — This is the extension that will be dialed after the call is answered.

assistant_overrides: typing.Optional[str]

These are the overrides for the assistant's settings and template variables specific to this customer. This allows customization of the assistant's behavior for individual customers in batch calls.

number: typing.Optional[str] — This is the number of the customer.

sip_uri: typing.Optional[str] — This is the SIP URI of the customer.

email: typing.Optional[str] — This is the email of the customer.

external_id: typing.Optional[str] — This is the external ID of the customer.

customer_number_any: typing.Optional[str] — Filter by any of the specified customer phone numbers (comma-separated).

phone_number_id: typing.Optional[str] — This will return sessions with the specified phoneNumberId.

phone_number_id_any: typing.Optional[typing.Union[str, typing.Sequence[str]]] — This will return sessions with any of the specified phoneNumberIds.

page: typing.Optional[float] — This is the page number to return. Defaults to 1.

sort_order: typing.Optional[ListSessionsRequestSortOrder] — 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[datetime.datetime] — This will return items where the createdAt is greater than the specified value.

created_at_lt: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than the specified value.

created_at_ge: typing.Optional[datetime.datetime] — This will return items where the createdAt is greater than or equal to the specified value.

created_at_le: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than or equal to the specified value.

updated_at_gt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than the specified value.

updated_at_lt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is less than the specified value.

updated_at_ge: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than or equal to the specified value.

updated_at_le: typing.Optional[datetime.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(...) -> Session

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.sessions.create()

⚙️ Parameters

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.

assistant_overrides: typing.Optional[AssistantOverrides]

These are the overrides for the assistant configuration. Use this to provide variable values and other overrides when using assistantId. Variable substitution will be applied to the assistant's messages and other text-based fields.

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.List[CreateSessionDtoMessagesItem]] — This is an array of chat messages in the session.

customer: typing.Optional[CreateCustomerDto] — This is the customer information associated with this session.

customer_id: typing.Optional[str] — This is the customerId of the customer 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(...) -> Session

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.sessions.get(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.sessions.delete(...) -> Session

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.sessions.delete(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.sessions.update(...) -> Session

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.sessions.update(
    id="id",
)

⚙️ Parameters

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.List[UpdateSessionDtoMessagesItem]] — This is the updated array of chat messages.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

PhoneNumbers

client.phone_numbers.list(...) -> typing.List[ListPhoneNumbersResponseItem]

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.phone_numbers.list()

⚙️ Parameters

limit: typing.Optional[float] — This is the maximum number of items to return. Defaults to 100.

created_at_gt: typing.Optional[datetime.datetime] — This will return items where the createdAt is greater than the specified value.

created_at_lt: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than the specified value.

created_at_ge: typing.Optional[datetime.datetime] — This will return items where the createdAt is greater than or equal to the specified value.

created_at_le: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than or equal to the specified value.

updated_at_gt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than the specified value.

updated_at_lt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is less than the specified value.

updated_at_ge: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than or equal to the specified value.

updated_at_le: typing.Optional[datetime.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(...) -> CreatePhoneNumbersResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.phone_numbers.create(
    request={
        "provider": "byo-phone-number",
        "credential_id": "credentialId"
    },
)

⚙️ Parameters

request: CreatePhoneNumbersRequest

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.phone_numbers.phone_number_controller_find_all_paginated(...) -> PhoneNumberPaginatedResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.phone_numbers.phone_number_controller_find_all_paginated()

⚙️ Parameters

search: typing.Optional[str] — This will search phone numbers by name, number, or SIP URI (partial match, case-insensitive).

page: typing.Optional[float] — This is the page number to return. Defaults to 1.

sort_order: typing.Optional[PhoneNumberControllerFindAllPaginatedRequestSortOrder] — 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[datetime.datetime] — This will return items where the createdAt is greater than the specified value.

created_at_lt: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than the specified value.

created_at_ge: typing.Optional[datetime.datetime] — This will return items where the createdAt is greater than or equal to the specified value.

created_at_le: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than or equal to the specified value.

updated_at_gt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than the specified value.

updated_at_lt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is less than the specified value.

updated_at_ge: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than or equal to the specified value.

updated_at_le: typing.Optional[datetime.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.get(...) -> GetPhoneNumbersResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.phone_numbers.get(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.phone_numbers.delete(...) -> DeletePhoneNumbersResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.phone_numbers.delete(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.phone_numbers.update(...) -> UpdatePhoneNumbersResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.phone_numbers.update(
    id="id",
    request={
        "provider": "byo-phone-number"
    },
)

⚙️ Parameters

id: str

request: UpdatePhoneNumbersRequestBody

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Tools

client.tools.list(...) -> typing.List[ListToolsResponseItem]

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.tools.list()

⚙️ Parameters

limit: typing.Optional[float] — This is the maximum number of items to return. Defaults to 100.

created_at_gt: typing.Optional[datetime.datetime] — This will return items where the createdAt is greater than the specified value.

created_at_lt: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than the specified value.

created_at_ge: typing.Optional[datetime.datetime] — This will return items where the createdAt is greater than or equal to the specified value.

created_at_le: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than or equal to the specified value.

updated_at_gt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than the specified value.

updated_at_lt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is less than the specified value.

updated_at_ge: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than or equal to the specified value.

updated_at_le: typing.Optional[datetime.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(...) -> CreateToolsResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.tools.create(
    request={
        "type": "apiRequest",
        "method": "POST",
        "url": "url"
    },
)

⚙️ Parameters

request: CreateToolsRequest

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tools.get(...) -> GetToolsResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.tools.get(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tools.delete(...) -> DeleteToolsResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.tools.delete(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tools.update(...) -> UpdateToolsResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.tools.update(
    id="id",
    request={
        "type": "apiRequest"
    },
)

⚙️ Parameters

id: str

request: UpdateToolsRequestBody

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Files

client.files.list() -> typing.List[File]

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.files.list()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.files.create(...) -> File

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.files.create(
    file="example_file",
)

⚙️ Parameters

file: core.File — This is the File you want to upload for use with the Knowledge Base.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.files.get(...) -> File

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.files.get(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.files.delete(...) -> File

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.files.delete(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.files.update(...) -> File

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.files.update(
    id="id",
)

⚙️ Parameters

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.

StructuredOutputs

client.structured_outputs.structured_output_controller_find_all(...) -> StructuredOutputPaginatedResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.structured_outputs.structured_output_controller_find_all()

⚙️ Parameters

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[datetime.datetime] — This will return items where the createdAt is greater than the specified value.

created_at_lt: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than the specified value.

created_at_ge: typing.Optional[datetime.datetime] — This will return items where the createdAt is greater than or equal to the specified value.

created_at_le: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than or equal to the specified value.

updated_at_gt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than the specified value.

updated_at_lt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is less than the specified value.

updated_at_ge: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than or equal to the specified value.

updated_at_le: typing.Optional[datetime.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(...) -> StructuredOutput

🔌 Usage

from vapi import Vapi, JsonSchema
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.structured_outputs.structured_output_controller_create(
    name="name",
    schema=JsonSchema(
        type="string",
    ),
)

⚙️ Parameters

request: CreateStructuredOutputDto

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.structured_outputs.structured_output_controller_find_one(...) -> StructuredOutput

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.structured_outputs.structured_output_controller_find_one(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.structured_outputs.structured_output_controller_remove(...) -> StructuredOutput

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.structured_outputs.structured_output_controller_remove(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.structured_outputs.structured_output_controller_update(...) -> StructuredOutput

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.structured_outputs.structured_output_controller_update(
    id="id",
    schema_override="schemaOverride",
)

⚙️ Parameters

id: str

schema_override: str

type: typing.Optional[UpdateStructuredOutputDtoType]

This is the type of structured output.

  • 'ai': Uses an LLM to extract structured data from the conversation (default).
  • 'regex': Uses a regex pattern to extract data from the transcript without an LLM.

regex: typing.Optional[str]

This is the regex pattern to match against the transcript.

Only used when type is 'regex'. Supports both raw patterns (e.g. '\d+') and regex literal format (e.g. '/\d+/gi'). Uses RE2 syntax for safety.

The result depends on the schema type:

  • boolean: true if the pattern matches, false otherwise
  • string: the first match or first capture group
  • number/integer: the first match parsed as a number
  • array: all matches

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.

compliance_plan: typing.Optional[ComplianceOverride] — Compliance configuration for this output. Only enable overrides if no sensitive data will be stored.

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.List[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.List[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.structured_outputs.structured_output_controller_run(...) -> StructuredOutput

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.structured_outputs.structured_output_controller_run(
    call_ids=[
        "callIds"
    ],
)

⚙️ Parameters

call_ids: typing.List[str]

This is the array of callIds that will be updated with the new structured output value. If preview is true, this array must be provided and contain exactly 1 callId. If preview is false, up to 100 callIds may be provided.

preview_enabled: typing.Optional[bool]

This is the preview flag for the re-run. If true, the re-run will be executed and the response will be returned immediately and the call artifact will NOT be updated. If false (default), the re-run will be executed and the response will be updated in the call artifact.

structured_output_id: typing.Optional[str]

This is the ID of the structured output that will be run. This must be provided unless a transient structured output is provided. When the re-run is executed, only the value of this structured output will be replaced with the new value, or added if not present.

structured_output: typing.Optional[CreateStructuredOutputDto]

This is the transient structured output that will be run. This must be provided if a structured output ID is not provided. When the re-run is executed, the structured output value will be added to the existing artifact.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Insight

client.insight.insight_controller_find_all(...) -> InsightPaginatedResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.insight.insight_controller_find_all()

⚙️ Parameters

id: typing.Optional[str]

page: typing.Optional[float] — This is the page number to return. Defaults to 1.

sort_order: typing.Optional[InsightControllerFindAllRequestSortOrder] — 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[datetime.datetime] — This will return items where the createdAt is greater than the specified value.

created_at_lt: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than the specified value.

created_at_ge: typing.Optional[datetime.datetime] — This will return items where the createdAt is greater than or equal to the specified value.

created_at_le: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than or equal to the specified value.

updated_at_gt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than the specified value.

updated_at_lt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is less than the specified value.

updated_at_ge: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than or equal to the specified value.

updated_at_le: typing.Optional[datetime.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.insight.insight_controller_create(...) -> InsightControllerCreateResponse

🔌 Usage

from vapi import Vapi, JsonQueryOnCallTableWithStringTypeColumn
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.insight.insight_controller_create(
    request={
        "type": "bar",
        "queries": [
            JsonQueryOnCallTableWithStringTypeColumn(
                type="vapiql-json",
                table="call",
                column="id",
                operation="count",
            )
        ]
    },
)

⚙️ Parameters

request: InsightControllerCreateRequest

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.insight.insight_controller_find_one(...) -> InsightControllerFindOneResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.insight.insight_controller_find_one(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.insight.insight_controller_remove(...) -> InsightControllerRemoveResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.insight.insight_controller_remove(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.insight.insight_controller_update(...) -> InsightControllerUpdateResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.insight.insight_controller_update(
    id="id",
    request={
        "type": "bar"
    },
)

⚙️ Parameters

id: str

request: InsightControllerUpdateRequestBody

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.insight.insight_controller_run(...) -> InsightRunResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.insight.insight_controller_run(
    id="id",
)

⚙️ Parameters

id: str

format_plan: typing.Optional[InsightRunFormatPlan]

time_range_override: typing.Optional[InsightTimeRangeWithStep]

This is the optional time range override for the insight. If provided, overrides every field in the insight's timeRange. If this is provided with missing fields, defaults will be used, not the insight's timeRange. start default - "-7d" end default - "now" step default - "day" For Pie and Text Insights, step will be ignored even if provided.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.insight.insight_controller_preview(...) -> InsightRunResponse

🔌 Usage

from vapi import Vapi, JsonQueryOnCallTableWithStringTypeColumn
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.insight.insight_controller_preview(
    request={
        "type": "bar",
        "queries": [
            JsonQueryOnCallTableWithStringTypeColumn(
                type="vapiql-json",
                table="call",
                column="id",
                operation="count",
            )
        ]
    },
)

⚙️ Parameters

request: InsightControllerPreviewRequest

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Eval

client.eval.eval_controller_get_paginated(...) -> EvalPaginatedResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.eval.eval_controller_get_paginated()

⚙️ Parameters

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[datetime.datetime] — This will return items where the createdAt is greater than the specified value.

created_at_lt: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than the specified value.

created_at_ge: typing.Optional[datetime.datetime] — This will return items where the createdAt is greater than or equal to the specified value.

created_at_le: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than or equal to the specified value.

updated_at_gt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than the specified value.

updated_at_lt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is less than the specified value.

updated_at_ge: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than or equal to the specified value.

updated_at_le: typing.Optional[datetime.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(...) -> Eval

🔌 Usage

from vapi import Vapi, ChatEvalAssistantMessageMock
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.eval.eval_controller_create(
    messages=[
        ChatEvalAssistantMessageMock(
            role="assistant",
        )
    ],
    type="chat.mockConversation",
)

⚙️ Parameters

request: CreateEvalDto

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.eval.eval_controller_get(...) -> Eval

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.eval.eval_controller_get(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.eval.eval_controller_remove(...) -> Eval

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.eval.eval_controller_remove(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.eval.eval_controller_update(...) -> Eval

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.eval.eval_controller_update(
    id="id",
)

⚙️ Parameters

id: str

messages: typing.Optional[typing.List[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[UpdateEvalDtoType]

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(...) -> EvalRun

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.eval.eval_controller_get_run(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.eval.eval_controller_remove_run(...) -> EvalRun

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.eval.eval_controller_remove_run(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.eval.eval_controller_get_runs_paginated(...) -> EvalRunPaginatedResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.eval.eval_controller_get_runs_paginated()

⚙️ Parameters

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[datetime.datetime] — This will return items where the createdAt is greater than the specified value.

created_at_lt: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than the specified value.

created_at_ge: typing.Optional[datetime.datetime] — This will return items where the createdAt is greater than or equal to the specified value.

created_at_le: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than or equal to the specified value.

updated_at_gt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than the specified value.

updated_at_lt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is less than the specified value.

updated_at_ge: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than or equal to the specified value.

updated_at_le: typing.Optional[datetime.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(...) -> typing.Dict[str, typing.Any]

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.eval.eval_controller_run(
    target={
        "type": "assistant"
    },
    type="eval",
)

⚙️ Parameters

target: CreateEvalRunDtoTarget — This is the target that will be run against the eval

type: CreateEvalRunDtoType

This is the type of the run. Currently it is fixed to 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.

ObservabilityScorecard

client.observability_scorecard.scorecard_controller_get(...) -> Scorecard

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.observability_scorecard.scorecard_controller_get(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.observability_scorecard.scorecard_controller_remove(...) -> Scorecard

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.observability_scorecard.scorecard_controller_remove(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.observability_scorecard.scorecard_controller_update(...) -> Scorecard

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.observability_scorecard.scorecard_controller_update(
    id="id",
)

⚙️ Parameters

id: str

name: typing.Optional[str] — This is the name of the scorecard. It is only for user reference and will not be used for any evaluation.

description: typing.Optional[str] — This is the description of the scorecard. It is only for user reference and will not be used for any evaluation.

metrics: typing.Optional[typing.List[ScorecardMetric]]

These are the metrics that will be used to evaluate the scorecard. Each metric will have a set of conditions and points that will be used to generate the score.

assistant_ids: typing.Optional[typing.List[str]]

These are the assistant IDs that this scorecard is linked to. When linked to assistants, this scorecard will be available for evaluation during those assistants' calls.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.observability_scorecard.scorecard_controller_get_paginated(...) -> ScorecardPaginatedResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.observability_scorecard.scorecard_controller_get_paginated()

⚙️ Parameters

id: typing.Optional[str]

page: typing.Optional[float] — This is the page number to return. Defaults to 1.

sort_order: typing.Optional[ScorecardControllerGetPaginatedRequestSortOrder] — 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[datetime.datetime] — This will return items where the createdAt is greater than the specified value.

created_at_lt: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than the specified value.

created_at_ge: typing.Optional[datetime.datetime] — This will return items where the createdAt is greater than or equal to the specified value.

created_at_le: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than or equal to the specified value.

updated_at_gt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than the specified value.

updated_at_lt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is less than the specified value.

updated_at_ge: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than or equal to the specified value.

updated_at_le: typing.Optional[datetime.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.observability_scorecard.scorecard_controller_create(...) -> Scorecard

🔌 Usage

from vapi import Vapi, ScorecardMetric
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.observability_scorecard.scorecard_controller_create(
    metrics=[
        ScorecardMetric(
            structured_output_id="structuredOutputId",
            conditions=[
                {
                    "key": "value"
                }
            ],
        )
    ],
)

⚙️ Parameters

request: CreateScorecardDto

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

ProviderResources

client.provider_resources.provider_resource_controller_get_provider_resources_paginated(...) -> ProviderResourcePaginatedResponse

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.provider_resources.provider_resource_controller_get_provider_resources_paginated(
    provider="cartesia",
    resource_name="pronunciation-dictionary",
)

⚙️ Parameters

provider: ProviderResourceControllerGetProviderResourcesPaginatedRequestProvider — The provider (e.g., 11labs)

resource_name: ProviderResourceControllerGetProviderResourcesPaginatedRequestResourceName — The resource name (e.g., pronunciation-dictionary)

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[datetime.datetime] — This will return items where the createdAt is greater than the specified value.

created_at_lt: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than the specified value.

created_at_ge: typing.Optional[datetime.datetime] — This will return items where the createdAt is greater than or equal to the specified value.

created_at_le: typing.Optional[datetime.datetime] — This will return items where the createdAt is less than or equal to the specified value.

updated_at_gt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than the specified value.

updated_at_lt: typing.Optional[datetime.datetime] — This will return items where the updatedAt is less than the specified value.

updated_at_ge: typing.Optional[datetime.datetime] — This will return items where the updatedAt is greater than or equal to the specified value.

updated_at_le: typing.Optional[datetime.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(...) -> ProviderResource

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.provider_resources.provider_resource_controller_create_provider_resource(
    provider="cartesia",
    resource_name="pronunciation-dictionary",
)

⚙️ Parameters

provider: ProviderResourceControllerCreateProviderResourceRequestProvider — The provider (e.g., 11labs)

resource_name: ProviderResourceControllerCreateProviderResourceRequestResourceName — The resource name (e.g., pronunciation-dictionary)

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.provider_resources.provider_resource_controller_get_provider_resource(...) -> ProviderResource

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.provider_resources.provider_resource_controller_get_provider_resource(
    provider="cartesia",
    resource_name="pronunciation-dictionary",
    id="id",
)

⚙️ Parameters

provider: ProviderResourceControllerGetProviderResourceRequestProvider — The provider (e.g., 11labs)

resource_name: ProviderResourceControllerGetProviderResourceRequestResourceName — The resource name (e.g., pronunciation-dictionary)

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.provider_resources.provider_resource_controller_delete_provider_resource(...) -> ProviderResource

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.provider_resources.provider_resource_controller_delete_provider_resource(
    provider="cartesia",
    resource_name="pronunciation-dictionary",
    id="id",
)

⚙️ Parameters

provider: ProviderResourceControllerDeleteProviderResourceRequestProvider — The provider (e.g., 11labs)

resource_name: ProviderResourceControllerDeleteProviderResourceRequestResourceName — The resource name (e.g., pronunciation-dictionary)

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.provider_resources.provider_resource_controller_update_provider_resource(...) -> ProviderResource

🔌 Usage

from vapi import Vapi
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.provider_resources.provider_resource_controller_update_provider_resource(
    provider="cartesia",
    resource_name="pronunciation-dictionary",
    id="id",
)

⚙️ Parameters

provider: ProviderResourceControllerUpdateProviderResourceRequestProvider — The provider (e.g., 11labs)

resource_name: ProviderResourceControllerUpdateProviderResourceRequestResourceName — The resource name (e.g., pronunciation-dictionary)

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Analytics

client.analytics.get(...) -> typing.List[AnalyticsQueryResult]

🔌 Usage

from vapi import Vapi, AnalyticsQuery, AnalyticsOperation
from vapi.environment import VapiEnvironment

client = Vapi(
    token="<token>",
    environment=VapiEnvironment.DEFAULT,
)

client.analytics.get(
    queries=[
        AnalyticsQuery(
            table="call",
            name="name",
            operations=[
                AnalyticsOperation(
                    operation="sum",
                    column="id",
                )
            ],
        )
    ],
)

⚙️ Parameters

queries: typing.List[AnalyticsQuery] — This is the list of metric queries you want to perform.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.