Skip to main content
Codex CLI sends every model request to the Responses API, and Eden AI serves it at /v3/responses. The provider block below sets wire_api = "responses" and a base URL, and Codex does the rest.

Overview

Eden AI serves the Responses API route that Codex CLI sends every model request to, so Codex needs only a provider block and a key. Pointing it at Eden AI gives you:
  • 500+ models: switch between Codex variants, Claude, Gemini, and more without reinstalling
  • One API key: unified billing and monitoring across providers

Prerequisites

Setup

1. Configure ~/.codex/config.toml

Codex CLI reads its provider settings from ~/.codex/config.toml. Add an edenai provider and point Codex at it:

2. Export your API key

To make it permanent, add the export line to ~/.bashrc or ~/.zshrc and reload your shell.

3. Launch Codex

Codex now sends requests to Eden AI using the model you set in config.toml.

Model naming

Eden AI model IDs have the form provider/model, and Codex sends the value of model as it stands, so write the whole ID. Examples that suit Codex, which sends tool definitions with every request:
  • openai/gpt-5.3-codex, the default in the config above
  • anthropic/claude-sonnet-latest
  • openai/gpt-latest
Browse the catalog in List Models or with GET https://api.edenai.run/v3/models.

Switching models

Change the model field in ~/.codex/config.toml, or pass --model on the command line for one session:

Expert Models as Tools (MCP)

Eden AI also hosts an MCP server that exposes the expert model catalog (OCR, web search, speech, translation and more) as tools. Add it to ~/.codex/config.toml:
Codex reads EDEN_AI_API_KEY from the environment at connect time and sends it as an Authorization: Bearer header, which keeps the key out of a config file that may be committed. The CLI equivalent is:
See the MCP server page for the full tool catalog and the conventions its tools share.

Troubleshooting

Authentication errors

Verify the API key is loaded in your shell (the first command prints key is set when it is) and that it has LLM access. The check below calls the same /v3/responses route Codex uses:

Model not found

Codex sends the model value as written, so use the full provider/model string, as in the config above (for example openai/gpt-5.3-codex). A mistyped ID is the usual cause. Confirm the ID is in the catalog returned by GET /v3/models.

Connection issues

Confirm base_url is exactly https://api.edenai.run/v3. Codex appends /responses itself, because wire_api is responses. Check Eden AI status at app-edenai.instatus.com.

Next Steps

  • Claude Code: Anthropic’s official CLI on Eden AI
  • OpenCode: terminal coding agent with auto-generated config
  • Responses: full reference for the endpoint Codex sends every model request to