Audio speech create

Generates audio from text using a unified OpenAI-compatible interface, routed directly to the provider selected by model.

Streaming only. The response is always a Server-Sent Events stream; stream_format may be omitted or set to sse, and audio (a single buffered audio file) is rejected with 400.

Required fields (this endpoint):

FieldDescription
modelprovider/model (e.g. openai/gpt-4o-mini-tts, elevenlabs/eleven_multilingual_v2).
inputText to synthesize.
voiceProvider voice: an OpenAI voice name (e.g. alloy) or an ElevenLabs voice_id.

Provider endpoints

ProviderUpstream
OpenAICreate speech
ElevenLabsStream speech with timing
Response shape. By default every provider's stream is normalized to OpenAI speech.audio.delta / speech.audio.done events, so a client written against OpenAI works unchanged. Set raw_provider_response to true to receive the provider's own chunks instead — for ElevenLabs that is its native JSON stream, including the alignment data the OpenAI events cannot carry.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Request body requires model, input, and voice. Every other field is provider-dependent: which parameters a model accepts, their bounds, and their enums are defined per provider/model in Platform AI Model and validated before the provider is called. Consult the upstream documentation for their meaning:

string
required

Model in provider/model format. Only openai/* and elevenlabs/* models generate speech.

string
required

Text to synthesize. The maximum length is the resolved model's own character cap (e.g. 4096 for openai/gpt-4o-mini-tts, 40000 for elevenlabs/eleven_flash_v2_5).

string
required

Voice to speak with: an OpenAI voice name (e.g. alloy) or custom voice object, or an ElevenLabs voice_id.

string

Audio format, in the resolved provider's own values — OpenAI codec names (mp3, opus, aac, flac, wav, pcm) or ElevenLabs codec_samplerate_bitrate tokens (e.g. mp3_44100_128, pcm_16000). Omitted uses the provider's default.

string
enum

Only sse is supported: speech is always streamed. audio (a single buffered file) is rejected with 400.

Allowed:
boolean
Defaults to false

When true, relays the provider's own response chunks unmodified instead of normalizing them to speech.audio.* events. It is a platform control, never forwarded to the provider and never validated as a model parameter. OpenAI models already stream the OpenAI shape, so it only changes the response for other providers.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/event-stream
application/json