Skip to main content
POST
多角色对话合成
Synthesize multi-speaker dialogue from an inputs[] list. Each item has text and voiceId. Maps to ElevenLabs Text to Dialogue:
  • Default: POST /v1/text-to-dialogue/stream
  • withTimestamps=true: POST /v1/text-to-dialogue/stream/with-timestamps
This is an async task. The response contains a taskId — use Get Task Status to poll. On success, result includes audioUrl. Billing prefers the official characterCost; local textLength is used as a fallback.

Constraints

  • Up to 100 dialogue lines per request (inputs)
  • Up to 10 distinct voiceId values
  • Each line: 1–5000 characters; text may include emotion tags such as [giggling] or [curious]
1

List voices

Call List Voices to obtain voiceId values (and optional previewUrl).
2

Create dialogue task

Call POST /eleven/dialogue with inputs (and optional model, outputFormat, withTimestamps, etc.).
3

Poll for audio

Poll GET /eleven/tasks?taskId=xxx until status is completed, then read result.audioUrl.

Models

Set withTimestamps: true when you need character-level timing in the result. Use settings.stability (0–1) to control delivery consistency.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
inputs
object[]
required

对话台词列表,每项含 text + voiceId

Required array length: 1 - 100 elements
Example:
model
enum<string>

模型(Dialogue 官方默认 eleven_v3)

Available options:
eleven_v3,
eleven_multilingual_v2,
eleven_turbo_v2_5,
eleven_flash_v2_5
Example:

"eleven_v3"

outputFormat
enum<string>

音频输出格式

Available options:
mp3_22050_32,
mp3_24000_48,
mp3_44100_32,
mp3_44100_64,
mp3_44100_96,
mp3_44100_128,
mp3_44100_192,
pcm_8000,
pcm_16000,
pcm_22050,
pcm_24000,
pcm_32000,
pcm_44100,
pcm_48000,
ulaw_8000,
alaw_8000,
opus_48000_32,
opus_48000_64,
opus_48000_96,
opus_48000_128,
opus_48000_192
Example:

"mp3_44100_128"

withTimestamps
boolean
default:false

是否返回字符级时间戳。true 时走官方 stream/with-timestamps

Example:

false

languageCode
string

语言代码 ISO-639-1(部分模型支持)

Example:

"en"

settings
object

对话生成设置

seed
number

随机种子

Example:

12345

applyTextNormalization
enum<string>

文本归一化

Available options:
auto,
on,
off
Example:

"auto"

Response

200 - application/json

任务创建成功

taskId
string
required

任务 ID,用于后续查询结果