Generate a Codex config from the Responses-compatible endpoint in QiuqiuToken's docs. The API key in the config is a placeholder; replace it with a key you create at QiuqiuToken.
Endpoints
Pay as you gohttps://api.qiuqiutoken.net/v1The token must be in the Codex group.Docs · verified 2026-11-09
Generate the config
Save to ~/.codex/config.toml; merge it in if the file already exists
model = "gpt-6-astra"
model_provider = "qiuqiutoken"
[model_providers.qiuqiutoken]
name = "QiuqiuToken"
base_url = "https://api.qiuqiutoken.net/v1"
env_key = "QIUQIUTOKEN_API_KEY"
wire_api = "responses"
Applies to the current terminal only, for a quick try
export QIUQIUTOKEN_API_KEY='YOUR_API_KEY'
codex
Applies to the current PowerShell window only, for a quick try
$env:QIUQIUTOKEN_API_KEY = 'YOUR_API_KEY'
codex
Models and prices
Model
Input
Output
Ratio
Claude Fable 5.2claude-fable-5-2Claude Code专用-Max号池Subscription pool
$1.44
$7.20
0.18×
GPT-6.1 Terragpt-6.1-terraCodeX专用-Pro号池-稳定Subscription pool
Claude Sonnet 4.6claude-sonnet-4-6Claude Code专用-KiroReverse-engineered
$0.315
$1.57
0.10×
Claude Sonnet 4.6claude-sonnet-4-6-thinkingClaude Code专用-KiroReverse-engineered
$0.315
$1.57
0.10×
Claude Opus 4.6claude-opus-4-6Claude Code专用-KiroReverse-engineered
$0.525
$2.62
0.10×
Claude Opus 4.6claude-opus-4-6-thinkingClaude Code专用-KiroReverse-engineered
$0.525
$2.62
0.10×
$ per 1M tokens. Each model uses the provider's cheapest group; the ratio uses the output price
How to check it works
Restart Codex and send a message. If it replies and the request shows up in QiuqiuToken's console, it is using this endpoint.
FAQ
Why is the key in an environment variable?
config.toml only holds the variable's name, so the key never goes into the config file and does not leak when you share or sync it. To keep it, add the export line to ~/.zshrc or ~/.bashrc.
How do I switch back to OpenAI?
Remove the model_provider line from config.toml, then restart Codex.
Does my key pass through this site?
No. The page only generates config text and never asks for your key; the key only goes into the terminal or environment variables on your own machine.