What an OpenAI-compatible API is.

OpenAI-compatible means an endpoint speaks the same wire format as OpenAI’s chat completions API. Point any OpenAI client at it by changing the base URL, and your existing code works unchanged.

What compatibility covers

The shape of the request (model, messages, max_tokens, stream), the bearer-token auth, and the response and server-sent-event format. MagmaRouter serves https://api.magmarouter.com/v1/chat/completions and https://api.magmarouter.com/v1/models in this dialect.

What it does not cover

Not every OpenAI route Compatibility is about the chat completions surface. MagmaRouter does not serve /v1/responses, /v1/completions or /v1/embeddings. Tools that default to the Responses API (the Vercel AI SDK’s plain openai provider, n8n’s chat node) need to be told to use chat completions instead. The per-tool guides call this out.

Set it up

Set your client's base URL to https://api.magmarouter.com/v1 and its key to your MagmaRouter key. See the Python, TypeScript and curl guides.

Related