Skip to main content
Codex token compression Codex Token Compression works the same way as Claude Token Compression, applied to the OpenAI-compatible API format that Codex uses. Tool call outputs, file reads, shell commands, search results, are compressed before they reach the model. Fully lossless, no configuration. For Codex users on API billing, this means up to 30% lower costs. For subscription users, the same token budget covers more work per session.

Get Started

edgee launch codex
If the Edgee CLI isn’t installed yet:
curl -fsSL https://install.edgee.ai | bash

CLI guide

Install, authenticate, and launch Codex in under a minute.

Codex-specific: OpenAI wire format

Codex uses the OpenAI responses wire API. When routing through Edgee, the CLI automatically sets the correct provider config in ~/.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"
This is handled automatically by edgee launch codex. You never need to edit this file manually.
To configure Codex without the CLI, paste the config above into ~/.codex/config.toml and replace <YOUR_EDGEE_API_KEY> with your key from the Edgee Console. Enable Codex Token Compression on that key from the Edge Models section.