TTS

Create a TTS request

POST
https://api.tunio.ai/v1/tts/requests

Queue 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.

请求体

Text, voice and output format

名称类型说明
formatstring
Format of the resulting file: m4a (default), mp3 or wav.
model_idstring
Model is the TTS model (voice) id from GET /v1/tts/models, including the caller's cloned voices.
speednumber
Speed is the tempo multiplier, 0.7..1.8. Defaults to 1.0.
textstring
Text to synthesize, 1..2000 characters after trimming.
请求示例
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}

响应

名称类型说明
requestobject
Request is the TTS request.
audio_urlstring
AudioURL is the CDN link to the file, present only while completed and not expired.
completed_atstring
CompletedAt is when the request finished, successfully or not.
coststring
Cost in credits: the estimate while pending or processing, the amount charged once completed, 0 when failed.
created_atstring
CreatedAt is when the request was accepted.
durationinteger
Duration of the audio in seconds, set once completed.
errorstring
Error is a machine-readable failure code, set only when state is failed.
expires_atstring
ExpiresAt is when the audio file is deleted, 7 days after completion.
formatstring
Format of the resulting file.
model_idstring
ModelID is the TTS model the text is spoken with.
request_idstring
RequestID uniquely identifies the request.
speednumber
Speed is the tempo multiplier.
statestring
State is pending, processing, completed, failed or expired (audio removed after retention).
textstring
Text is the text being synthesized.
successboolean
Success indicates the request completed without errors.
名称类型说明
messagestring
Message contains human readable error details.
successboolean
Success is always false for error payloads.
名称类型说明
messagestring
Message contains human readable error details.
successboolean
Success is always false for error payloads.
名称类型说明
messagestring
Message contains human readable error details.
successboolean
Success is always false for error payloads.
名称类型说明
messagestring
Message contains human readable error details.
successboolean
Success is always false for error payloads.
名称类型说明
messagestring
Message contains human readable error details.
successboolean
Success is always false for error payloads.