GPT-6.1 Sol in Codex CLI: one config, and what a session costs
31 October 2026 · prices as listed on the KoRouter marketplace on that date
Codex CLI isn't tied to OpenAI's own endpoint. It reads providers from ~/.codex/config.toml, and any provider that speaks the OpenAI Responses API works there. Point it at a gateway and you can run GPT-6.1 Sol below OpenAI's list price, on the same key and balance you use for Claude Code. This post covers the setup, the prices, and what one session costs on GPT-6.1 Sol and the other GPT models.
Prices below are USD per million tokens, with OpenAI's official price first.
Setup
Two files. The provider goes in ~/.codex/config.toml:
model = "gpt-6.1-sol"
model_provider = "korouter"
model_reasoning_effort = "high"
[model_providers.korouter]
name = "KoRouter"
base_url = "https://korouter.ai/v1"
wire_api = "responses"The key goes in ~/.codex/auth.json:
{ "OPENAI_API_KEY": "sk-your-key" }On Windows both files live in %USERPROFILE%\.codex\. Check that it works:
codex exec "Reply with OK"If something is off, it's usually one of three things:
- Requests never arrive. wire_api must be "responses". Codex talks to KoRouter through the Responses API.
- 401. The key belongs in auth.json, not in config.toml.
- 400 on reasoning. model_reasoning_effort is optional. Remove it if the model you picked rejects it.
To switch models, change model to any GPT ID from the table below. Nothing else changes.
The prices
GPT-6.1 Sol has two context tiers. Each request is billed in full at one tier, chosen by the size of its prompt:
| GPT-6.1 Sol | Input | Output | Cache read | Cache write |
|---|---|---|---|---|
| Prompt ≤ 272K | $2.00 → $0.74 | $10.00 → $3.70 | $0.10 → $0.037 | $2.50 → $0.925 |
| Prompt > 272K | $4.00 → $1.48 | $15.00 → $5.55 | $0.20 → $0.074 | $5.00 → $1.85 |
The other GPT models in the catalog, at the ≤ 272K tier:
| Model | Input | Output | Cache read | Cache write | vs official |
|---|---|---|---|---|---|
| gpt-6.1-sol | $2.00 → $0.74 | $10.00 → $3.70 | $0.10 → $0.037 | $2.50 → $0.925 | 63% |
| gpt-6-sol | $2.00 → $0.74 | $10.00 → $3.70 | $0.20 → $0.074 | $2.50 → $0.925 | 63% |
| gpt-5.6-terra | $2.00 → $0.74 | $12.00 → $4.44 | $0.20 → $0.074 | $2.50 → $0.925 | 63% |
| gpt-5.6-sol | $4.00 → $0.80 | $20.00 → $4.00 | $0.40 → $0.08 | $5.00 → $1.00 | 80% |
| gpt-6-astra | $10.00 → $3.70 | $50.00 → $18.50 | $1.00 → $0.37 | $12.50 → $4.63 | 63% |
Two things worth noticing:
- GPT-6.1 Sol's cache reads cost half of GPT-6 Sol's at the same input and output price. Agent sessions are mostly cache reads, so that half is where most of the difference shows up.
- The discount is one multiplier per model, applied to input, output, cache reads and cache writes alike, so the cache line is discounted as much as the headline price.
What a session costs
To make models comparable, we use the same reference session as our other posts: 5M cache-read tokens, 250K new input tokens, 100K output tokens and 350K cache-write tokens, with every prompt under 272K. That is the shape of a long agentic coding session, where each turn re-sends the conversation and most of it comes back from the cache. Your own sessions will differ, so put your numbers into the cost calculator.
| Model | Official | KoRouter |
|---|---|---|
| gpt-6.1-sol | $2.88 | $1.06 |
| gpt-6-sol | $3.38 | $1.25 |
| gpt-5.6-terra | $3.58 | $1.32 |
| gpt-5.6-sol | $6.75 | $1.35 |
| gpt-6-astra | $16.88 | $6.25 |
How the GPT-6.1 Sol line adds up through KoRouter:
| Part | Tokens | Price / 1M | Cost |
|---|---|---|---|
| Cache read | 5M | $0.037 | $0.185 |
| Input | 250K | $0.74 | $0.185 |
| Output | 100K | $3.70 | $0.370 |
| Cache write | 350K | $0.925 | $0.324 |
| Total | $1.06 |
Cache reads are 88% of the tokens and 17% of the bill. Output, at 2% of the tokens, is the largest single line.
If every request in the session crossed 272K, the higher tier would apply throughout: $1.94 through KoRouter, $5.25 at OpenAI's price. For scale, the same session on Claude Fable 5 is $10.97 through KoRouter.
What to expect
- GPT-6.1 Sol takes text, images and files as input, with a 922K-token input context. Prompts above 272K tokens are billed at the higher tier, so starting a fresh session between unrelated tasks keeps most turns at the lower price.
- The same key works in Claude Code, Cursor, Cline and the other tools in the integration guides. Every request draws on one balance, and you can give each tool its own key with its own spend limit.
- Availability history for every model is public on the status page. Check it before you move a workload.
Disclosure
I run KoRouter, the gateway in the config above. One key covers Claude, GPT, DeepSeek, GLM and Kimi; every model on the marketplace shows the vendor's official price next to ours, and one multiplier applies to all price components. Free to sign up, no monthly fee — pay as you go with credits. The config works with any gateway that serves GPT models over the Responses API; the prices are ours.