Integrations

Codex CLI

Point OpenAI's Codex CLI at Roteo and run GPT models from your wallet.

Codex CLI 0.121 and later speaks the Responses wire and ignores base-URL overrides, so it connects through a custom provider to Roteo's /v1/responses endpoint.

1. Install

Skip this if you already have Codex 0.121 or later (codex --version).

# npm
npm install -g @openai/codex

# macOS / Linux
curl -fsSL https://chatgpt.com/codex/install.sh | sh

# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"

# Homebrew
brew install --cask codex
bash · 11 lines

2. Sign out

If Codex is signed in with your own ChatGPT account, sign out so it uses your Roteo key. A stored sign-in keeps working, so without this step a correct config looks like it does nothing.

codex logout
bash · 1 lines

3. Configure

Add a provider to ~/.codex/config.toml. Codex writes its own settings into this file, so add to it rather than replacing it:

model = "gpt-5.6-sol"
model_provider = "roteo"

[model_providers.roteo]
name = "Roteo"
base_url = "https://api.roteo.ai/v1"
wire_api = "responses"
experimental_bearer_token = "sk_your_key"
toml · 8 lines

To keep the key out of the file, replace the experimental_bearer_token line with env_key = "OPENAI_API_KEY" and set that variable in the shell you launch Codex from. env_key is the stable option; experimental_bearer_token could change in a future Codex release.

4. Run

codex
bash · 1 lines

The session header should read provider: roteo. If it does not, Codex is still signed in elsewhere: go back to step 2.

Switch models

Use /model inside Codex, or change model in config.toml. Any gpt-* id from Models works, for example gpt-6-astra. Codex runs on GPT models; for Claude, use Claude Code.

A harmless startup warning. Codex may log that it could not refresh the model list, naming a missing models field. It expects its own model-list format, falls back to its built-in defaults and runs normally.
Codex CLI | Roteo