Generate a ready-to-paste config in 5 seconds
Pick your client, OS, and model — then click below to sign up and auto-fill this exact snippet with a scoped Starter API Key.
# %USERPROFILE%\.codex\config.toml
# Recommended key cap: $2 (2,000 credits)
model = "gpt-6.2-sol"
model_provider = "modelseed"
[model_providers.modelseed]
name = "Modelseed"
base_url = "https://api.modelseed.dev/v1"
wire_api = "responses"
env_key = "MODELSEED_API_KEY"
requires_openai_auth = false
# PowerShell:
$env:MODELSEED_API_KEY = "sk-YOUR_MODELSEED_KEY"
codexInstall Codex CLI in 60 seconds (Node.js 22+ on Linux, macOS, Windows)
Codex CLI runs cleanly on local laptops as well as headless Linux VPS and SSH remote-control environments where browser OAuth login is inconvenient or blocked by region errors. Installing via npm and authenticating with a Modelseed API key eliminates browser OAuth handshakes entirely.
You only need Node.js 20/22+, a Modelseed API key (with $0.20–$1.00 starter credits included on verified signup), and an 8-line ~/.codex/config.toml pointing to https://api.modelseed.dev/v1.
- Verify Node.js 20+ (node -v). On Ubuntu/Debian Linux servers, install Node 22 LTS via NodeSource or nvm.
- Install Codex CLI globally: npm install -g @openai/codex.
- Write ~/.codex/config.toml with wire_api = "responses" and base_url = "https://api.modelseed.dev/v1".
- Export MODELSEED_API_KEY and launch codex inside any git repository.
# 1. Install Codex CLI globally
npm install -g @openai/codex
# 2. Write ~/.codex/config.toml
mkdir -p ~/.codex
cat > ~/.codex/config.toml <<'EOF'
model_provider = "modelseed"
model = "gpt-6.2-sol"
[model_providers.modelseed]
name = "Modelseed"
base_url = "https://api.modelseed.dev/v1"
env_key = "MODELSEED_API_KEY"
wire_api = "responses"
EOF
# 3. Export API key and run (works over SSH / tmux / remote Linux)
export MODELSEED_API_KEY="sk-your-modelseed-key"
codex "Audit package.json scripts and add a fast typecheck target"Headless Linux, SSH & Remote-Control Codex tips
When running Codex CLI on remote Linux build boxes, CI runners, or over SSH/tmux, browser-based login flows often fail or expire. API-key authentication via env_key = "MODELSEED_API_KEY" works deterministically in headless terminals.
- Run inside tmux or screen so long multi-file refactors survive SSH disconnects.
- Use codex exec "..." for non-interactive headless tasks and CI pipelines.
- Bind a per-machine API key with a $5 safety cap in Modelseed Console so remote servers never hold an uncapped master key.
Windows PowerShell one-liner & GPT-6.2 catalog rates
On Windows, set MODELSEED_API_KEY persistently with setx or in your PowerShell $PROFILE, and write %USERPROFILE%\.codex\config.toml with UTF-8 encoding.
| Model ID | Input ≤272K | Output ≤272K | Cache Read | Best For |
|---|---|---|---|---|
| gpt-6.1-terra | $0.0321 | $0.1604 | $0.0015 | Ultra-cheap lint/test loops |
| gpt-6.2-sol | $0.0642 | $0.3208 | $0.0032 | Daily interactive coding (default) |
| gpt-6.2-astra | $0.2567 | $1.2833 | $0.0128 | Complex architecture & debugging |
Frequently asked questions
Does Codex CLI on Linux require a browser login when using Modelseed?
No. Setting env_key = "MODELSEED_API_KEY" in ~/.codex/config.toml authenticates directly via Bearer token with zero browser redirects, ideal for SSH and Docker containers.
How do I fix 403 unsupported_country_region_territory in Codex CLI?
Switch model_provider in ~/.codex/config.toml to modelseed (https://api.modelseed.dev/v1). Requests route through Modelseed with standard Responses API compatibility and no region billing blocks.
How much does a typical Codex CLI coding day cost on gpt-6.2-sol?
With prompt caching active ($0.0032/1M cache reads), heavy interactive sessions of 1,500+ requests routinely consume only a few dollars of credit.
Can I switch between gpt-6.2-sol and gpt-6.2-astra on the fly?
Yes. Pass --model gpt-6.2-astra on any single Codex CLI command or update model = "..." in ~/.codex/config.toml.