Integration tutorial
Connect Codex
Point the built-in OpenAI provider at DiscountedTokens using the Responses API.
01
Buy or create a key
Use guest checkout or create an account key.
02
Set the base URL
https://discountedtokens.com/v1
03
Send a small test
Verify the route before moving production traffic.
~/.codex/config.toml
model = "gpt-5.6"
openai_base_url = "https://discountedtokens.com/v1"
Run and verify
export OPENAI_API_KEY="YOUR_DISCOUNTEDTOKENS_KEY"
codex
Troubleshooting
- Use the user-level config file. Codex ignores provider and base-URL settings in project-local config.
- Open /status and confirm the configured model and provider URL.
- Basic Responses text routing is certified here. Tool calls, background agents, and streaming must be tested for your Codex version before production use.
- If authentication fails, confirm OPENAI_API_KEY is visible in the shell that launches Codex.
Configuration source: official documentation. DiscountedTokens is an independent gateway and is not endorsed by the client vendor.