ElevenLabs Text-to-Dialogue v3
Generate natural, expressive multi-speaker dialogue audio with ElevenLabs Eleven v3. Provide a sequence of dialogue turns, each with its own voice, and receive a single hosted audio file. Supports 70+ languages.
Models
| Model Name | Description |
|---|---|
elevenlabs-text-to-dialogue-v3 | Multi-speaker dialogue generation with expressive delivery across 70+ languages |
Pricing
Per-character pricing, based on the total character count of all dialogue[].text values:
| Item | Value |
|---|---|
| Per character | see playground |
| Limits | up to 10 distinct voices, total text ≤ 5000 characters per request |
Pre-charged on submit and automatically refunded if generation fails. Use POST /v1/estimate to preview the exact cost before submitting.
Create Task
curl -X POST https://api.aivideoapi.ai/v1/audio/generations \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "elevenlabs-text-to-dialogue-v3",
"callback_url": "https://your-server.com/webhook",
"input": {
"dialogue": [
{ "text": "Hey! Did you finish the report?", "voice": "21m00Tcm4TlvDq8ikWAM" },
{ "text": "Almost — just adding the final numbers now.", "voice": "AZnzlk1XvdvUeBnXmlld" }
],
"stability": 0.5,
"language_code": "auto"
}
}'
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | elevenlabs-text-to-dialogue-v3 |
input | object | Yes | Generation parameters, see below |
callback_url | string | No | URL to receive task completion/failure notifications |
Input Object
| Field | Type | Required | Description |
|---|---|---|---|
dialogue | array | Yes | Ordered list of dialogue turns. Each item is { text, voice }. Up to 10 distinct voices; total text across all turns ≤ 5000 characters |
dialogue[].text | string | Yes | What this voice says |
dialogue[].voice | string | Yes | ElevenLabs voice ID or preset name |
stability | number | No | Voice stability / randomness. One of 0, 0.5, 1. Default 0.5 |
language_code | string | No | Language code (e.g. auto, en, zh, ja, fr). Default auto (auto-detect) |
Response
{
"code": 200,
"msg": "success",
"data": {
"taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
Estimate
Preview the credit cost without creating a task. The cost scales with the total character count of dialogue[].text.
curl -X POST https://api.aivideoapi.ai/v1/estimate \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "elevenlabs-text-to-dialogue-v3",
"input": {
"dialogue": [
{ "text": "Hello there!", "voice": "21m00Tcm4TlvDq8ikWAM" }
]
}
}'
Query Task
curl https://api.aivideoapi.ai/v1/tasks/{taskId} \
-H "Authorization: Bearer sk-your-api-key"
Status transitions: pending -> processing -> completed or failed.
Completed
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "completed",
"model": "elevenlabs-text-to-dialogue-v3",
"created_at": 1775383908,
"completed_at": 1775383956,
"output": {
"urls": [
"https://file.aivideoapi.ai/audio/2026/06/23/dialogue.mp3"
],
"metadata": {
"model": "elevenlabs-text-to-dialogue-v3"
}
}
}
Audio URLs are valid for 24 hours.
Failed
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "failed",
"model": "elevenlabs-text-to-dialogue-v3",
"created_at": 1775383908,
"error": {
"code": "upstream_error",
"message": "Generation failed"
}
}
When a task fails, pre-charged credits are automatically refunded.
Callback
Pass callback_url when creating the task. The system will automatically send a POST request to your URL when the task completes or fails. The format matches the query task response.
Error Codes
When a request fails, the API returns a JSON error response:
{
"error": {
"code": "insufficient_credits",
"message": "Your credit balance is too low. Please top up.",
"type": "billing_error"
}
}
Error Reference
| HTTP Status | Code | Type | Description |
|---|---|---|---|
| 400 | invalid_request | invalid_request_error | Missing or invalid parameters |
| 401 | invalid_api_key | authentication_error | API key is invalid, disabled, or deleted |
| 402 | insufficient_credits | billing_error | Credit balance too low, please top up |
| 403 | ip_not_allowed | permission_error | Request IP not in the key's allowlist |
| 404 | model_not_found | invalid_request_error | Model does not exist or is inactive |
| 404 | task_not_found | invalid_request_error | Task ID does not exist |
| 429 | rate_limit_exceeded | rate_limit_error | Too many requests, please slow down |
| 429 | spend_limit_exceeded | billing_error | Key spend limit reached (hourly/daily/total) |
| 500 | internal_error | api_error | Unexpected server error |
| 503 | upstream_error | upstream_error | Upstream AI provider returned an error |
Common Scenarios
invalid_request (400)
Returned when required fields are missing or invalid.
{
"error": {
"code": "invalid_request",
"message": "'model' is required.",
"type": "invalid_request_error"
}
}
insufficient_credits (402)
Your balance is too low. Check your balance with GET /v1/credits and top up in Dashboard > Billing.
invalid_api_key (401)
Possible causes:
- The key does not start with
sk- - The key has been disabled or deleted
- The user account has been banned
upstream_error (503)
The upstream AI provider returned an error. This may happen when:
- The input contains sensitive or prohibited content
- The provider is temporarily unavailable
- The request parameters are not supported by the provider
Credits are automatically refunded when a task fails due to upstream errors.