Quickstart: run Codex CLI on it
Codex speaks OpenAI’s Responses API and nothing else, so the gateway serves that format directly rather than asking you to run a shim.
https://api.magmarouter.com/v1The environment
export OPENAI_BASE_URL=https://api.magmarouter.com/v1
export OPENAI_API_KEY=sk-mr-...
codex --model glm-5.3-xplodedThe base URL carries /v1 here, unlike the Anthropic one, because the Responses client appends only /responses.
What is translated
A Responses request is translated to a chat-completions body and the answer back to a Response object, over the same pipeline that bills every other route. Input items, instructions, function tools, tool results, structured output and streaming all map across. Streaming emits the real Responses event sequence, so the agent sees response.created, output items, text deltas and response.completed in order rather than raw chunks.
What is not
previous_response_id is refused with a clear error. Continuing a stored response means the gateway kept your conversation, and it keeps no prompts at all. Clients that set store: false, Codex included, send the full input each turn, so nothing is lost.
Hosted tools (web_search, file_search, computer_use) run inside OpenAI's own stack rather than in a model, so no model here can run them. Function tools you define yourself work normally.