Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.requesty.ai/llms.txt

Use this file to discover all available pages before exploring further.

OpenAI Codex is OpenAIโ€™s AI coding agent that runs in your terminal. It can understand your codebase, propose changes, and execute tasks directly. Using the Requesty integration, you can:
  • Access 300+ models from OpenAI, Anthropic, Google, Mistral, and many other providers through one API key.
  • Track and manage your spend in a single location.
  • Apply fallback policies, load balancing, and latency routing to keep your agent responsive.

Prerequisites

Install Codex

npm install -g @openai/codex
Verify the installation:
codex --version
If codex is not found, add the npm global bin directory to your PATH:
export PATH="$HOME/.npm-global/bin:$PATH"
source ~/.zshrc

Configuration

1. Set the API key

Run codex for the first time. When prompted, choose โ€œUse your own API keyโ€ and paste your Requesty API key. Codex stores the key in ~/.codex/auth.json:
{
  "auth_mode": "apikey",
  "OPENAI_API_KEY": "rqsty-sk-..."
}
The Requesty provider config uses env_key = "OPENAI_API_KEY", which matches the key name that Codex stores in auth.json. No environment variables or shell wrappers needed.

2. Create the Codex config file

Create or edit ~/.codex/config.toml with the following content:
model = "openai-responses/gpt-5.5"
model_provider = "requesty"
model_reasoning_effort = "high"
model_supports_reasoning_summaries = false
web_search = "live"
personality = "pragmatic"

[model_providers.requesty]
name = "Requesty"
base_url = "https://router.requesty.ai/v1"
http_headers = { "X-Title" = "OpenAI Codex" }

[projects."/Users/YOUR_USERNAME"]
trust_level = "trusted"
Replace /Users/YOUR_USERNAME with the path to your project directory (e.g. /Users/jane on macOS or /home/jane on Linux). You can add multiple [projects.*] entries for different directories.

Model selection

Codex currently only supports models with the openai-responses/ prefix (e.g. openai-responses/gpt-5). Support for additional model prefixes is coming soon.
You can choose any model from the Model Library by changing the model field in config.toml. Standard model IDs follow the format provider/model-name:
  • openai-responses/gpt-5.5
Policies follow the format policy/policy-name:
  • policy/reliable-gpt-5
See Routing Policies for how to create a policy that automatically falls back between models.

Why this setup works

Config keyPurpose
model_provider = "requesty"Tells Codex to use the custom Requesty provider instead of the default OpenAI provider.
wire_api = "responses"Modern Codex uses the Responses API path for provider calls.
model_supports_reasoning_summaries = falseWithout this, Codex sends a reasoning summary field that Requesty rejects.

Verification

Run codex in your terminal and send a simple prompt. The expected output is a working response from the model. Then check the Requesty analytics dashboard to confirm the request was logged.

Troubleshooting

Check that ~/.codex/config.toml has model_supports_reasoning_summaries = false as a top-level key.
This warning can appear but is not the cause of a Requesty 400 error. It is safe to ignore.
If the gateway is an internal deployment, traffic may still be routing correctly even if it does not appear in the public dashboard. Use a unique traceable prompt to confirm requests are reaching Requesty.

Security

Do not commit your API key into shared docs or version-controlled files. Codex stores it locally in ~/.codex/auth.json.

References

Last modified on May 19, 2026