Why Codex uses /v1
Unlike Claude Code, Codex expects an OpenAI-style base URL. Use the /v1 suffix so the CLI can call Responses and model endpoints correctly.
Codex CLI
Codex CLI reads custom model providers from config.toml. Aiduct exposes the Responses protocol at /v1/responses, so Codex can run through your Aiduct balance.
# ~/.codex/config.toml model = "gpt-4o-mini" model_provider = "aiduct" [model_providers.aiduct] name = "Aiduct" base_url = "https://api.aiduct.ai/v1" env_key = "AIDUCT_API_KEY" wire_api = "responses" # Shell export AIDUCT_API_KEY=sk-aiduct-... codex "summarize this repository"
CONFIG
config.toml
PROTOCOL
Responses
ENDPOINT
/v1/responses
Unlike Claude Code, Codex expects an OpenAI-style base URL. Use the /v1 suffix so the CLI can call Responses and model endpoints correctly.
Aiduct lets you meter Codex calls through an API balance. This is useful for occasional coding work, CI helpers, and agent experiments.
FAQ
Use https://api.aiduct.ai/v1.
Yes. Aiduct supports the OpenAI Responses-compatible route used by Codex CLI.
Yes. Aiduct serves every catalog chat model on the Responses path that Codex uses, translating tool calls and reasoning for models that do not speak it natively. Set model to the catalog id.