Text to speech
Convert text to speech through the Respan gateway with automatic logging.
Authentication
AuthorizationBearer
Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, OpenAI or Azure OpenAI provider credentials go in Settings -> Providers or the request body credential_override field, not in this auth field.
Headers
X-Data-Respan-Params
Base64-encoded JSON object of Respan parameters. Legacy X-Data-Keywordsai-Params is still accepted.
Request
This endpoint expects an object.
model
TTS model.
Allowed values:
input
Text to generate audio for. Max 4096 characters.
voice
Voice to use.
response_format
Audio output format.
speed
Audio speed (0.25 to 4.0).
customer_credentials
Per-customer LLM provider credentials.
disable_log
When true, omits input/output from the log. Metrics still recorded.
metadata
Custom key-value metadata.
customer_identifier
End user identifier.
thread_identifier
Conversation thread ID.
Response
Audio content in the requested format.
Errors
401
Unauthorized Error