Create voice agent
Voice AI
Create Voice Agent
POST
Create voice agent
The Create Voice Agent API allows you to create and configure AI voice agents with comprehensive settings including voice configuration, speech-to-text, LLM selection, and advanced call handling features.
Deepgram (Provider:
Gladia (Provider:
Sarvam (Provider:
ElevenLabs (Provider:
Cartesia (Provider:
Soniox (Provider:
Azure (Provider:
OpenAI Models (Provider:
Anthropic Models (Provider:
Google Gemini Models (Provider:
Azure OpenAI Models (Provider:
Sarvam Models (Provider:
AWS Bedrock Models (Provider:
Cerebras Models (Provider:
Grok Models (Provider:
Common causes:
Common causes:
Common causes:
API Endpoint
POST/create-agent
Content-Type: application/json
Authentication: Required (Token parameter)
Request Body
Required Fields
The
voice object is optional — include it to configure TTS provider, voice ID, and voice settings.
Optional Fields
Basic Information
Voice Configuration
Thevoice object is optional and, if provided, contains the following properties:
Voice Providers
Voice Models
ElevenLabs Models
OpenAI Models
Sarvam Models
Cartesia Models
Amazon Polly Models
Smallest Models
Soniox Models
Azure Models
Voice Settings
Thesettings object contains fine-tuning parameters for voice output:
Speech-to-Text Configuration
Thespeech_to_text object configures the transcription service. Use full language names (not codes) for the language field — for example english, hindi, multi, spanish, etc. Supported values include:
english,hindi,multi,albanian,arabic,armenian,azerbaijani,belarusian,bengali,bosnian,bulgarian,catalan,chinese,croatian,czech,danish,dutch,english_australia,english_india,english_new_zealand,english_uk,english_us,english_spanish,estonian,finnish,french,galician,georgian,german,german_switzerland,greek,gujarati,haitian_creole,hausa,hebrew,afrikaans,hungarian,icelandic,indonesian,italian,japanese,javanese,kannada,kazakh,khmer,korean,latvian,lithuanian,macedonian,malay,malayalam,maori,marathi,nepali,norwegian,persian,polish,portuguese,portuguese_brazil,punjabi,romanian,russian,serbian,shona,slovak,slovenian,somali,spanish,spanish_latin_america,sundanese,swahili,swedish,tagalog,tamil,tajik,telugu,thai,tswana,turkish,ukrainian,urdu,vietnamese,welsh.
speech_to_text object configures the transcription service:
STT Providers and Models
Deepgram (Provider: deepgram)
Gladia (Provider: gladia)
Sarvam (Provider: sarvam)
ElevenLabs (Provider: elevenLabs)
Cartesia (Provider: cartesia)
Soniox (Provider: soniox)
Azure (Provider: azure)
LLM Configuration
Thellm object configures the language model:
Available LLM Models
Pass the provider name inllm.llm (e.g. openai) and the model’s Value in llm.model
(e.g. gpt-4o). Each group below shows its provider name in the heading.
OpenAI Models (Provider: openai)
OpenAI Realtime Models
Meta LLaMA Models
Mistral Models
Other Models
Anthropic Models (Provider: anthropic)
Google Gemini Models (Provider: Gemini)
Azure OpenAI Models (Provider: azure)
Sarvam Models (Provider: sarvam)
AWS Bedrock Models (Provider: bedrock)
Cerebras Models (Provider: cerebras)
Grok Models (Provider: grok)
Configurations
Theconfigurations object contains advanced call handling settings:
Confidence Threshold
Do Not Call Detection
Agent Terminate Call
Configuration for when the agent can end calls autonomously:
Example:
Inactivity Handling
Configuration for handling user inactivity:
Example:
Interruption Settings
Configuration for handling user interruptions:
Sensitivity Levels:
1- Very low (agent rarely gets interrupted)2- Low3- Medium (Recommended)4- High5- Very high (agent easily interrupted)
Voicemail Handling
Configuration for voicemail detection and handling:
Example:
Response
Success Response
Status Code:200 OK
Error Responses
400 - Bad Request
- Missing required fields (
agent_name,prompt, orvoice) - Invalid data types
- Invalid provider or model values
401 - Unauthorized
- Missing
authorizationheader ortokenparameter - Invalid or expired API key
- Insufficient permissions
422 - Validation Error
- Invalid enum values (provider, model names)
- Out of range values (stability, speed, confidence_threshold)
- Invalid format (timezone, language codes)
500 - Internal Server Error
Example Requests
Minimal Request
Complete Request with All Features
Important Notes
-
Required Fields: Only
agent_nameandpromptare required. Thevoiceobject is optional — includevoice(withproviderandvoice_id) when you want to configure TTS for the agent. All other fields are optional. - Voice IDs: Get available voice IDs from the List Voices API.
-
Webhooks: If you provide a
session_data_webhook, ensure your endpoint can handle POST requests with session data. - Timezones: Use standard timezone strings (e.g., “America/New_York”, “Europe/London”, “Asia/Tokyo”).
-
Language Names: Use full language names (e.g.,
english,hindi,spanish) or region-specific variants (e.g.,english_us,english_uk) as shown in the Speech-to-Text section above. -
Model Compatibility: Ensure the voice model is compatible with your chosen provider. For example,
eleven_turbo_v2_5only works with ElevenLabs. - Rate Limits: API calls are subject to rate limiting based on your plan. See pricing documentation for details.
- Testing: After creating an agent, test it thoroughly before using in production. Use the Make Call API to test your agent.
- Attaching phone numbers is necessary to place calls via agents
Related Endpoints
- List Voices - Get available voice IDs
- Update Voice Agent - Modify agent settings
- List Voice Agents - View all agents
- Delete Voice Agent - Remove an agent
- Make Call - Test your agent with a call

