Unquant

Opening your workspace…

Unquant

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.

Setup guide2 min readUpdated 1 October 2026
  1. 1

    Set your key

    Codex reads the key from an environment variable you name in the config:

    export UNQUANT_API_KEY=your-unquant-key
  2. 2

    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. 3

    Run Codex

    Run codex in your project. To use Qwen instead, set model = "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