Skip to main content
The LLM Router includes OpenAI-compatible endpoints for bounded speech-to-text and streamed text-to-speech. Use the same each::labs API key and base URL as chat completions:
The audio API is in staged preview and is enabled per environment. A 404 response means that the capability is not enabled for your deployment yet. Contact us before depending on it in production.

Current compatibility

Realtime WebSocket transcription is not part of this preview. File transcription waits for the complete upload and returns one response. Speech generation streams raw audio bytes, not Server-Sent Events.

Transcribe an audio file

The transcription endpoint accepts one audio file as multipart/form-data. Files may be up to 25 MB and must be FLAC, MP3/MPEG/MPGA, MP4/M4A, OGG, WAV, or WebM.
The default response format is json. Use response_format=verbose_json to request language, duration, and segment metadata. Word or segment timestamps are available only with verbose_json:

Stream text-to-speech

The speech endpoint begins returning raw audio while synthesis is still in progress. Read the response body as a byte stream instead of waiting for a prediction or parsing JSON. The current preview profile supports:
If response_format is omitted, it defaults to mp3. The response Content-Type identifies the returned audio:
  • MP3: audio/mpeg
  • PCM: audio/pcm with its sample rate and channel parameters
The response also includes X-Execution-ID for support and billing correlation. When the provider supplies one, X-Generation-Id is included as well.

Validation and errors

Both endpoints use the OpenAI-compatible error envelope. Unsupported models, voices, formats, and fields return 400 before a provider request is sent. Common statuses include:
Supply API keys only as Authorization: Bearer .... Query-string API keys are rejected so credentials do not leak into URLs or access logs.
Last modified on July 27, 2026