post
https://api.macpaw.com/v1/audio/speech
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):
| Field | Description |
|---|---|
model | provider/model (e.g. openai/gpt-4o-mini-tts, elevenlabs/eleven_multilingual_v2). |
input | Text to synthesize. |
voice | Provider voice: an OpenAI voice name (e.g. alloy) or an ElevenLabs voice_id. |
Provider endpoints
| Provider | Upstream |
|---|---|
| OpenAI | Create speech |
| ElevenLabs | Stream 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
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
