3 min read
Codex
Route Codex API-key traffic through Leash and keep each run inside a budget you choose.
On this page
Start a protected Codex run
Use Codex in API-key mode with OPENAI_API_KEY set privately. Leash configures the child's provider endpoint and attributes supported OpenAI Responses or Chat Completions traffic to the new session.
leash run --cap 5 -- codexKeep the integration installed
The installer backs up your Codex configuration before adding the Leash endpoint. Start the proxy before launching the agent. Restore the saved configuration if you stop using the integration.
leash init
leash install codex
leash start
# Restore the previous config:
leash uninstall codexUnderstand earlier sessions
Burn Report can read Codex session JSONL independently of live proxy metering. It handles incremental and cumulative usage records and reports unknown models instead of pricing them silently.
leash report --codex-dir /path/to/codex-logs --jsonSomething unclear?Help us improve this guide