Превратите текст в живую речь
Выберите голос, отправьте текст и получите аудио WAV сразу или из фоновой задачи для длинных текстов.
Как это работает
- 01
Получите список голосов через
GET /api/v1/tts/voicesи выберитеvoice_id. - 02
Отправьте текст в
POST /api/v1/tts/synthesizeили поставьте длинный текст в очередь черезPOST /api/v1/tts/jobs. - 03
Сохраните WAV из тела ответа. Цена, число оплаченных символов и баланс указаны в заголовках.
Аутентификация
Передавайте ключ как Authorization: Bearer. Для синтеза нужно право tts:write, для чтения задачи — tts:read. Список голосов открыт: без ключа он показывает стандартные голоса, а ключ с voices:read добавляет ваши клоны.
Пример
Ответ — это байты WAV, а не JSON, поэтому читайте его как blob или поток байтов. Передайте Idempotency-Key, чтобы повтор был безопасным: с тем же ключом вернётся то же аудио без повторного списания.
Справочник API
Поля запросов, ответы, цены и примеры кода для каждого эндпоинта, а также форма, которая отправляет настоящий запрос.
Хранится только в вашем браузере.
TTS
Text-to-Speech synthesis, dialogue, async jobs and the voice catalog.
POST /v1/tts/synthesize
Synthesize speech
Synthesizes speech from text and answers with WAV audio. Pass `voice_id` to use a stock voice or one of your voice clones. Optional `quality` selects a latency/fidelity preset: `fast` (lowest latency, slightly reduced detail), `standard` (default, balanced), `high` (best fidelity, slowest). Pass an `Idempotency-Key` header to make retries safe: replaying the same key returns the original audio and headers instead of synthesizing and charging again. Keys are scoped to your organization, must not exceed 191 characters (a longer key answers 400 `invalid_request` before anything is synthesized or charged), and are remembered for 7 days. The same key sent with a different body answers 409 `idempotency_conflict`. The response carries the price billed (`X-Cost`), billed character count (`X-Character-Count`), your balance after the charge (`X-Balance`), voice type (`X-Voice-Custom`), upstream latency (`X-Latency-Ms`) and a request id (`X-Request-Id`) in headers. A response replayed from an `Idempotency-Key` also carries `Idempotency-Replayed: 1`. Emotion tags are bracketed directions the voice acts out rather than reads aloud: `[laughter]`, `[sigh]`, `[dissatisfaction-hnn]`, `[confirmation-en]`, `[question-en]`, `[question-ah]`, `[question-oh]`, `[question-ei]`, `[question-yi]`, `[surprise-ah]`, `[surprise-oh]`, `[surprise-wa]`, `[surprise-yo]`. Write them inline in the text. Each bills as one character rather than as its spelling, so a tag costs the same however long its name is.
Pricing
per char- Default voice
- 0.3 credits
- Voice clone
- 0.5 credits
Параметры
| Field | Description |
|---|---|
Idempotency-Keyheader string | Makes a retry safe: the same key again returns the original audio and headers instead of synthesizing and charging again. At most 191 characters, scoped to your organization and kept for 7 days. |
Тело запроса
| Поле | Описание |
|---|---|
textОбязательноstring | The text to speak. Length is measured as spoken length, the same measure billing uses: an emotion tag counts as one character, however long its name is spelled. minLen: 1 |
voice_idstring | null | maxLen: 128 |
languagestring | null | Допустимые значения: |
qualitystring | null | Допустимые значения: |
speednumber | null | min: 0.5 · max: 2 |
Ответы
| Заголовок | Описание |
|---|---|
X-Costnumber | The price billed, in credits. |
X-Balancenumber | Your balance after the charge, in credits. |
X-Character-Countinteger | The characters billed. An emotion tag counts as one. |
X-Voice-Customstring | `1` when the voice is one of your clones, `0` for a stock voice. |
X-Latency-Msnumber | Time the voice took, in milliseconds. May have a fraction. |
Idempotency-Replayedstring | `1` when the answer is a replay of an earlier request with the same `Idempotency-Key`. |
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
Аудиопоток
audio/wav
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
X-Request-Id: string| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
X-RateLimit-Resetinteger | When the rate limit lets requests through again, as a Unix time in seconds. Sent with a 429 for `rate_limit_exceeded`. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. Sent with a 503 during maintenance, when a retry time was set. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. Sent with a 503 during maintenance, when a retry time was set. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
Примеры
Попробовать
Укажите API-ключ в панели выше, чтобы отправлять запросы с ключом.
POST /v1/tts/dialogue
Synthesize a dialogue
Renders a multi-speaker script into one stitched WAV file. `turns` holds 1–100 entries, each with a `voice_id` (a stock voice or one of your clones) and its `text`, and optionally its own `language`, `quality` and `speed`; `gap_ms` (0–5000) sets the silence between turns. Billed per character, per turn, at that turn's own rate. Over 10000 characters in total answers 413 `input_too_large`; a single turn over its own limit answers 422 `invalid_request`. The response carries `X-Cost`, `X-Balance`, `X-Character-Count`, `X-Voice-Custom`, `X-Latency-Ms` and `X-Request-Id`, as synthesize does. It adds per-turn start and end offsets in `X-Turns` (a JSON array with snake_case keys) and the number of turns in `X-Turn-Count`, so a client can seek to a line. `Idempotency-Key` works as on synthesize. Emotion tags are bracketed directions the voice acts out rather than reads aloud: `[laughter]`, `[sigh]`, `[dissatisfaction-hnn]`, `[confirmation-en]`, `[question-en]`, `[question-ah]`, `[question-oh]`, `[question-ei]`, `[question-yi]`, `[surprise-ah]`, `[surprise-oh]`, `[surprise-wa]`, `[surprise-yo]`. Write them inline in the text. Each bills as one character rather than as its spelling, so a tag costs the same however long its name is.
Pricing
per char- Default voice
- 0.3 credits
- Voice clone
- 0.5 credits
Параметры
| Field | Description |
|---|---|
Idempotency-Keyheader string | Makes a retry safe: the same key again returns the original audio and headers instead of synthesizing and charging again. At most 191 characters, scoped to your organization and kept for 7 days. |
Тело запроса
| Поле | Описание |
|---|---|
languagestring | null | Допустимые значения: |
gap_msinteger | null | min: 0 · max: 5000 |
qualitystring | null | Допустимые значения: |
speednumber | null | min: 0.5 · max: 2 |
turnsОбязательноobject[] |
Ответы
| Заголовок | Описание |
|---|---|
X-Costnumber | The price billed, in credits. |
X-Balancenumber | Your balance after the charge, in credits. |
X-Character-Countinteger | The characters billed. An emotion tag counts as one. |
X-Voice-Customstring | `1` when any turn used one of your clones, else `0`. |
X-Latency-Msnumber | Time the voices took, in milliseconds. May have a fraction. |
Idempotency-Replayedstring | `1` when the answer is a replay of an earlier request with the same `Idempotency-Key`. |
X-Turnsstring | Where each turn is in the audio, so a client can seek to a line: a JSON array with one object per turn, holding `index`, `voice_id`, `start_s`, `end_s` and `duration_s`. The times are in seconds. |
X-Turn-Countinteger | The number of turns rendered. |
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
Аудиопоток
audio/wav
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
X-Request-Id: string| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
X-RateLimit-Resetinteger | When the rate limit lets requests through again, as a Unix time in seconds. Sent with a 429 for `rate_limit_exceeded`. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. Sent with a 503 during maintenance, when a retry time was set. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. Sent with a 503 during maintenance, when a retry time was set. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
Примеры
Попробовать
Укажите API-ключ в панели выше, чтобы отправлять запросы с ключом.
POST /v1/tts/jobs
Create a synthesis job
Queues a synthesis and answers at once with 202 and the job, so a long text never waits on the voice. The body is exactly synthesize's. Poll `GET /api/v1/tts/jobs/{id}` until `status` is `succeeded` or `failed`, then download the audio from `GET /api/v1/tts/jobs/{id}/audio` or `audio_url`. An obvious refusal is still immediate: 402 (`insufficient_balance` or `spend_limit_exceeded`), 403 `voice_unavailable`, and 429 `too_many_active_jobs` when this key or its organization already has as many active jobs as its limit allows (with `Retry-After`). An organization's total is shared by all its keys. Pass an `Idempotency-Key` header (at most 191 characters) to make retries safe: a known key answers 200 with the original job and `Idempotency-Replayed: 1`, whatever its state. A job releases its key 24 hours after it finishes. The charge lands only when the job succeeds; a failed job costs nothing.
Pricing
per char- Default voice
- 0.3 credits
- Voice clone
- 0.5 credits
Параметры
| Field | Description |
|---|---|
Idempotency-Keyheader string | Makes a retry safe: the same key again answers 200 with the job it created, whatever its state, instead of queuing another. At most 191 characters, scoped to your organization, and released 24 hours after the job finishes. |
Тело запроса
| Поле | Описание |
|---|---|
textОбязательноstring | The text to speak. Length is measured as spoken length, the same measure billing uses: an emotion tag counts as one character, however long its name is spelled. minLen: 1 |
voice_idstring | null | maxLen: 128 |
languagestring | null | Допустимые значения: |
qualitystring | null | Допустимые значения: |
speednumber | null | min: 0.5 · max: 2 |
Ответы
| Заголовок | Описание |
|---|---|
Idempotency-Replayedstring | `1` when the answer is a replay of an earlier request with the same `Idempotency-Key`. |
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
dataОбязательноTtsJob | |
request_idОбязательноstring | format: uuid |
| Заголовок | Описание |
|---|---|
Locationstring | |
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
dataОбязательноTtsJob | |
request_idОбязательноstring | format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
X-Request-Id: string| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
X-RateLimit-Resetinteger | When the rate limit lets requests through again, as a Unix time in seconds. Sent with a 429 for `rate_limit_exceeded`. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. Sent with a 503 during maintenance, when a retry time was set. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
Примеры
Попробовать
Укажите API-ключ в панели выше, чтобы отправлять запросы с ключом.
GET /v1/tts/jobs/{id}
Get a synthesis job
The job and where it stands: `queued`, `running`, `succeeded` or `failed`. A final state never changes. `cost`, `balance_after`, `latency_ms` and `audio_url` are set once it has `succeeded`; `error` (`code` and `message`) once it has `failed`. Codes: `insufficient_balance`, `voice_unavailable`, `synthesis_failed`, `storage_failed`, `queue_timeout`. None of them is charged.
Параметры
| Field | Description |
|---|---|
idRequiredpath string | The job id returned when the job was created. |
Ответы
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
dataОбязательноTtsJob | |
request_idОбязательноstring | format: uuid |
X-Request-Id: string| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
X-Request-Id: string| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
X-RateLimit-Resetinteger | When the rate limit lets requests through again, as a Unix time in seconds. Sent with a 429 for `rate_limit_exceeded`. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. Sent with a 503 during maintenance, when a retry time was set. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
Примеры
Попробовать
Укажите API-ключ в панели выше, чтобы отправлять запросы с ключом.
Заполните обязательный параметр: id.
id*GET /v1/tts/jobs/{id}/audio
Download a synthesis job's audio
The WAV of a job that has `succeeded`, with the headers synthesize sends. 409 `job_not_finished` while the job is `queued` or `running`, and 409 `job_failed` after it failed. Audio is kept for 24 hours after the job finishes; after that, 410 `audio_expired`.
Параметры
| Field | Description |
|---|---|
idRequiredpath string | The job id returned when the job was created. |
Ответы
| Заголовок | Описание |
|---|---|
X-Costnumber | The price billed, in credits. |
X-Balancenumber | Your balance after the charge, in credits. |
X-Character-Countinteger | The characters billed. An emotion tag counts as one. |
X-Voice-Customstring | `1` when the voice is one of your clones, `0` for a stock voice. |
X-Latency-Msnumber | Time the voice took, in milliseconds. May have a fraction. |
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
Аудиопоток
audio/wav
X-Request-Id: string| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
X-Request-Id: string| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
X-RateLimit-Resetinteger | When the rate limit lets requests through again, as a Unix time in seconds. Sent with a 429 for `rate_limit_exceeded`. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. Sent with a 503 during maintenance, when a retry time was set. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
Примеры
Попробовать
Укажите API-ключ в панели выше, чтобы отправлять запросы с ключом.
Заполните обязательный параметр: id.
id*GET /v1/tts/voices
List voices
Lists stock voices and your organization's voice clones. `type` narrows to `stock` or `custom`; `language` filters by language. Public: without a key, or with a key that lacks `voices:read`, only stock voices come back. A key that is sent is still checked, so an invalid key answers 401 rather than the public list. Stock voices come first, in their catalog order, then your organization's ready clones, newest first. `tags` is always a list. Pages hold up to `limit` voices (1–100, default 50). Pass a page's `next_cursor` as `cursor` to get the next, until `next_cursor` is `null`. Cursors are opaque; don't build them.
Параметры
| Field | Description |
|---|---|
typequery string | null | |
languagequery string | null | |
limitquery integer | null | |
cursorquery string | null |
Ответы
X-Request-Id: string| Поле | Описание |
|---|---|
dataОбязательноVoice[] | |
next_cursorОбязательноstring | null | |
request_idОбязательноstring | format: uuid |
X-Request-Id: string| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
X-Request-Id: string| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
X-Request-Id: string| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
X-Request-Id: string| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
X-Request-Id: stringRetry-After: integer| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
Примеры
Попробовать
typelanguagelimitcursorGET /v1/tts/voices/{id}
Get a voice
One voice by `id`. Stock voices are public. A voice clone needs a key with `voices:read` from its own organization; any other caller gets 404 `not_found`.
Параметры
| Field | Description |
|---|---|
idRequiredpath string | The voice id. |
Ответы
X-Request-Id: string| Поле | Описание |
|---|---|
dataОбязательноVoice | |
request_idОбязательноstring | format: uuid |
X-Request-Id: string| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
X-Request-Id: string| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
X-Request-Id: string| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
X-Request-Id: string| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
X-Request-Id: stringRetry-After: integer| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
Примеры
Попробовать
Заполните обязательный параметр: id.
id*