Skip to navigation

API reference corrections for speech-to-text and text-to-speech

Several API reference pages described behaviour the API doesn’t have. They now match it.

Speech to text

  • Pulse Pro accepts audio by URL: send {"url": "…"} with Content-Type: application/json, the same as Pulse.
  • Webhook mode (webhook_url) works with pulse as well as pulse-pro.
  • Pulse Pro caps audio at 250 MB, or 50 MB with webhook_url, whether uploaded or fetched from a URL. Larger audio returns 413.
  • On the realtime WebSocket, model is optional and defaults to pulse; an invalid value returns 400 during the handshake.

Text to speech

  • A voice used with the wrong model returns 400. If you omit model, it’s picked from the voice.
  • The Accept header isn’t needed; output_format sets the format.
  • On the streaming (SSE) endpoint, wav adds one header to the first chunk, mp3 streams MP3 frames, and ulaw/alaw stream 8-bit samples.

Authentication

  • POST /waves/v1/stt, the text-to-speech endpoints and the speech WebSockets accept short-lived access tokens. The shared note on API pages no longer says otherwise.

→ Speech to text quickstart · Text to speech quickstart · Token-based authentication


Electron errors use one envelope, streams end with an error event

Electron chat completion errors that used to return {"error": "<message>"} now return the OpenAI-style object {"error": {"message", "type", "param", "code", "request_id"}}. This covers rate-limit and concurrency 429s, 403, credits-exhausted 400, 500 and 503. The OpenAI SDKs handle both; code that reads error as a string needs updating.

What changed

  • 429 errors name the limit in error.type (requests or concurrency), set code to rate_limit_exceeded, and send a Retry-After header.
  • Running out of credits returns 400 with type and code insufficient_quota.
  • Plans with a requests-per-minute limit get x-ratelimit-limit-requests, x-ratelimit-remaining-requests and x-ratelimit-reset-requests headers.
  • A stream that fails after it started ends with a data: {"error": ...} event and [DONE], so the OpenAI SDKs raise an error and don’t return a cut-off reply.
  • When a client disconnects, generation stops. You’re billed for the prompt and the output generated so far, not for the rest of the reply.

→ Errors · Streaming