TTS

Get a TTS request

GET
https://api.tunio.ai/v1/tts/requests/{request_id}

Get the state of a TTS request. audio_url is present only while the state is completed; the file is deleted and the state becomes expired 7 days after completion.

Path parameters

NameTypeDescription
request_idRequiredstringRequest ID

Responses

NameTypeDescription
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.
NameTypeDescription
messagestring
Message contains human readable error details.
successboolean
Success is always false for error payloads.
NameTypeDescription
messagestring
Message contains human readable error details.
successboolean
Success is always false for error payloads.
NameTypeDescription
messagestring
Message contains human readable error details.
successboolean
Success is always false for error payloads.
NameTypeDescription
messagestring
Message contains human readable error details.
successboolean
Success is always false for error payloads.
NameTypeDescription
messagestring
Message contains human readable error details.
successboolean
Success is always false for error payloads.