Documentation Index
Fetch the complete documentation index at: https://gateway.consus.io/llms.txt
Use this file to discover all available pages before exploring further.
Before you start
You need:- Codex CLI installed. v0.128.0 or newer. See the Codex docs if you don’t have it yet.
- A Consus API key. Get one from your Consus admin.
Step 1 (recommended): Set up an isolated Consus profile
If you use Codex for anything else (personal OpenAI account or another organization) we recommend setting up an isolated Consus Gateway profile. This keeps your Consus credentials and settings fully isolated. Add this alias to your shell profile (~/.zshrc or ~/.bashrc):
source ~/.zshrc (or source ~/.bashrc) to pick up the alias.
Create the profile directory (Codex requires it to exist before launch):
codex-gateway and ~/.codex-gateway/ throughout. If you skip this step, substitute codex and ~/.codex/.
Step 2: Configure your gateway settings
Export your Consus API key in your shell profile (~/.zshrc or ~/.bashrc):
<CONSUS_API_KEY> with your actual key, then source ~/.zshrc.
Create ~/.codex-gateway/config.toml with:
codex-gateway launches with gpt-5.1 by default. To use a different model: codex-gateway --profile gpt41 or codex-gateway --profile mini.
Step 3: Start your session
Step 4: Verify
The Codex header should showgpt-5.1 and your working directory. Send a simple message:
unexpected status errors instead, check the troubleshooting section below.
What gets served
Every request from Codex CLI — coding turns, reasoning, tool use — is served by GPT-5.1 on Azure Government with ITAR authorization. The compliance boundary is enforced at the gateway architecture level. For the full Responses API surface (multimodal input, streaming behavior, governance flags, tool-use shape), seePOST /v1/responses.
What each setting does
model
: The composite model ID Codex sends to the gateway. gpt-5.1:il5+itar resolves to GPT-5.1 on Azure Government with ITAR enforcement. Use /v1/models to list other available composite IDs.
model_provider
: Selects which [model_providers.X] block Codex uses. Must match the block name below.
model_reasoning_effort
: Default reasoning effort for gpt-5.1’s extended thinking. One of low, medium, high. medium is the recommended default — it handles typical coding turns (file edits, multi-step tool plans, integration writing) in a few seconds. Bump to high for genuinely hard problems (architecture exploration, tricky debugging); expect ~30–110s latency at high and occasional 504s on very long turns. Can be overridden per request.
base_url
: Routes Codex’s requests to the gateway. The Responses API lives at /v1/responses.
wire_api = "responses"
: Tells Codex to use OpenAI’s Responses API wire format
env_http_headers
: Reads CONSUS_API_KEY from your shell environment and sends it as the x-api-key header on every request. The gateway authenticates with x-api-key, not Authorization: Bearer, so the alternative env_key setting will not work.
Troubleshooting
unexpected status 404 Not Found, url: ...v1/responses — Your Codex version predates v0.128.0, or the gateway you’re hitting predates the /v1/responses endpoint. Confirm with codex --version.
unexpected status 401 — x-api-key is missing or wrong. Verify echo $CONSUS_API_KEY returns your key in the same shell session you launched codex-gateway from, and that the env_http_headers line in config.toml is present (not env_key).
unexpected status 400 ... not available on /v1/responses — You picked a non-GPT model in /model (e.g., Claude). The Responses endpoint is GPT-only. Use Claude Code for Claude models, or OpenCode for the multi-provider Chat API.
Model metadata for gpt-5.1:il5+itar not found. Defaulting to fallback metadata — Cosmetic. Codex’s local model registry doesn’t recognize Consus’s composite IDs and falls back to defaults. Safe to ignore.