Guides
Codex setup
How to set up Codex with a controlled API key
Codex-style workflows need a key that works reliably without exposing unlimited spend.
Use a gateway base URL
Configure an OpenAI-compatible base URL and a scoped API key from the gateway.
Set limits before use
Create a dedicated key for Codex and apply model allowlists, budgets, and max output tokens.
- Keep Codex on approved models
- Set a small test budget
- Raise limits after logs look correct
Verify with logs
After sending a request, inspect usage logs to confirm model, token meters, billed amount, and request time.
FAQ
Should Codex use a shared team key?
No. Use a separate controlled key.
What is the first thing to check after setup?
Confirm the request appears in usage logs.