> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unleashx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.

## API Endpoint

**POST** `/create-agent`

**Content-Type:** `application/json`

**Authentication:** Required (Token parameter)

## Request Body

```json theme={null}
{
  "agent_name": "Customer Support Agent",
  "description": "Handles customer inquiries and support requests",
  "prompt": "You are a helpful customer support agent. Answer questions politely and professionally.",
  "timezone": "America/New_York",
  "greeting": "Hello! Thank you for calling. How can I assist you today?",
  "session_data_webhook": "https://www.tryunleashx.com/webhooks/session-data",
  "voice": {
    "provider": "elevenlabs",
    "voice_id": "RXe6OFmxoC0nlSWpuCDy",
    "model": "eleven_turbo_v2_5",
    "settings": {
      "stability": 0.5,
      "voice_style": 1,
      "speed": 1.0,
      "speaker_boost": true,
      "similarity_boost": 0.75,
      "tone": "professional",
      "style": "classic",
      "instruction_sensitivity": "medium"
    }
  },
  "speech_to_text": {
    "provider": "deepgram",
    "model": "nova-2",
    "language": "english"
  },
  "llm": {
    "llm": "openai",
    "model": "gpt-4o"
  },
  "configurations": {
    "confidence_threshold": 0.8,
    "do_not_call_detection": true,
    "agent_terminate_call": {
      "enabled": true,
      "instruction": "End the call politely when the conversation is complete",
      "message": "Thank you for calling. Have a great day!"
    },
    "inactivity_handling": {
      "enabled": true,
      "idle_time": 30,
      "message": "Are you still there? Let me know if you need any help."
    },
    "interruption": {
      "enabled": true,
      "value": 3
    },
    "voicemail": {
      "enabled": true,
      "message": "Hello, this is a message from Customer Support. Please call us back at your convenience."
    }
  }
}
```

## Required Fields

| Field        | Type   | Description                                                                            |
| ------------ | ------ | -------------------------------------------------------------------------------------- |
| `agent_name` | string | Name of the voice agent (required)                                                     |
| `prompt`     | string | System prompt/instructions that define the agent's behavior and personality (required) |

The `voice` object is optional — include it to configure TTS provider, voice ID, and voice settings.

## Optional Fields

### Basic Information

| Field                  | Type   | Description                                                         | Default      |
| ---------------------- | ------ | ------------------------------------------------------------------- | ------------ |
| `description`          | string | Description of the agent's purpose                                  | Empty string |
| `timezone`             | string | Timezone for the agent (e.g., "America/New\_York", "Europe/London") | UTC          |
| `greeting`             | string | The agent's first message when the call starts                      | None         |
| `session_data_webhook` | string | Webhook URL to receive end-of-session data                          | None         |

## Voice Configuration

The `voice` object is **optional** and, if provided, contains the following properties:

| Property   | Type   | Required | Description                                                  |
| ---------- | ------ | -------- | ------------------------------------------------------------ |
| `provider` | string | No       | Voice provider: `elevenlabs`, `openai`, `deepgram`, `sarvam` |
| `voice_id` | string | Yes      | Unique identifier for the voice                              |
| `model`    | string | No       | TTS model to use (see Voice Models below)                    |
| `settings` | object | No       | Voice settings configuration (see Voice Settings below)      |

### Voice Providers

| Provider     | Value        | Description                                                                      |
| ------------ | ------------ | -------------------------------------------------------------------------------- |
| ElevenLabs   | `elevenlabs` | High-quality AI voice synthesis with natural-sounding voices and emotional range |
| OpenAI       | `openai`     | Advanced text-to-speech with multiple voice options                              |
| Deepgram     | `deepgram`   | Real-time speech recognition and voice synthesis                                 |
| Sarvam       | `sarvam`     | Multilingual voice synthesis optimized for Indian languages                      |
| Cartesia     | `cartesia`   | Low-latency, expressive real-time voice synthesis                                |
| Amazon Polly | `polly`      | AWS text-to-speech with neural and generative voices                             |
| Smallest     | `smallest`   | Fast, low-latency voice synthesis                                                |
| Soniox       | `soniox`     | Real-time text-to-speech                                                         |
| Azure        | `azure`      | Microsoft Azure neural text-to-speech                                            |

### Voice Models

#### ElevenLabs Models

| Model           | Value                    | Description                                            |
| --------------- | ------------------------ | ------------------------------------------------------ |
| Turbo v2.5      | `eleven_turbo_v2_5`      | Latest high-speed model with low latency (Recommended) |
| Multilingual v2 | `eleven_multilingual_v2` | High-quality multilingual voice synthesis              |
| Flash v2.5      | `eleven_flash_v2_5`      | Ultra-low-latency model                                |
| Monolingual v1  | `eleven_monolingual_v1`  | English-only optimized model                           |

#### OpenAI Models

| Model    | Value      | Description                         |
| -------- | ---------- | ----------------------------------- |
| TTS 1    | `tts-1`    | Standard quality, faster generation |
| TTS 1 HD | `tts-1-hd` | High definition, better quality     |

#### Sarvam Models

| Model     | Value       | Description                                       |
| --------- | ----------- | ------------------------------------------------- |
| Bulbul v3 | `bulbul:v3` | Multilingual voice optimized for Indian languages |

#### Cartesia Models

| Model   | Value     | Description                             |
| ------- | --------- | --------------------------------------- |
| Sonic 3 | `sonic-3` | Low-latency, expressive voice synthesis |

#### Amazon Polly Models

| Model      | Value        | Description                         |
| ---------- | ------------ | ----------------------------------- |
| Generative | `generative` | Most natural, expressive AWS voices |
| Neural     | `neural`     | Neural text-to-speech               |
| Longform   | `longform`   | Optimized for long-form content     |
| Standard   | `standard`   | Standard text-to-speech             |

#### Smallest Models

| Model          | Value            | Description              |
| -------------- | ---------------- | ------------------------ |
| Lightning v3.1 | `lightning-v3.1` | Latest low-latency model |
| Lightning v2   | `lightning-v2`   | Low-latency model        |
| Pulse          | `pulse`          | Fast voice synthesis     |

#### Soniox Models

| Model     | Value       | Description              |
| --------- | ----------- | ------------------------ |
| TTS RT v1 | `tts-rt-v1` | Real-time text-to-speech |

#### Azure Models

| Model | Value   | Description                           |
| ----- | ------- | ------------------------------------- |
| Azure | `azure` | Microsoft Azure neural text-to-speech |

### Voice Settings

The `settings` object contains fine-tuning parameters for voice output:

| Property                  | Type    | Range      | Description                                                               | Default   |
| ------------------------- | ------- | ---------- | ------------------------------------------------------------------------- | --------- |
| `stability`               | number  | 0.0 - 1.0  | Controls voice consistency. Higher = more stable, Lower = more expressive | 0.5       |
| `voice_style`             | number  | 0 - 100    | Style intensity for the voice                                             | 0         |
| `speed`                   | number  | 0.5 - 2.0  | Speech speed multiplier                                                   | 1.0       |
| `speaker_boost`           | boolean | true/false | Enhances speaker characteristics                                          | true      |
| `similarity_boost`        | number  | 0.0 - 1.0  | How closely to match original voice                                       | 0.75      |
| `tone`                    | string  | -          | Voice tone: `professional`, `friendly`, `neutral`, `enthusiastic`         | None      |
| `style`                   | string  | -          | Speaking style: `classic`, `conversational`, `narrative`                  | `classic` |
| `instruction_sensitivity` | string  | -          | How strictly to follow instructions: `low`, `medium`, `high`              | `medium`  |

## Speech-to-Text Configuration

The `speech_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`.

The `speech_to_text` object configures the transcription service:

| Property   | Type   | Required | Description                         |
| ---------- | ------ | -------- | ----------------------------------- |
| `provider` | string | Yes      | STT provider (see providers below)  |
| `model`    | string | Yes      | Model to use (see models below)     |
| `language` | string | Yes      | Language name (see languages above) |

### STT Providers and Models

#### Deepgram (Provider: `deepgram`)

| Model                    | Value                     | Description                     | Use Case                          |
| ------------------------ | ------------------------- | ------------------------------- | --------------------------------- |
| Nova 2                   | `nova-2`                  | General purpose model           | Default choice for most use cases |
| Nova 2 General           | `nova-2-general`          | General purpose transcription   | Versatile transcription           |
| Nova 2 Meeting           | `nova-2-meeting`          | Optimized for meetings          | Conference calls, meetings        |
| Nova 2 Phone Call        | `nova-2-phonecall`        | Optimized for phone calls       | Phone conversations (Recommended) |
| Nova 2 Finance           | `nova-2-finance`          | Optimized for finance           | Banking, financial services       |
| Nova 2 Conversational AI | `nova-2-conversationalai` | Optimized for conversational AI | AI assistants, chatbots           |
| Nova 2 Video             | `nova-2-video`            | Optimized for video             | Video content transcription       |
| Nova 2 Medical           | `nova-2-medical`          | Optimized for medical           | Healthcare conversations          |
| Nova 2 Drivethru         | `nova-2-drivethru`        | Optimized for drive-thru        | Drive-thru scenarios              |
| Nova 2 Automotive        | `nova-2-automotive`       | Optimized for automotive        | Car environments                  |
| Nova 2 Legal             | `nova-2-legal`            | Optimized for legal             | Legal conversations               |
| Nova 2 Government        | `nova-2-government`       | Optimized for government        | Government services               |
| Nova 2 Enterprise        | `nova-2-enterprise`       | Optimized for enterprise        | Enterprise applications           |
| Nova 3                   | `nova-3`                  | Latest general purpose model    | Most accurate, latest technology  |

#### Gladia (Provider: `gladia`)

| Model  | Value    | Description                              |
| ------ | -------- | ---------------------------------------- |
| Gladia | `gladia` | High-accuracy multilingual transcription |

#### Sarvam (Provider: `sarvam`)

| Model     | Value       | Description                        |
| --------- | ----------- | ---------------------------------- |
| Sarvam    | `sarvam`    | Optimized for Indian languages     |
| Saaras v3 | `saaras:v3` | Latest multilingual speech-to-text |

#### ElevenLabs (Provider: `elevenLabs`)

| Model              | Value                | Description                          |
| ------------------ | -------------------- | ------------------------------------ |
| Scribe v2 Realtime | `scribe_v2_realtime` | Real-time multilingual transcription |

#### Cartesia (Provider: `cartesia`)

| Model       | Value         | Description                         |
| ----------- | ------------- | ----------------------------------- |
| Ink Whisper | `ink-whisper` | Low-latency real-time transcription |

#### Soniox (Provider: `soniox`)

| Model     | Value       | Description                     |
| --------- | ----------- | ------------------------------- |
| STT RT v5 | `stt-rt-v5` | Latest real-time speech-to-text |
| STT RT v4 | `stt-rt-v4` | Real-time speech-to-text        |

#### Azure (Provider: `azure`)

| Model | Value   | Description                    |
| ----- | ------- | ------------------------------ |
| Azure | `azure` | Microsoft Azure speech-to-text |

## LLM Configuration

The `llm` object configures the language model:

| Property | Type   | Required | Description                                                           |
| -------- | ------ | -------- | --------------------------------------------------------------------- |
| `llm`    | string | Yes      | LLM **provider name** (e.g. `openai`, `anthropic`, `Gemini`, `azure`) |
| `model`  | string | Yes      | Model **Value** from that provider (e.g. `gpt-4o`)                    |

### Available LLM Models

Pass the **provider name** in `llm.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`)

| Model         | Value           | Description                     | Use Case                                      |
| ------------- | --------------- | ------------------------------- | --------------------------------------------- |
| GPT-4o        | `gpt-4o`        | Most capable model, multimodal  | Complex reasoning, best quality (Recommended) |
| GPT-4o Mini   | `gpt-4o-mini`   | Smaller, faster, cost-effective | Fast responses, simpler tasks                 |
| GPT-4 Turbo   | `gpt-4-turbo`   | High performance GPT-4          | Advanced reasoning                            |
| GPT-4.1       | `gpt-4.1`       | Latest GPT-4 variant            | Enhanced capabilities                         |
| GPT-4.1 Mini  | `gpt-4.1-mini`  | Compact GPT-4.1                 | Efficient processing                          |
| GPT-4.1 Nano  | `gpt-4.1-nano`  | Ultra-fast GPT-4.1              | Ultra-low latency                             |
| GPT-3.5 Turbo | `gpt-3.5-turbo` | Fast and cost-effective         | Simple conversations                          |
| GPT-5.4       | `gpt-5.4`       | Latest flagship model           | Highest quality reasoning                     |
| GPT-5.4 Mini  | `gpt-5.4-mini`  | Compact GPT-5.4                 | Fast, cost-effective                          |

#### OpenAI Realtime Models

| Model                | Value                          | Description                 |
| -------------------- | ------------------------------ | --------------------------- |
| GPT-4o Realtime      | `gpt-4o-realtime-preview`      | Real-time audio processing  |
| GPT-4o Mini Realtime | `gpt-4o-mini-realtime-preview` | Faster real-time processing |

#### Meta LLaMA Models

| Model          | Value            | Description           | Use Case                       |
| -------------- | ---------------- | --------------------- | ------------------------------ |
| LLaMA 3.1 405B | `llama-3-1-405b` | Largest, most capable | Complex tasks, high accuracy   |
| LLaMA 3.1 70B  | `llama-3-1-70b`  | Balanced performance  | Good quality, reasonable speed |
| LLaMA 3.1 8B   | `llama-3-1-8b`   | Fast and efficient    | Quick responses                |
| LLaMA 3 70B    | `llama-3-70b`    | Previous generation   | Reliable performance           |

#### Mistral Models

| Model              | Value                | Description                     |
| ------------------ | -------------------- | ------------------------------- |
| Mistral Large 2407 | `mistral-large-2407` | High-performance European model |

#### Other Models

| Model                 | Value                   | Description              |
| --------------------- | ----------------------- | ------------------------ |
| L3.1 70B Euryale v2.2 | `l3.1-70b-euryale-v2.2` | Fine-tuned LLaMA variant |
| DeepSeek v3           | `deepseek-v3`           | Advanced reasoning model |

#### Anthropic Models (Provider: `anthropic`)

| Model             | Value                       | Description                              |
| ----------------- | --------------------------- | ---------------------------------------- |
| Claude Opus 4.8   | `claude-opus-4-8`           | Most capable Claude model                |
| Claude Opus 4.7   | `claude-opus-4-7`           | High-capability reasoning                |
| Claude Opus 4.6   | `claude-opus-4-6`           | High-capability reasoning                |
| Claude Opus 4.5   | `claude-opus-4-5`           | High-capability reasoning                |
| Claude Opus 4.1   | `claude-opus-4-1-20250805`  | Opus 4.1                                 |
| Claude Opus 4.2   | `claude-opus-4-20250514`    | Opus 4                                   |
| Claude Sonnet 4.6 | `claude-sonnet-4-6`         | Balanced speed and quality (Recommended) |
| Claude Sonnet 4.5 | `claude-sonnet-4-5`         | Balanced speed and quality               |
| Claude Sonnet 4.0 | `claude-sonnet-4-0`         | Sonnet 4                                 |
| Claude Haiku 4.5  | `claude-haiku-4-5`          | Fast, cost-effective                     |
| Claude Haiku 3.5  | `claude-haiku-3-5-20241022` | Fast, cost-effective                     |

#### Google Gemini Models (Provider: `Gemini`)

| Model                         | Value                           | Description                   |
| ----------------------------- | ------------------------------- | ----------------------------- |
| Gemini 3.1 Pro Preview        | `gemini-3.1-pro-preview`        | Latest high-capability Gemini |
| Gemini 3.1 Flash Lite Preview | `gemini-3.1-flash-lite-preview` | Fast, lightweight             |
| Gemini 3 Flash Preview        | `gemini-3-flash-preview`        | Fast Gemini 3                 |
| Gemini 2.5 Pro                | `gemini-2.5-pro`                | High-capability reasoning     |
| Gemini 2.5 Flash              | `gemini-2.5-flash`              | Fast, balanced                |
| Gemini 2.5 Flash Lite         | `gemini-2.5-flash-lite`         | Lightweight, low latency      |

#### Azure OpenAI Models (Provider: `azure`)

| Model       | Value         | Description              |
| ----------- | ------------- | ------------------------ |
| GPT-4o      | `gpt-4o`      | Azure-hosted GPT-4o      |
| GPT-4o Mini | `gpt-4o-mini` | Azure-hosted GPT-4o Mini |
| GPT-5 Mini  | `gpt-5-mini`  | Azure-hosted GPT-5 Mini  |

#### Sarvam Models (Provider: `sarvam`)

| Model       | Value         | Description                                   |
| ----------- | ------------- | --------------------------------------------- |
| Sarvam 105B | `sarvam-105b` | Large multilingual model for Indian languages |
| Sarvam 30B  | `sarvam-30b`  | Efficient multilingual model                  |

#### AWS Bedrock Models (Provider: `bedrock`)

| Model         | Value                     | Description                        |
| ------------- | ------------------------- | ---------------------------------- |
| Qwen3 VL 235B | `qwen.qwen3-vl-235b-a22b` | Large multimodal model via Bedrock |
| GPT-OSS 120B  | `openai.gpt-oss-120b-1:0` | Open-weight GPT model via Bedrock  |

#### Cerebras Models (Provider: `cerebras`)

| Model               | Value                            | Description                  |
| ------------------- | -------------------------------- | ---------------------------- |
| ZAI GLM 4.6         | `zai-glm-4.6`                    | High-throughput hosted model |
| Qwen3 235B Instruct | `qwen-3-235b-a22b-instruct-2507` | Large instruct model         |
| GPT-OSS 120B        | `gpt-oss-120b`                   | Open-weight GPT model        |

#### Grok Models (Provider: `grok`)

| Model | Value  | Description    |
| ----- | ------ | -------------- |
| Grok  | `grok` | xAI Grok model |

## Configurations

The `configurations` object contains advanced call handling settings:

### Confidence Threshold

| Property               | Type   | Range     | Description                               | Default |
| ---------------------- | ------ | --------- | ----------------------------------------- | ------- |
| `confidence_threshold` | number | 0.0 - 1.0 | Minimum confidence for speech recognition | 0.8     |

### Do Not Call Detection

| Property                | Type    | Description                                 | Default |
| ----------------------- | ------- | ------------------------------------------- | ------- |
| `do_not_call_detection` | boolean | Detect and respect "do not call" indicators | false   |

### Agent Terminate Call

Configuration for when the agent can end calls autonomously:

| Property      | Type    | Description                        | Default |
| ------------- | ------- | ---------------------------------- | ------- |
| `enabled`     | boolean | Allow agent to terminate calls     | false   |
| `instruction` | string  | Instructions for when to end calls | None    |
| `message`     | string  | Message to say before ending call  | None    |

**Example:**

```json theme={null}
{
  "enabled": true,
  "instruction": "End the call when the customer says goodbye or has no more questions",
  "message": "Thank you for calling. Have a great day!"
}
```

### Inactivity Handling

Configuration for handling user inactivity:

| Property    | Type    | Description                                 | Default |
| ----------- | ------- | ------------------------------------------- | ------- |
| `enabled`   | boolean | Enable inactivity detection                 | false   |
| `idle_time` | number  | Seconds of silence before prompting (5-120) | 30      |
| `message`   | string  | Message to say after idle time              | None    |

**Example:**

```json theme={null}
{
  "enabled": true,
  "idle_time": 30,
  "message": "Are you still there? Let me know if you need any help."
}
```

### Interruption Settings

Configuration for handling user interruptions:

| Property  | Type    | Description                                             | Default |
| --------- | ------- | ------------------------------------------------------- | ------- |
| `enabled` | boolean | Allow users to interrupt the agent                      | true    |
| `value`   | number  | Interruption sensitivity (1-5, higher = more sensitive) | 3       |

**Sensitivity Levels:**

* `1` - Very low (agent rarely gets interrupted)
* `2` - Low
* `3` - Medium (Recommended)
* `4` - High
* `5` - Very high (agent easily interrupted)

### Voicemail Handling

Configuration for voicemail detection and handling:

| Property  | Type    | Description                            | Default |
| --------- | ------- | -------------------------------------- | ------- |
| `enabled` | boolean | Enable voicemail detection             | false   |
| `message` | string  | Message to leave if voicemail detected | None    |

**Example:**

```json theme={null}
{
  "enabled": true,
  "message": "Hello, this is Customer Support calling. Please call us back at 1-800-123-4567. Thank you!"
}
```

## Response

### Success Response

**Status Code:** `200 OK`

```json theme={null}
{
  "id": "agent_abc123xyz",
  "agent_name": "Customer Support Agent",
  "config": {
    "prompt": "You are a helpful customer support agent...",
    "voice": {
      "provider": "elevenlabs",
      "voice_id": "RXe6OFmxoC0nlSWpuCDy",
      "model": "eleven_turbo_v2_5"
    },
    "speech_to_text": {
      "provider": "deepgram",
      "model": "nova-2",
      "language": "english"
    },
    "llm": {
      "llm": "gpt-4o",
      "model": "gpt-4o"
    }
  },
  "created_at": 1706745600
}
```

### Error Responses

#### 400 - Bad Request

```json theme={null}
{
  "detail": "Invalid request body. Missing required field: agent_name"
}
```

**Common causes:**

* Missing required fields (`agent_name`, `prompt`, or `voice`)
* Invalid data types
* Invalid provider or model values

#### 401 - Unauthorized

```json theme={null}
{
  "detail": "Invalid authentication credentials"
}
```

**Common causes:**

* Missing `authorization` header or `token` parameter
* Invalid or expired API key
* Insufficient permissions

#### 422 - Validation Error

```json theme={null}
{
  "detail": [
    {
      "loc": ["body", "voice", "provider"],
      "msg": "Invalid voice provider. Must be one of: elevenlabs, openai, deepgram, sarvam",
      "type": "value_error"
    }
  ]
}
```

**Common causes:**

* Invalid enum values (provider, model names)
* Out of range values (stability, speed, confidence\_threshold)
* Invalid format (timezone, language codes)

#### 500 - Internal Server Error

```json theme={null}
{
  "detail": "Internal server error"
}
```

## Example Requests

### Minimal Request

```bash theme={null}
curl -X POST https://api.yourdomain.com/create-agent \
  -H "Content-Type: application/json" \
  -H "token: your_api_key_here" \
  -d '{
    "agent_name": "Simple Agent",
    "prompt": "You are a helpful assistant.",
    "voice": {
      "provider": "elevenlabs",
      "voice_id": "RXe6OFmxoC0nlSWpuCDy"
    }
  }'
```

### Complete Request with All Features

```bash theme={null}
curl -X POST https://api.yourdomain.com/create-agent \
  -H "Content-Type: application/json" \
  -H "token: your_api_key_here" \
  -d '{
    "agent_name": "Advanced Support Agent",
    "description": "Full-featured customer support agent",
    "prompt": "You are an experienced customer support agent. Be helpful, professional, and empathetic.",
    "timezone": "America/New_York",
    "greeting": "Hello! Thank you for calling. How can I help you today?",
    "session_data_webhook": "https://www.tryunleashx.com/webhooks/session-data",
    "voice": {
      "provider": "elevenlabs",
      "voice_id": "RXe6OFmxoC0nlSWpuCDy",
      "model": "eleven_turbo_v2_5",
      "settings": {
        "stability": 0.5,
        "voice_style": 1,
        "speed": 1.0,
        "speaker_boost": true,
        "similarity_boost": 0.75,
        "tone": "professional",
        "style": "conversational",
        "instruction_sensitivity": "medium"
      }
    },
    "speech_to_text": {
      "provider": "deepgram",
      "model": "nova-2-phonecall",
      "language": "english"
    },
    "llm": {
      "llm": "gpt-4o",
      "model": "gpt-4o"
    },
    "configurations": {
      "confidence_threshold": 0.8,
      "do_not_call_detection": true,
      "agent_terminate_call": {
        "enabled": true,
        "instruction": "End call politely when conversation is complete",
        "message": "Thank you for calling. Have a great day!"
      },
      "inactivity_handling": {
        "enabled": true,
        "idle_time": 30,
        "message": "Are you still there? Let me know if you need help."
      },
      "interruption": {
        "enabled": true,
        "value": 3
      },
      "voicemail": {
        "enabled": true,
        "message": "Hello, this is Customer Support. Please call us back. Thank you!"
      }
    }
  }'
```

## Important Notes

1. **Required Fields**: Only `agent_name` and `prompt` are required. The `voice` object is optional — include `voice` (with `provider` and `voice_id`) when you want to configure TTS for the agent. All other fields are optional.

2. **Voice IDs**: Get available voice IDs from the [List Voices API](/api-reference/voice-ai/list-voices).

3. **Webhooks**: If you provide a `session_data_webhook`, ensure your endpoint can handle POST requests with session data.

4. **Timezones**: Use standard timezone strings (e.g., "America/New\_York", "Europe/London", "Asia/Tokyo").

5. **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.

6. **Model Compatibility**: Ensure the voice model is compatible with your chosen provider. For example, `eleven_turbo_v2_5` only works with ElevenLabs.

7. **Rate Limits**: API calls are subject to rate limiting based on your plan. See [pricing documentation](/pricing/call-pricing) for details.

8. **Testing**: After creating an agent, test it thoroughly before using in production. Use the [Make Call API](/api-reference/voice-ai/make-call) to test your agent.

9. Attaching phone numbers is necessary to place calls via agents

## Related Endpoints

* [List Voices](/api-reference/voice-ai/list-voices) - Get available voice IDs
* [Update Voice Agent](/api-reference/voice-ai/update-voice-agent) - Modify agent settings
* [List Voice Agents](/api-reference/voice-ai/list-voice-agents) - View all agents
* [Delete Voice Agent](/api-reference/voice-ai/delete-voice-agent) - Remove an agent
* [Make Call](/api-reference/voice-ai/make-call) - Test your agent with a call


## OpenAPI

````yaml api-reference/openapi.json POST /create-agent
openapi: 3.1.0
info:
  title: >-
    UnleashX - Build human like conversations | Voice Agents | Automations | AI
    Workforce
  version: 1.0.0
  description: UnleashX - Your home for human like conversations
servers:
  - url: https://www.tryunleashx.com/api/v1/global/
security:
  - bearerAuth: []
paths:
  /create-agent:
    post:
      tags:
        - Voice AI
      summary: Create voice agent
      parameters:
        - name: token
          in: header
          required: true
          description: API token for authentication
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                agent_id:
                  type: integer
                agent_name:
                  type: string
                description:
                  type: string
                prompt:
                  type: string
                timezone:
                  type: string
                greeting:
                  type: string
                session_data_webhook:
                  type: string
                voice:
                  type: object
                  properties:
                    provider:
                      type: string
                      enum:
                        - elevenlabs
                        - openai
                        - deepgram
                        - sarvam
                    voice_id:
                      type: string
                    model:
                      type: string
                    settings:
                      type: object
                speech_to_text:
                  type: object
                  properties:
                    provider:
                      type: string
                    model:
                      type: string
                    language:
                      type: string
                      enum:
                        - 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
                llm:
                  type: object
                  properties:
                    llm:
                      type: string
                    model:
                      type: string
                configurations:
                  type: object
      responses:
        '201':
          description: Created
      security: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````