The speech endpoints implement the OpenAI wire protocol, so migrating an existing integration is a base URL and a key. The official OpenAI SDKs work unchanged; nothing else in your code has to move.

The two lines

Get a key from API keys — see Get your API key.

What maps to what

Don’t hardcode a model id. Speech tiers are opt-in per environment: a backend with no configured URL is hidden entirely, so an id that works in one deployment 404s in another. Read GET /v1/audio/models and pick from what it returns — that list is the contract.

Voices are not names

This is the one real difference in the request body. OpenAI ships a fixed set of voice names (alloy, nova, …). On EESI a voice is always a stored reference clip — built-in voices carry human names, and cloned voices are ev_-prefixed ids from your own library:
That invariant is the reason a long call keeps one voice: without reference audio the model samples a new voice on every generation and a conversation drifts between speakers. See Voices.

What you gain

These are extra fields on the same endpoint — ignored by models that don’t support them, so adding one never breaks a fallback path. Two response headers have no OpenAI equivalent:
  • X-Synthetic-Audio — every response declares itself AI-generated, which is an EU AI Act Article 50(2) obligation rather than a nicety.
  • X-EESI-Generation-Id — the history entry this audio became.
You also get voice cloning (/v1/voices), diarized transcripts, and a replayable history of every generation, none of which have an OpenAI counterpart.

What to check before you cut over

  • Formats. Each model advertises its own formats list. mp3 is universal; opus, aac, flac, wav and pcm depend on the model.
  • Billing. EESI meters prepaid credits, and requests fail with 402 at zero rather than invoicing later. See Billing.
  • Concurrency. Realtime sessions are capped per organization by plan, and a refused session returns cleanly rather than degrading a live one.
  • Rate limits. 429 means the plan’s request rate; retry with backoff.

Where the compute runs

The API sits in front of EESI’s own GPUs — see Where the compute runs.