Run Claude Opus 5.5 and GPT-6.2 Sol on One API Key: Pay-As-You-Go Setup for Claude Code and Codex CLI
As of November 22, 2026, you do not need two high-tier monthly subscriptions: point Claude Code at ANTHROPIC_BASE_URL=https://api.qcode.cc/api (model claude-opus-5-5) and configure Codex CLI (rust-v0.171.0, catalog default gpt-6.2-sol) in user-level ~/.codex/config.toml with base_url = "https://api.qcode.cc/openai" and wire_api = "responses" to share one cr_ API key and one per-token balance across both terminals.
Updated 2026-11-22
Prices change: on QCode, Claude, GPT and Chinese models are billed per token — live rates on /models.
- Billed per token — live rates on /models
- Pay by card (Visa / Mastercard), Apple Pay, Google Pay or crypto
- Self-service: top up and activate instantly
Four official numbers and endpoints to know first
Claude Opus 5.5 official API pricing (per 1M tokens)
Anthropic's official pricing table lists claude-opus-5-5 at $4 input, $20 output, and $0.20 cache read ($5 for 5m cache write, $8 for 1h cache write); claude-sonnet-5-5 lists at $2 input, $10 output, and $0.10 cache read, while flagship claude-fable-5-2 lists at $8 input, $40 output, and $0.20 cache read.
GPT-6.2 Sol official Standard pricing (per 1M tokens)
OpenAI's official pricing table lists gpt-6.2-sol at Standard rates of $2.00 input, $10.00 output, and $0.10 cached input ($2.50 for 30m cache write, $5.00 for 12h cache write); higher-tier gpt-6.2-astra lists at $8.00 input, $40.00 output, and $0.40 cached input.
Two protocol endpoints, neither with a /v1 suffix
Claude Code speaks Anthropic Messages at ANTHROPIC_BASE_URL=https://api.qcode.cc/api, while Codex CLI speaks Responses at base_url="https://api.qcode.cc/openai". Only OpenAI SDK and OpenAI-compatible modes such as Cline use /openai/v1.
Codex CLI 0.171.0 makes GPT-6.2 Sol the default
rust-v0.171.0 shipped on 2026-11-20, adding GPT-6.2 Sol and Astra to model catalogs with Sol as the default catalog selection. Custom model_provider and model_providers entries must go in user-level ~/.codex/config.toml because project-local .codex/config.toml ignores them.
Why split Claude Opus 5.5 and GPT-6.2 Sol across one per-token balance
Heavy terminal coding splits cleanly into two roles: running claude-opus-5-5 or claude-fable-5-2 in Claude Code for architecture planning, cross-file reviews, and long-horizon reasoning, while running gpt-6.2-sol in Codex CLI for rapid implementation and iterative edits. Developers in community threads report that paying for two consumer monthly plans locks in recurring costs yet still hits mid-week weekly cap walls or cross-border card rejections—for instance, Claude Max users report exhausting weekly limits in two days, and a ChatGPT Plus ($20) user reported Astra MAX consuming 43% of a weekly limit in 50 minutes.
Moving to one per-token API balance lets you reserve Opus 5.5 for complex design and route routine coding to gpt-6.2-sol, claude-sonnet-5-5, or DeepSeek-V4.1-Flash-1017 (DeepSeek official pricing: $0.15 input / $0.6 output off-peak, $0.3 input / $1.2 output peak) without carrying fixed monthly subscriptions.
Verified 2026-11-20 to 2026-11-22: Codex 0.171.0 Sol default and official rate tiers
As of 2026-11-22, three verified updates shape this dual-terminal setup.
- 1Codex CLI release: rust-v0.171.0 (2026-11-20) states verbatim: "Added GPT-6.2 Sol and Astra to model catalogs, with Sol as the default catalog selection." It also enables the TUI workspace by default and adds codex exec
--remote. - 2OpenAI pricing tiers: the official table lists
gpt-6.2-solBatch at $1.00 input and $5.00 output, Fast at 2x Standard ($4.00 / $20.00), and Ultrafast at 3x Standard ($6.00 / $30.00) through 2027-02-28 before moving to 6x Standard ($12.00 / $60.00) starting 2027-03-01; eligible 2-hour and 8-hour background requests are 30% and 40% below Standard. - 3Community benchmark context: on 2026-11-19 and 2026-11-20, community users compared running the same coding task at 43% of a weekly limit on Astra MAX versus 3% on Sol MAX, driving wider adoption of flagship-plan plus Sol-execution workflows.
Three dates behind the dual-CLI pay-as-you-go shift
From 2026-11-19 to 2026-11-20, community threads focused on weekly subscription limits running dry mid-week: a ChatGPT Plus ($20) user logged Astra MAX consuming 43% of a weekly limit in 50 minutes while Sol MAX used 3% on the same task, and Claude Max users reported burning through weekly limits in two days, prompting moves toward per-token API keys and local payment options.
OpenAI shipped Codex CLI rust-v0.171.0 on 2026-11-20, adding GPT-6.2 Sol and Astra to model catalogs with Sol as the default catalog selection and enabling the TUI workspace with document previews by default; custom providers can pin model = "gpt-6.2-sol" directly in ~/.codex/config.toml.
Verified as of 2026-11-22: Anthropic lists claude-opus-5-5 at $4 / $20; OpenAI lists gpt-6.2-sol Standard at $2.00 / $10.00; DeepSeek lists DeepSeek-V4.1-Flash-1017 off-peak at $0.15 / $0.6; QCode production endpoints (/api and /openai) and multi-currency checkout are live.
What is verified vs common setup and billing misconceptions
Verified (Anthropic, OpenAI, Codex CLI, and QCode documentation)
Verified as of 2026-11-22
- 1Anthropic official API rates (per 1M tokens):
claude-opus-5-5at $4 input, $20 output, $0.20 cache read ($5 5m write, $8 1h write);claude-sonnet-5-5at $2 input, $10 output, $0.10 cache read;claude-fable-5-2at $8 input, $40 output, $0.20 cache read. - 2OpenAI official Standard rates (per 1M tokens):
gpt-6.2-solat $2.00 input, $10.00 output, $0.10 cached input (Batch $1.00 / $5.00);gpt-6.2-astraat $8.00 input, $40.00 output, $0.40 cached input. - 3Claude Code gateway variables:
ANTHROPIC_BASE_URLsets the gateway base URL,ANTHROPIC_AUTH_TOKENsends Authorization: Bearer and takes immediate precedence over a saved claude.ai login, andANTHROPIC_API_KEYsends x-api-key; persist them in the env block of~/.claude/settings.json, inspect with /status, and clear old logins with /logout. - 4Codex CLI scope: user-level config lives in
~/.codex/config.toml, built-in provider IDs openai, ollama, and lmstudio are reserved and cannot be overridden, and project-local .codex/config.tomlignores model_provider and model_providers. - 5QCode endpoints and top-ups: Claude Code uses
https://api.qcode.cc/api, Codex CLI (wire_api = "responses") useshttps://api.qcode.cc/openai, and OpenAI-compatible clients usehttps://api.qcode.cc/openai/v1; USD balance starts from $5 (up to $2,000 per top-up) and CNY balance starts from ¥30, tracked separately. - 6Model catalog boundary: qcode.cc/models supports
claude-opus-5-5,claude-fable-5-2,claude-sonnet-5-5,gpt-6.2-sol,gpt-6.2-astra,deepseek-v4.1-flash,glm-5.3,kimi-k3.1-pro, andqwen3.8-max; qcode.cc/models does not supportgpt-6-lunaorgpt-5.6-luna.
Common misconceptions and unconfirmed claims
Avoid these five pitfalls when configuring and budgeting
- 1"Every base URL needs /v1 at the end" — Claude Code appends /v1/messages automatically to
ANTHROPIC_BASE_URL, and Codex CLI stops at /openai without /v1; only OpenAI SDK, Cline, Roo Code, and OpenCode in OpenAI-compatible mode usehttps://api.qcode.cc/openai/v1. - 2"Put API credentials in project config files to share with teammates" — Anthropic warns against storing credentials in project-level .claude/
settings.jsonbecause it is committed to Git (use .claude/settings.local.json for a single repo), and Codex ignores provider keys placed in project-local .codex/config.toml. - 3"Third-party per-token rates equal vendor list prices or a fixed percentage cut" — all dollar prices here are official Anthropic, OpenAI, and DeepSeek API list rates; live QCode per-model token rates are published on /models.
- 4"HTTP 401, 402, and low-credit errors mean the same thing" — on QCode Pay-as-you-go Packs, HTTP 402 means quota is exhausted while HTTP 401 means the pack expired or the auth header variable is wrong; on Anthropic Console, "Credit balance is too low" points to an empty prepaid balance or a stale
ANTHROPIC_API_KEYin the shell. - 5"Community weekly-limit ratios apply identically to every repo" — reports such as 43% on Astra MAX versus 3% on Sol MAX reflect specific sessions; actual token spend depends on context length, cache hit rate, and output volume.
Two monthly subscriptions vs one per-token API key
Option A: Two separate high-tier monthly subscriptions
Requires maintaining two recurring monthly bills and two login sessions, each constrained by 5-hour windows and weekly caps that community developers report exhausting within two or three days of heavy coding, alongside foreign-card checkout friction.
Option B: One cr_ API key on a shared per-token balance
Claude Code and Codex CLI draw from one shared balance with no fixed monthly lock-in; route complex architecture to claude-opus-5-5 or claude-fable-5-2 and routine edits to gpt-6.2-sol or claude-sonnet-5-5, funded via Alipay, WeChat Pay, international cards, SBP, or USDT.
Three steps to run Claude Code (Opus 5.5) and Codex CLI (GPT-6.2 Sol)
- 1Register and generate a key: create an account in the QCode dashboard, top up USD or CNY balance, purchase a Pay-as-you-go Pack (valid 7 days, concurrency cap 5, no monthly plan) or a Personal Plan, and copy one cr_ API key.
- 2Configure Claude Code: export
ANTHROPIC_BASE_URL="https://api.qcode.cc/api" (mainland China can usehttps://asia.qcode.cc/api; North America and Europe can usehttps://us.qcode.cc/api), exportANTHROPIC_AUTH_TOKEN="your_cr_key", and exportANTHROPIC_MODEL="claude-opus-5-5", or persist all three keys inside the env block of~/.claude/settings.json.Run /status inside Claude Code to verify Anthropic base URL and Auth token (run /logout first if a saved claude.ai login conflicts), or verify with a POST to "$ANTHROPIC_BASE_URL/v1/messages" carrying Authorization: Bearer and anthropic-version: 2023-06-01—a JSON reply starting with {"id":"msg_ confirms connectivity. - 3Configure Codex CLI (0.171.0): open user-level
~/.codex/config.toml, add top-level model = "gpt-6.2-sol" and model_provider = "qcode", then add [model_providers.qcode] with name = "qcode", base_url = "https://api.qcode.cc/openai" (orhttps://asia.qcode.cc/openai/https://us.qcode.cc/openai), wire_api = "responses", and env_key = "QCODE_API_KEY"; run exportQCODE_API_KEY="same_cr_key" to run both terminals side by side, and switch temporarily with codex--modelgpt-6.2-astraor /model.
One QCode key across both protocols with global payment options
QCode.cc is an independent API access service with no affiliation to Anthropic or OpenAI. One cr_ key reaches sellable flagship and workhorse models by protocol: Claude Code calls claude-opus-5-5, claude-fable-5-2, claude-sonnet-5-5, and claude-haiku-5-5 via https://api.qcode.cc/api; Codex CLI calls gpt-6.2-sol, gpt-6.2-astra, and gpt-6.1-sol via https://api.qcode.cc/openai (wire_api = "responses"); OpenAI-compatible clients such as Cline, Roo Code, and OpenCode call deepseek-v4.1-flash, deepseek-v4-pro, glm-5.3, kimi-k3.1-pro, and qwen3.8-max via https://api.qcode.cc/openai/v1.
Checkout accepts Visa / Mastercard, Apple Pay, Google Pay, Alipay, WeChat Pay, Russian local bank cards and SBP, CIS bank cards (Belarus, Kazakhstan, and more), and USDT across 18 networks including Tron TRC20, Solana, Arbitrum One, and Polygon (0% platform fee, manual on-chain verification, usually credited in minutes and up to 12 hours).
Usage is billed per token with live rates on /models; Pay-as-you-go Packs are non-refundable after purchase, and buying another pack after 7-day expiry restores and adds quota on the same API key, whereas an expired Personal Plan requires purchasing a new key. Not ready for a monthly plan? Pay-as-you-go Packs start at $4 for a one-time quota you use within 7 days; if you already have a Personal Plan, add a booster pack when you need more quota.
Common questions
Can one cr_ API key run Claude Code and Codex CLI at the same time?
Yes. Both tools share one cr_ API key and one balance as long as each points to its own protocol endpoint. Set ANTHROPIC_BASE_URL="https://api.qcode.cc/api" and model claude-opus-5-5 in Claude Code, and set base_url = "https://api.qcode.cc/openai", wire_api = "responses", and model = "gpt-6.2-sol" in user-level ~/.codex/config.toml; Pay-as-you-go Packs allow up to 5 concurrent requests, so running both terminals side by side will not kick either session out.
Does a Pay-as-you-go Pack auto-renew monthly, and what happens on exhaustion or expiry?
No monthly auto-renewal applies. A Pay-as-you-go Pack is a one-time quota billed per token over 7 days with no fixed monthly subscription; hitting zero returns HTTP 402 and passing the 7-day window returns HTTP 401. Buying another Pay-as-you-go Pack after expiry restores and adds quota to the exact same API key without editing your local Claude Code or Codex configs, whereas an expired Personal Plan cannot renew on the same key and requires a new key. Pay-as-you-go Packs are non-refundable after purchase.
Why does Claude Code use /api while Codex CLI uses /openai, with neither ending in /v1?
Because the two clients use different API protocols and path-joining rules, and adding /v1 breaks routing. Claude Code speaks Anthropic Messages and appends /v1/messages automatically to ANTHROPIC_BASE_URL, so stop at https://api.qcode.cc/api; Codex CLI speaks Responses (wire_api = "responses"), so stop base_url at https://api.qcode.cc/openai. Only OpenAI-compatible clients such as the OpenAI SDK, Cline, Roo Code, and OpenCode append /v1 at https://api.qcode.cc/openai/v1.
How can I top up without a US credit card, and what are the minimum top-up amounts?
Multiple global and local payment methods are supported without requiring a specific country's credit card. QCode's unified recharge page offers separate USD balances (starting at $5, up to $2,000 per top-up) and CNY balances (starting at ¥30); checkout supports Visa / Mastercard, Apple Pay, Google Pay, Alipay, WeChat Pay, Russian local bank cards and SBP, CIS bank cards, and USDT across 18 networks (0% platform fee, manual on-chain check, usually credited within minutes and up to 12 hours; because exchanges often enforce a minimum withdrawal around 2.5 USDT, sending $10 equivalent or more helps amortize network fees).
How do I troubleshoot HTTP 401 or Claude Code still billing an old claude.ai login?
Run /status inside Claude Code and inspect two lines on the Status tab: Anthropic base URL must display your gateway URL, and the credential line must name ANTHROPIC_AUTH_TOKEN or ANTHROPIC_API_KEY rather than a claude.ai Login method. ANTHROPIC_AUTH_TOKEN sends Authorization: Bearer and immediately overrides a saved login, while ANTHROPIC_API_KEY sends x-api-key and prompts once in interactive mode; run /logout to clear any conflicting saved login. If verification still returns 401, check for a swapped header variable, a trailing /v1 on the base URL, or a pack past its 7-day validity.
Using official list prices, how do multi-model routing and prompt caching reduce daily token spend?
Split architecture planning from routine code edits and keep prompt prefixes stable for cache hits. On 2026-11-22 official per-1M-token pricing tables, claude-opus-5-5 bills $4 input versus $0.20 cache read, and claude-sonnet-5-5 bills $2 input versus $0.10 cache read; gpt-6.2-sol Standard bills $2.00 input versus $0.10 cached input, compared with gpt-6.2-astra at $8.00 input and $0.40 cached input; high-volume mechanical edits can also route to DeepSeek-V4.1-Flash-1017 ($0.15 off-peak input, $0.003 cache hit officially). Reserving Opus 5.5 or Fable 5.2 for hard design reviews while using gpt-6.2-sol or mid-tier models for everyday edits cuts token burn; live QCode rates appear on /models.
Sources
Anthropic API pricing (platform.claude.com/docs/en/about-claude/pricing, checked 2026-11-22); Claude Code LLM gateway docs (code.claude.com/docs/en/llm-gateway-connect, checked 2026-11-22); OpenAI API pricing (developers.openai.com/api/docs/pricing, checked 2026-11-22); OpenAI Codex CLI rust-v0.171.0 release notes (github.com/openai/codex/releases/tag/rust-v0.171.0, 2026-11-20); Codex CLI config reference (developers.openai.com/codex/config-reference, checked 2026-11-22); DeepSeek Models & Pricing (api-docs.deepseek.com/quick_start/pricing/, checked 2026-11-22); QCode production /models, /recharge, and /pay-as-you-go (checked 2026-11-22); community developer discussions (2026-11-19 to 2026-11-21, cited as user context only).
One API key for Claude Opus 5.5 and GPT-6.2 Sol — skip dual monthly plans
No fixed monthly lock-in: create a QCode account for one cr_ API key, wire /api into Claude Code and /openai into Codex CLI in 60 seconds, and bill multiple models per token with live rates on /models.
Related reading
Pay-as-you-go Packs: no monthly plan, valid 7 days
Buy a one-time quota valid for 7 days or add a booster pack to a Personal Plan; per-model rates are on /models.
Codex CLI 0.171.0 default GPT-6.2 Sol: config.toml for a third-party base_url (2026-11)
Checked 2026-11-20: since 0.171.0 Sol is the catalog default, and a custom provider needs model, model_provider, base_url, wire_api = "responses" and env_key in the user-level config.toml.
GPT-6.2 Sol vs Claude Fable 5.2 for Coding Cost: What One Task Bills (2026-11)
Checked 2026-11-19: Sol's official list is $2.00 input, $10.00 output and $0.10 cached input, Fable 5.2's is $8 input, $40 output and $0.20 cache reads, a sample coding session bills $3.15 versus $12.30, with the batch discount and the 272K surcharge spelled out.
Crypto payment guide
Nine coins, 56 networks, zero platform fee for AI coding API credits.
Anthropic, OpenAI, and DeepSeek official API pricing, Codex CLI release notes, and configuration documentation were checked on 2026-11-22 and remain authoritative on each vendor's official site. QCode.cc is an independent API access service with no affiliation to and no endorsement from Anthropic, OpenAI, or DeepSeek. QCode model availability and live per-token rates follow qcode.cc/models.