All tools

Connect OpenAI Codex CLI

TerminalConfig file

OpenAI's CLI coding agent via Ahrigate's OpenAI-compatible endpoint

Connect OpenAI Codex CLI through api.ahrigate.com. Choose a model and a key assigned to its provider’s supply group.


Get your API key

Create an Ahrigate API key in the console and pick its supply group. The key is shown once at creation.

Get an API key

Connect it

Base URLhttps://api.ahrigate.com/v1
API Keyyour key (from Console)Get key →
Modelgpt-6.1-sol

Choose an OpenAI supply group. Codex uses the Responses API; save the provider configuration before starting it.

Connection settings

Terminal · Bash / Zsh
# Connect OpenAI Codex CLI → Ahrigate (macos)
# First merge the provider configuration from the other tab.
export AHRIGATE_API_KEY="sk-YOUR-AHRIGATE-KEY"
codex -m "gpt-6.1-sol"

Use a key from the model’s supply group. Merge configuration into existing settings, then send a short test message and confirm it in Console → Usage.

Ask your agent to help configure
Prompt · no real key included
Configure OpenAI Codex CLI to use the OpenAI Responses interface of the Ahrigate gateway.

Base URL:  https://api.ahrigate.com/v1
API Key:   sk-YOUR-AHRIGATE-KEY  (I'll paste my real key)
Model:     gpt-6.1-sol

First check the official guide for my installed version: https://learn.chatgpt.com/docs/config-file/config-advanced.
Preserve existing settings and merge only this provider. I will set the real key locally; do not commit it or include it in an agent prompt. If GUI steps are required, describe them instead of assuming configuration was completed automatically.
Choose an OpenAI supply group. Codex uses the Responses API; save the provider configuration before starting it.
Use a key assigned to a supply group for this model's platform. Send a short text request, then confirm usage in the Ahrigate console.
Official setup guide

Read docs

Other tools