# Codex

URL: https://bridge.wekoya.tech/docs/codex
Updated: 2026-12-05

> Run OpenAI's Codex CLI on Bridge with Claude, GPT, Gemini or DeepSeek: one provider in ~/.codex/config.toml, your key, and wire_api set to responses. Paid from a naira balance.

OpenAI's Codex CLI runs on Bridge with Claude, GPT, Gemini, DeepSeek or any model with tool calling, paid from your naira balance. Codex only speaks OpenAI's Responses API, which Bridge answers at `POST /v1/responses`, so you add Bridge as a provider in Codex's config file and start it as usual.
1. Install Codex if you have not: `npm install -g @openai/codex`, or `brew install --cask codex`.
2. Add Bridge to Codex's own config file, `~/.codex/config.toml` (on Windows, `%USERPROFILE%\.codex\config.toml`). Codex ignores providers in a project's own `.codex/config.toml`, so it has to be this one.

```
# ~/.codex/config.toml
model = "claude-sonnet-5-5"
model_provider = "bridge"

[model_providers.bridge]
name = "Bridge by Wekoya"
base_url = "https://wekoya-api.wekoya.tech/v1"
env_key = "WEKOYA_API_KEY"
wire_api = "responses"
```
3. Put your key where the config says, then run Codex. Unlike Claude Code, Codex wants the address with `/v1` on the end.

```
export WEKOYA_API_KEY=wk_live_...
codex
```
Windows (PowerShell).

```
$env:WEKOYA_API_KEY = "wk_live_..."
codex
```

#### Choosing the model

- Set `model` in the file: `claude-sonnet-5-5` or `gpt-5.6-terra` for everyday work, `deepseek-v4.1-flash` to spend the least. For one run, `codex -m deepseek-v4.1-flash`.
- Any model with tool calling works: Codex edits files and runs commands through tools.

#### What works, and what does not

- Reading and editing files, running commands, pictures, thinking and streaming.
- Codex's built-in web search runs on OpenAI's servers and is not available through Bridge; Codex works without it.
- Codex cloud tasks need a ChatGPT sign-in; the CLI on your computer does not.
- `wire_api` must be `"responses"`: current Codex releases accept nothing else for a custom provider. More about the endpoint: [Responses API](https://bridge.wekoya.tech/docs/responses).

#### If something goes wrong

- Missing environment variable WEKOYA_API_KEY: set it in the same terminal before running `codex`, or use `setx` on Windows and open a new terminal.
- 404 or not found: check `base_url` ends in `/v1` and `wire_api = "responses"`.
- 401 or 402: the key is wrong, or the balance needs a top-up. See [every agent's errors](https://bridge.wekoya.tech/docs/coding-agents).
More: [Codex CLI with Bridge](https://bridge.wekoya.tech/guides/codex-cli), [the ways to pay for Codex in Nigeria](https://bridge.wekoya.tech/guides/codex-in-nigeria) and [Claude Code vs Codex](https://bridge.wekoya.tech/guides/claude-code-vs-codex).
