How to use OpenAI Codex CLI with Unquant
Codex CLI talks to the OpenAI Responses API. Unquant serves a Responses-compatible endpoint, so Codex connects with a few lines of config and no proxy.
1 Set your key
Codex reads the key from an environment variable you name in the config:
export UNQUANT_API_KEY=your-unquant-key2 Add Unquant as a provider
Edit
~/.codex/config.toml:model = "glm-5.3-flash" model_provider = "unquant" [model_providers.unquant] name = "Unquant" base_url = "https://api.unquant.io/v1" env_key = "UNQUANT_API_KEY" wire_api = "responses"3 Run Codex
Run
codexin your project. To use Qwen instead, setmodel = "qwen-3.8-flash-next".
Reasoning effort
Codex's model_reasoning_effort setting is passed through as reasoning effort: low or high on both models.
Troubleshooting
401
Unauthorized
The variable named in env_key must be set in the shell that runs Codex.
404
Not found
Use https://api.unquant.io/v1 as base_url and wire_api = "responses".
429
Concurrent stream limit reached
Another request is still running on your account. Let it finish, then retry.
Keep reading
- How to use Claude Code with an uncensored, unlimited modelRun Claude Code on GLM-5.3-Flash or Qwen 3.8 Flash Next through Unquant's Anthropic-compatible endpoint: two environment variables, no proxy, unlimited tokens and 262K context.
- How to add Unquant to OpenCodeAdd Unquant to OpenCode as an OpenAI-compatible provider in opencode.json and run the terminal coding agent on GLM-5.3-Flash with 262K context and unlimited tokens.
- Uncensored AI for coding and agentsWhy developers use an uncensored model for coding and agents: no refusals on security work, reverse engineering or edgy content pipelines, plus 262K context and unlimited tokens for long agent loops.