Skip to content
Integration · OpenAI's open-source coding agent

Use g0i in Codex CLI

OpenAI's flagship terminal coding agent. Uses the new Responses API with WebSocket streaming for low-latency tool calls.

Why pair Codex CLI with g0i

  • Native /v1/responses bridge with WebSocket support — most gateways don't do this
  • Native Codex model picker — every GPT model (GPT-5.5 and newer) shows up in /model with Codex's own prompts
  • Cross-provider failover means a single dead upstream doesn't stall your session
  • Pay-as-you-go pricing — no $20/mo Codex subscription required
One-command setup

Set up Codex CLI automatically

Paste one command, paste your API key, pick Codex CLI — the script installs it if it's missing and writes the config for you. No files to edit; your old config is backed up.

Open a terminal and paste:

curl -fsSL https://g0i.ai/install.sh.txt | bash
  1. 1. Paste the command
  2. 2. Paste your key from API keys
  3. 3. Choose your tool and model

Re-run it any time to switch key or model. Prefer doing it by hand? The manual steps are below.

Manual setup

Add g0i as a provider in ~/.codex/config.toml (below). The model_catalog_url line is what makes g0i's models appear in the Codex / Codex Desktop model picker — current Codex versions only load a remote catalog when it is set. Or run the one-command setup, which writes this for you.

Base URL
https://api.g0i.ai/v1
API key
sk-... (from g0i.ai/api-keys)
Default model
gpt-5.6-sol
# ~/.codex/config.toml
model_provider = "g0i"
model = "gpt-5.6-sol"

[model_providers.g0i]
name = "G0I"
base_url = "https://api.g0i.ai/v1"
env_key = "G0I_API_KEY"
wire_api = "responses"
model_catalog_url = "https://api.g0i.ai/v1/models"

# then, in your shell:
export G0I_API_KEY=sk-...your-key...
codex
Don't have a key yet? Sign up at g0i.ai/register — redeem a voucher or buy a plan to start.

Recommended models

Any of these can be used in Codex CLI. Pick by task — see the full catalog at Models & Pricing.

GPT-5.6 Sol
Recommended for Codex — tested end-to-end, incl. auto-review (--approve-for-me)
gpt-5.6-sol
GPT-6.1 Sol
Newer GPT-6.1 tier, same price
gpt-6.1-sol
GPT-6 Astra
Maximum quality for the hardest tasks
gpt-6-astra

Troubleshooting

g0i models don't show in the model picker (only OpenAI's built-ins)
Add model_catalog_url = "https://api.g0i.ai/v1/models" to the [model_providers.g0i] block and restart Codex / Codex Desktop. Without it, current Codex versions never fetch the provider's catalog. The picker lists the GPT tier (GPT-5.5 and newer).
Codex says my key is missing even though api_key is in config.toml
Codex ignores api_key inside a [model_providers] block. Use env_key = "G0I_API_KEY" and export that variable, or experimental_bearer_token = "sk-..." as the one-command setup does.
Got 405 Method Not Allowed
Resolved — g0i now natively supports both wss:// and POST on /v1/responses. If you still see this, force-update codex (npm i -g @openai/codex@latest).
Long reasoning calls hang
Use stream:true (Codex default). The g0i edge keeps WebSocket connections alive for the full reasoning duration.
Want to use Claude in Codex
Codex is hardcoded to OpenAI Responses API — Claude needs claude-code or cline instead.

Ready to ship in Codex CLI?

Choose a subscription, add pay-as-you-go credits, or redeem a community voucher.