Skip to main content
Codex is OpenAI’s open-source CLI coding agent. Route your Codex traffic through Edgee to reduce token costs by up to 30% with lossless compression, and gain full observability over every coding session. The fastest way to connect Codex to Edgee is through the CLI, no config files to edit manually.
1

Install the Edgee CLI

curl -fsSL https://edgee.ai/install.sh | bash
2

Launch Codex through Edgee

edgee launch codex
The CLI authenticates, writes the Codex config, and starts Codex, all in one command. Token compression is enabled automatically.
After the session ends, the CLI prints a link to view token usage, compression savings, and cost breakdown in the Edgee Console.

Manual setup (advanced)

If you prefer to configure Codex without the CLI, update your Codex configuration file at ~/.codex/config.toml:
model_provider = "edgee"

[model_providers.edgee]
name = "EDGEE"
base_url = "https://api.edgee.ai/v1"
http_headers = { "x-edgee-api-key" = "<YOUR_EDGEE_API_KEY>" }
wire_api = "responses"
Replace <YOUR_EDGEE_API_KEY> with your actual Edgee API key from the Edgee Console. You’ll also need to enable Codex Token Compression on that key from the Edge Models section.

Usage

Once launched, use Codex normally, compression is transparent:
# Ask a question directly
codex "How do I implement a binary search tree in Python?"

# Run in full-auto mode
codex --approval-mode full-auto "Refactor this module to use async/await"

# Resume a previous session
edgee launch codex --resume

Benefits

Automatic Cost Reduction

If you are using API billing, you will see a significant reduction in your token costs by up to 30%.

More Work Per Session

Compression makes the effective context window stretch further, so Codex can tackle larger tasks before hitting limits.