Skip to content

Narrating ready text

/api/v1/tts is a compatible subset of Podcasts for prepared text only. It is kept for existing integrations; new integrations can use /api/v1/podcasts with mode: "prepared_text".

Method and path Scope
GET /api/v1/tts/voices tts:quote
POST /api/v1/tts/quotes — {title, text, voiceId, language} tts:quote
POST /api/v1/tts/podcasts — the quote body plus quoteId, Idempotency-Key header tts:create
GET /api/v1/tts/podcasts/:podcastId, …/receipt, …/audio tts:read
POST /api/v1/tts/podcasts/:podcastId/cancel tts:create
POST /api/v1/tts/podcasts/:podcastId/continuation-quote tts:quote
POST /api/v1/tts/podcasts/:podcastId/continue tts:create

The raw_text and topic modes are rejected here (400 INVALID_MODE), and topic, research, source and reuse fields return 400 UNSUPPORTED_TTS_FIELD.

The request carries no duration. The voice’s speaking rate gives an approximate duration, but does not limit the source length. The complete normalized text reaches synthesis; exceeding the estimate causes neither clipping nor regeneration. HTTP body limits, actual voice-provider limits, balance, key quota and a spending limit if set still apply.

The creating key can resume an admissible failed task through a continuation quote and confirmation with quoteId and Idempotency-Key; completed actions are not repurchased. See Status and continuation.

tts:quote, tts:create

1 · quote
curl -s -X POST https://cast.witqq.dev/api/v1/tts/quotes \
-H "Authorization: Bearer $KEY" \
-H 'Content-Type: application/json' \
-d '{
"title": "Объявление",
"text": "Уважаемые пассажиры, поезд до станции Лесная отправляется с третьего пути.",
"voiceId": "yandex-speechkit:filipp",
"language": "ru"
}'
2 · create
curl -s -X POST https://cast.witqq.dev/api/v1/tts/podcasts \
-H "Authorization: Bearer $KEY" \
-H 'Idempotency-Key: my-request-001' \
-H 'Content-Type: application/json' \
-d '{
"quoteId": "QUOTE_ID",
"title": "Объявление",
"text": "Уважаемые пассажиры, поезд до станции Лесная отправляется с третьего пути.",
"voiceId": "yandex-speechkit:filipp",
"language": "ru"
}'