Voice AI Developer API (1.3.0)

Download OpenAPI specification:

Generate realistic speech and clone voices. AI voice agents with retrieval augmented generation (RAG) and model context protocol (MCP) included.

Text to Speech Audio

Generate Speech

Generate speech using an existing voice

Request Body schema: application/json
required
text
required
string

The text you would like to generate speech for

voice
required
string

The voice ID to use for generation

audio_format
required
string

The desired audio format: mp3, wav, or pcm

streaming
required
boolean

Whether or not to return streaming audio or a complete file

temperature
number

Model temperature, supported ranges are between 0.8 and 1.2

top_p
number

Model top_p, supported ranges are between 0.4 and 0.9

Responses

Request samples

Content type
application/json
{
  • "text": "string",
  • "voice": "string",
  • "audio_format": "string",
  • "streaming": true,
  • "temperature": 0,
  • "top_p": 0
}

Text to Speech Voices

Upload Voice

Upload a new voice

Request Body schema: application/json
required
name
required
string

The name of the voice

description
string

A description of the voice

type
required
string

Whether the voice is public or private

voiceTags
Array of strings

Relevant tags for the voice e.g. Male, Female, Calm, Funny

audio
required
string

A base64 encoded audio sample

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "type": "string",
  • "voiceTags": [
    ],
  • "audio": "string"
}

Response samples

Content type
application/json
{
  • "voiceId": "string"
}

List Voices

List your uploaded voices

query Parameters
filter
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update Voice

Update one of your uploaded voices

Request Body schema: application/json
required
name
required
string

The name of the voice

description
string

A description of the voice

type
required
string

Whether the voice is public or private

voiceTags
Array of strings

Relevant tags for the voice e.g. Male, Female, Calm, Funny

audio
required
string

A base64 encoded audio sample

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "type": "string",
  • "voiceTags": [
    ],
  • "audio": "string"
}

Response samples

Content type
application/json
{
  • "voiceId": "string"
}

Delete Voice

Delete an uploaded voice

Request Body schema: application/json
required
id
required
string

The ID of the voice to be deleted

Responses

Request samples

Content type
application/json
{
  • "id": "string"
}

Agent Management

Agent History

Retrieve dashboard statistics such as call durations and credit spend for your agents from the last 90 days.

Responses

Response samples

Content type
application/json
{
  • "number_of_calls": 0,
  • "average_duration": 0,
  • "total_credits_used": 0,
  • "avg_credits_per_call": 0,
  • "daily_stats": [
    ]
}

Agent Status

Retrieve current agent statuses.

Responses

Response samples

Content type
application/json
{
  • "total_agents": 0,
  • "status_summary": {
    }
}

Call History

Retrieve detailed call logs.

query Parameters
page
integer (Page) >= 1
Default: 1
limit
integer (Limit) [ 1 .. 100 ]
Default: 10
Start Date (string) or Start Date (null) (Start Date)

Filter calls after this date (ISO format UTC, e.g., 2024-01-01T00:00:00+00:00)

End Date (string) or End Date (null) (End Date)

Filter calls before this date (ISO format UTC, e.g., 2024-12-31T23:59:59+00:00)

Agent Id (string) or Agent Id (null) (Agent Id)

Filter calls by specific agent ID

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "pagination": {
    }
}

Transcript

Retrieve a URL to download a transcript for a given call.

path Parameters
summary_id
required
integer (Summary Id)

Responses

Response samples

Content type
application/json
{
  • "url": "string"
}

Agent Details List

Retrieve detailed agents information.

query Parameters
Page (integer) or Page (null) (Page)

Page number (1-based)

Limit (integer) or Limit (null) (Limit)

Items per page

Array of Show Statuses (strings) or Show Statuses (null) (Show Statuses)

List of statuses to show. By default shows deployed and paused agents.

Responses

Response samples

Content type
application/json
Example
{
  • "items": [
    ],
  • "pagination": {
    }
}

Agent

Create a new agent.

Request Body schema: application/json
required
name
required
string (Name) non-empty

Agent name cannot be empty

required
object (PublicAgentConfig)
Kb Id (integer) or Kb Id (null) (Kb Id)
Array of Documents (objects) or Documents (null) (Documents)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "config": {
    },
  • "kb_id": 0,
  • "documents": [
    ]
}

Response samples

Content type
application/json
{
  • "agent_id": "string",
  • "user_id": "string",
  • "name": "string",
  • "config": {
    },
  • "status": "paused",
  • "status_code": 1,
  • "kb_id": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Agent From Template

Create an agent from a saved template.

Request Body schema: application/json
required
Agent Template (string) or Agent Template (null) (Agent Template)
Name (string) or Name (null) (Name)

Responses

Request samples

Content type
application/json
{
  • "agent_template": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "agent_template": { },
  • "available_types": [
    ],
  • "description": "Pre-configured agent template based on selected type"
}

Owned Phone Numbers

Retrieve owned phone numbers that aren't currently assigned to an agent.

query Parameters
Page (integer) or Page (null) (Page)

Page number (1-based)

Limit (integer) or Limit (null) (Limit)

Items per page

Responses

Response samples

Content type
application/json
Example
{ }

Search Phone Numbers

Search available phone numbers for purchase.

Request Body schema: application/json
required
country_code
string (Country Code)
Default: "US"

Country code (e.g., 'US', 'CA')

Area Code (string) or Area Code (null) (Area Code)

3-digit area code (e.g., '415')

provider
string (Provider)
Default: "twilio"

Provider: 'twilio' or 'telnyx'

Responses

Request samples

Content type
application/json
{
  • "country_code": "US",
  • "area_code": "string",
  • "provider": "twilio"
}

Response samples

Content type
application/json
{
  • "results": [
    ],
  • "total_results": 0
}

Phone Number Details

Get detailed information on owned phone numbers.

query Parameters
Page (integer) or Page (null) (Page)

Page number (1-based)

Limit (integer) or Limit (null) (Limit)

Items per page

Responses

Response samples

Content type
application/json
Example
{
  • "phone_numbers": [
    ],
  • "total_numbers": 0,
  • "total_available": 0,
  • "total_assigned": 0
}

Purchase Phone Number

Attempt to purchase a phone number.

Request Body schema: application/json
required
phone_number
required
string (Phone Number)

Exact phone number to purchase (e.g., '+15551234567')

provider
string (Provider)
Default: "twilio"

Provider: 'twilio' or 'telnyx'

Responses

Request samples

Content type
application/json
{
  • "phone_number": "string",
  • "provider": "twilio"
}

Response samples

Content type
application/json
{
  • "phone_number": "string",
  • "status": "string"
}

Release Phone Number

Release an owned phone number. Phone numbers attached to deployed agents cannot be released. You must first pause your agent.

Request Body schema: application/json
required
phone_number
required
string (Phone Number)

Exact phone number to purchase (e.g., '+15551234567')

provider
string (Provider)
Default: "twilio"

Provider: 'twilio' or 'telnyx'

Responses

Request samples

Content type
application/json
{
  • "phone_number": "string",
  • "provider": "twilio"
}

Response samples

Content type
application/json
{
  • "phone_number": "string",
  • "status": "string"
}

Agent Details

Get detailed information on a single agent.

path Parameters
agent_id
required
string (Agent Id)

Responses

Response samples

Content type
application/json
{
  • "agent_id": "string",
  • "user_id": "string",
  • "name": "string",
  • "config": {
    },
  • "status": "paused",
  • "status_code": 1,
  • "kb_id": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Update Agent

Update an existing agent.

path Parameters
agent_id
required
string (Agent Id)
Request Body schema: application/json
required
Name (string) or Name (null) (Name)
PublicAgentConfig (object) or null
Status (string) or Status (null) (Status)
Kb Id (integer) or Kb Id (null) (Kb Id)
Array of Documents (objects) or Documents (null) (Documents)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "config": {
    },
  • "status": "string",
  • "kb_id": 0,
  • "documents": [
    ]
}

Response samples

Content type
application/json
{
  • "agent_id": "string",
  • "user_id": "string",
  • "name": "string",
  • "config": {
    },
  • "status": "paused",
  • "status_code": 1,
  • "kb_id": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Deploy Agent

Deploy an agent and prepare for phone calls.

path Parameters
agent_id
required
string (Agent Id)

Responses

Response samples

Content type
application/json
{
  • "agent": {
    },
  • "message": "string",
  • "sip_status": "string",
  • "sip_details": { }
}

Pause Agent

Pause an agent and free the phone number attached to it. This endpoint is idempotent.

path Parameters
agent_id
required
string (Agent Id)

Responses

Response samples

Content type
application/json
{
  • "agent": {
    }
}

Disable Agent

Disable an agent. An agent must be paused before being disabled.

path Parameters
agent_id
required
string (Agent Id)

Responses

Response samples

Content type
application/json
{
  • "agent": {
    },
  • "message": "string"
}

Agent Knowledge Base

Knowledge Base

Create a knowledge base that your agent can use for retrieval augmented generation (RAG).

Request Body schema: application/json
required
Name (string) or Name (null) (Name)
Description (string) or Description (null) (Description)
required
Array of objects (Documents)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "documents": [
    ]
}

Response samples

Content type
application/json
{
  • "kb_id": 0,
  • "user_id": "string",
  • "name": "string",
  • "description": "string",
  • "document_count": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "message": "string"
}

Knowledge Base List

Retrieve knowledge base details.

query Parameters
Page (integer) or Page (null) (Page)

Page number (1-based)

Limit (integer) or Limit (null) (Limit)

Items per page

Responses

Response samples

Content type
application/json
Example
{
  • "items": [
    ],
  • "pagination": {
    }
}

Knowledge Base Details

Retrieve knowledge base and its documents.

path Parameters
kb_id
required
integer (Kb Id)

Responses

Response samples

Content type
application/json
{
  • "kb_id": 0,
  • "user_id": "string",
  • "name": "string",
  • "description": "string",
  • "document_count": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "message": "string",
  • "documents": [
    ]
}

Knowledge Base

Update an existing knowledge base.

path Parameters
kb_id
required
integer (Kb Id)
Request Body schema: application/json
required
Name (string) or Name (null) (Name)
Description (string) or Description (null) (Description)
Array of Documents (objects) or Documents (null) (Documents)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "documents": [
    ]
}

Response samples

Content type
application/json
{
  • "kb_id": 0,
  • "user_id": "string",
  • "name": "string",
  • "description": "string",
  • "document_count": 0,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "message": "string",
  • "documents": [
    ]
}

Knowledge Base

Delete an existing knowledge base.

path Parameters
kb_id
required
integer (Kb Id)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Assign Knowledge Base

Assign an existing knowledge base to an agent for retrieval augmented generation (RAG).

path Parameters
agent_id
required
string (Agent Id)
Request Body schema: application/json
required
kb_id
required
integer (Kb Id)

Responses

Request samples

Content type
application/json
{
  • "kb_id": 0
}

Response samples

Content type
application/json
null

Unassign Knowledge Base

Remove a knowledge base from an agent.

path Parameters
agent_id
required
string (Agent Id)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Agent Auth

API Keys List

List all API keys.

Responses

Response samples

Content type
application/json
{
  • "api_keys": [
    ],
  • "total_keys": 0
}

API Key

Create a new API key.

Request Body schema: application/json
required
name
required
string (Name) [ 1 .. 100 ] characters

Human-readable name for the API key

Description (string) or Description (null) (Description)

Optional description of the key's purpose

Expires At (string) or Expires At (null) (Expires At)

Optional expiration date for the key

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "expires_at": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "api_key": "string",
  • "key_info": {
    }
}

API Key Details

Retrieve details for a given API key.

path Parameters
key_id
required
integer (Key Id)

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "description": "string",
  • "is_active": true,
  • "created_at": "2019-08-24T14:15:22Z",
  • "last_used_at": "2019-08-24T14:15:22Z",
  • "expires_at": "2019-08-24T14:15:22Z"
}

API Key

Update an API key.

path Parameters
key_id
required
integer (Key Id)
Request Body schema: application/json
required
Name (string) or Name (null) (Name)
Description (string) or Description (null) (Description)
Is Active (boolean) or Is Active (null) (Is Active)
Expires At (string) or Expires At (null) (Expires At)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "is_active": true,
  • "expires_at": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "description": "string",
  • "is_active": true,
  • "created_at": "2019-08-24T14:15:22Z",
  • "last_used_at": "2019-08-24T14:15:22Z",
  • "expires_at": "2019-08-24T14:15:22Z"
}

API Key

Delete an existing API key.

path Parameters
key_id
required
integer (Key Id)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Agent Connection

Connection Details

Get connection details for use with the Voice.AI SDK.

Request Body schema: application/json
required
Agent Id (string) or Agent Id (null) (Agent Id)
Metadata (string) or Metadata (null) (Metadata)
Environment (string) or Environment (null) (Environment)

Responses

Request samples

Content type
application/json
{
  • "agent_id": "string",
  • "metadata": "string",
  • "environment": "string"
}

Response samples

Content type
application/json
{
  • "server_url": "string",
  • "participant_token": "string",
  • "call_id": "string"
}

Agent Connection Status

Check if an agent is currently available to be connected to.

path Parameters
agent_id
required
string (Agent Id)

Responses

Response samples

Content type
application/json
{
  • "agent_id": "string",
  • "name": "string",
  • "creator_user_id": "string",
  • "voice_id": "string",
  • "status": "string",
  • "status_code": 0,
  • "call_allowed": true,
  • "call_validation_details": { }
}

Agent Calls

End Call

Marks a call as ended, this should be called as best-effort from front end clients at the end of a call.

path Parameters
call_id
required
string (Call Id)
query Parameters
Actual Duration Seconds (number) or Actual Duration Seconds (null) (Actual Duration Seconds)

Actual duration of the call in seconds

Responses

Response samples

Content type
application/json
{
  • "call_id": "string",
  • "status": "string",
  • "ended_at": "2019-08-24T14:15:22Z",
  • "actual_duration_seconds": 0,
  • "credits_used": 0
}