TTS
Create a TTS request
POST
https://api.tunio.ai/ v1/ tts/ requestsQueue text for speech synthesis with a catalog voice or one of the caller's cloned voices. Poll GET /v1/tts/requests/{request_id} until the state is completed, then download audio_url. Credits are charged only when synthesis succeeds; up to 20 requests may be pending or processing per account. Rate limited to 60 calls per minute per account across the TTS request endpoints.
Request body
Text, voice and output format
| Name | Type | Description |
|---|---|---|
| format | string | Format of the resulting file: m4a (default), mp3 or wav. |
| model_id | string | Model is the TTS model (voice) id from GET /v1/tts/models, including the caller's cloned voices. |
| speed | number | Speed is the tempo multiplier, 0.7..1.8. Defaults to 1.0. |
| text | string | Text to synthesize, 1..2000 characters after trimming. |
Request example
01{02 "format": "mp3",03 "model_id": "123e4567-e89b-12d3-a456-426614174000",04 "speed": 1,05 "text": "Welcome to our store! Today all coffee is 20% off."06}
Responses
| Name | Type | Description |
|---|---|---|
| request | object | Request is the TTS request. |
| audio_url | string | AudioURL is the CDN link to the file, present only while completed and not expired. |
| completed_at | string | CompletedAt is when the request finished, successfully or not. |
| cost | string | Cost in credits: the estimate while pending or processing, the amount charged once completed, 0 when failed. |
| created_at | string | CreatedAt is when the request was accepted. |
| duration | integer | Duration of the audio in seconds, set once completed. |
| error | string | Error is a machine-readable failure code, set only when state is failed. |
| expires_at | string | ExpiresAt is when the audio file is deleted, 7 days after completion. |
| format | string | Format of the resulting file. |
| model_id | string | ModelID is the TTS model the text is spoken with. |
| request_id | string | RequestID uniquely identifies the request. |
| speed | number | Speed is the tempo multiplier. |
| state | string | State is pending, processing, completed, failed or expired (audio removed after retention). |
| text | string | Text is the text being synthesized. |
| success | boolean | Success indicates the request completed without errors. |
| Name | Type | Description |
|---|---|---|
| message | string | Message contains human readable error details. |
| success | boolean | Success is always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| message | string | Message contains human readable error details. |
| success | boolean | Success is always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| message | string | Message contains human readable error details. |
| success | boolean | Success is always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| message | string | Message contains human readable error details. |
| success | boolean | Success is always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| message | string | Message contains human readable error details. |
| success | boolean | Success is always false for error payloads. |