Skip to navigation

Generate speech

Text-to-speech, music generation, and multi-speaker podcast TTS share this endpoint. Returns a hosted URL by default; pass response_format: "b64_json" for inline audio bytes.

Authentication

AuthorizationBearer

Pass your EmpirioLabs API key as a bearer token. The Anthropic-style x-api-key header is also accepted on every endpoint.

Request

This endpoint expects an object.
modelstringRequired

Text-to-speech model id, for example qwen-audio-3-0-tts.

inputstringOptional

Script / lyrics. Use [S1] / [S2] tags for multi-speaker models.

promptstringOptional

Music generation models use prompt instead of input.

voicestringOptional
Voice id available for the chosen model.
output_formatstringOptional

Audio file format, for example mp3 or wav.

durationintegerOptional

Music generation only; output length in seconds.

Response

Audio response (URL by default, or inline bytes).

datalist of objectsOptional