Request Body
The request body is a JSON object containing the assistant’s configuration. The parameters are organized into logical groups that mirror the sections in the UI. Many parameters are conditional based on the provider or options you select.Basic Information
Basic Information
name
(string, required): A unique name for your assistant.description
(string, optional): A brief description of the assistant’s purpose.is_active
(boolean, optional): Set totrue
to allow the assistant to handle calls. Defaults totrue
.
AI Configuration
AI Configuration
llm_provider
(string): The language model provider.- Enum:
"openai"
,"anthropic"
,"gemini"
,"groq"
,"xai"
,"custom"
. Defaults toopenai
.
- Enum:
llm_provider_config
(object): Provider-specific configuration.api_key
(string, required): The API key for the selected provider.model
(string, optional): The specific model to use (e.g.,gpt-4o-mini
).base_url
(string, optional): A custom API base URL. Required ifllm_provider
iscustom
.
llm_settings
(object): General parameters for the language model.temperature
(number): Controls creativity. Defaults to0.7
.max_tokens
(integer): Max length of the AI’s response in tokens. Defaults to1000
.system_prompt
(string): The AI’s personality and instructions.welcome_message
(string): The first thing the assistant says to the caller.
llm_fallback_providers
(object, optional): Configure backup LLM providers.enabled
(boolean): Set totrue
to enable fallbacks.fallbacks
(array of objects): An ordered list of fallback providers. Each object containsprovider
,model
,api_key
, andbase_url
.
tts_settings
(object):provider
(string): The TTS provider. Enum:"elevenlabs"
,"deepgram"
,"inworld"
,"resemble"
.voice_id
(string): The specific voice character to use (e.g.,rachel
).model_id
(string, optional): The voice model (e.g.,eleven_flash_v2_5
).- Conditional Fields:
- If
provider
iselevenlabs
:stability
(number): Voice consistency.similarity_boost
(number): Voice accuracy.style
(number): Speaking style variation.use_speaker_boost
(boolean): Enhances audio quality.
- If
provider
isresemble
:provider_config.project_uuid
(string): Your Resemble AI project UUID.
- If
provider
isinworld
:provider_config.language
(string): Language code (e.g.,en
).
- If
stt_settings
(object):model
(string): The STT model (e.g.,nova-2
,nova-3
).language
(string): Language code (e.g.,en-US
).keywords
(array of objects, optional): An array of keywords to boost. Each object should have akeyword
(string) and an optionalintensifier
(float). Fornova-2
and older models.keyterms
(array of strings, optional): An array of key terms to boost. Fornova-3
model only.
Call & Interruption Management
Call & Interruption Management
interruption_settings
(object):interruption_threshold
(integer): Number of words a user must speak to interrupt.min_speaking_time
(number): How long the assistant must speak before being interruptible (in seconds).interruption_cooldown
(number): Cooldown period after an interruption (in seconds).
idle_message
(string, optional): Message sent when the caller is silent.max_idle_messages
(integer, optional): How many idle messages to send before ending the call.idle_timeout
(integer, optional): Seconds of silence before sending an idle message.
Tools
Tools
tools_settings
(object): Configure built-in tools.end_call
(object, optional):enabled
(boolean): Enable/disable the tool.scenarios
(array of strings): Phrases that will trigger ending the call.
transfer_call
(object, optional):enabled
(boolean): Enable/disable the tool.scenarios
(array of strings): Phrases that will trigger a transfer.transfer_numbers
(array of strings): Phone numbers where calls can be transferred.
Advanced & Integration
Advanced & Integration
custom_settings
(object, optional): For advanced data extraction.structured_data_prompt
(string): Custom instructions for the AI on how to extract data.structured_data_schema
(object): A JSON schema defining the data to be extracted.
twilio_config
(object, optional): Bring your own Twilio credentials.account_sid
(string): Your Twilio Account SID.auth_token
(string): Your Twilio Auth Token.
telnyx_config
(object, optional): Bring your own Telnyx credentials.api_key
(string): Your Telnyx API Key.connection_id
(string): Your Telnyx Connection ID for Call Control Application.
webhook_url
(string, optional): A URL to send call event webhooks to.sms_webhook_url
(string, optional): A URL to send SMS event webhooks to.messaging_service_sid
(string, optional): Twilio Messaging Service SID for SMS handling. If not provided, uses the default from environment variables.
- If both
twilio_config
andtelnyx_config
are provided, Telnyx takes priority. - If neither is provided, the system uses environment variables (
TWILIO_*
orTELNYX_*
). - Each assistant can use a different telephony provider.
Example Request
Here is an example payload that mirrors the fields available in the UI to create a sophisticated customer service assistant. Note that fields likescenarios
and transfer_numbers
expect a JSON array of strings.
Example: Twilio Assistant
Example: Telnyx Assistant
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
Schema for creating a new assistant.
LLM provider: openai, anthropic, gemini, xai, groq, custom
Configuration for the selected LLM provider.
Twilio account configuration.
Settings for the Large Language Model.
Settings for call interruption behavior.
Settings for Text-to-Speech (TTS) service.
Settings for Speech-to-Text (STT) service.
Settings for integrated tools.
Settings for Retrieval-Augmented Generation (RAG).
Settings for LLM fallback providers.
Response
Successful Response
Schema for assistant response.
LLM provider: openai, anthropic, gemini, xai, groq, custom
Configuration for the selected LLM provider.
Twilio account configuration.
Settings for the Large Language Model.
Settings for call interruption behavior.
Settings for Text-to-Speech (TTS) service.
Settings for Speech-to-Text (STT) service.
Settings for integrated tools.
Settings for Retrieval-Augmented Generation (RAG).
Settings for LLM fallback providers.