OpenAI Compatibility

Stream synthesized speech

OpenAI-compatible text-to-speech. Use Authorization: Bearer <API_KEY> and a JSON body. The response is a raw audio byte stream forwarded progressively (no prediction polling); the negotiated content type is returned verbatim (audio/mpeg for mp3, audio/pcm;rate=…;channels=… for pcm). An omitted response_format defaults to mp3.

The accepted model/voice/format set is a curated per-environment catalog that a model joins only after passing contract qualification; deepgram/aura-2 is the launch model. An unsupported model, voice, or format, or a speed/instructions value for a model that does not support it, returns a 400 without dispatching a synthesis.

This endpoint is independently feature-gated during preview rollout. A disabled deployment returns an OpenAI-shaped 404 without dispatching.

post/v1/audio/speech

Request

  • Base URL: https://api.eachlabs.ai
  • URL: https://api.eachlabs.ai/v1/audio/speech
  • Auth: HTTP bearer

Request body

modelstring required

Must be in the environment's speech catalog. An unlisted model returns 400 without dispatching a synthesis.

inputstring required

Text to synthesize. Bounded by the model's per-character limit (counted in Unicode runes).

voicestring required

Model-specific, namespaced voice id. Must be allowlisted for the model.

response_formatstring

Audio format. Omitted defaults to mp3. Allowed values are per-model (e.g. mp3, pcm).

speednumber

Playback speed. Accepted only for models that declare support; otherwise 400.

instructionsstring

Steering instructions. Accepted only for models that declare support; otherwise 400.

stream_format'audio'

Only raw audio streaming is supported. sse is rejected with 400.

Example request

{
  "model": "deepgram/aura-2",
  "voice": "aura-2-thalia-en",
  "response_format": "mp3"
}

Response

Raw audio byte stream. Bytes are forwarded progressively as the provider synthesizes them; the content type is the negotiated format (audio/mpeg or audio/pcm;rate=…;channels=…).

Changes

No recorded changes to this operation across all 1 revision of this API.