Skip to main content
Codex CLI is OpenAI’s open-source local coding agent that runs in your terminal. You can connect it to Routeway by defining a custom provider in your config file and using your Routeway API key.
Requires a valid Routeway API key. Get yours from the dashboard.

Setup

1

Install Codex CLI

Follow the official installation instructions for your platform.
2

Configure Codex CLI to use Routeway

Open (or create) ~/.codex/config.toml and add a custom provider pointing to Routeway:
model_provider = "routeway"
model_reasoning_effort = "high"
model = "o4-mini"

[model_providers.routeway]
name = "routeway"
base_url = "https://api.routeway.ai/v1"
env_key = "ROUTEWAY_API_KEY"
o4-mini is one example starter model. You can use any model that supports tools — browse available options at routeway.ai/models.
3

Set your API key

Codex reads the API key from the environment variable named in env_key.
export ROUTEWAY_API_KEY="YOUR_ROUTEWAY_API_KEY"
Keep real API keys out of version control and shell history.
4

Start Codex

In your project directory, run:
codex
Your requests will be sent through Routeway using the provider defined in config.toml.

Reference

SettingValue
Config file~/.codex/config.toml
Base URLhttps://api.routeway.ai/v1
API key env varROUTEWAY_API_KEY
Example modelo4-mini

Example Prompts

Try these once you’re connected:
  • “Summarize this repository: structure, build system, and entry points.”
  • “Find where feature X is implemented and list the relevant files.”
  • “Run tests and fix the first failing test.”
  • “Refactor module Y and update all call sites.”