Skip to content

Your agents, priced by the token

Connect any agent with one command or one config file. Call any model on the price list from any client protocol. Have a subscription sitting idle? Share it during the hours you pick.

One command to connect

curl -fsSL https://sub2tok.com/install.sh | sh

On macOS or Linux, run it in a terminal; on Windows, run it in PowerShell. The script opens your browser to sign you in, creates a token and sets up Claude Code and Codex CLI.

POST /v1/messages
Demo
Input tokens
1,248
Cache reads
18,392
Output tokens
52
Request cost
$0.001339
Time to first token
182 ms
Status
Complete

This panel replays sample data. Live requests are metered the same way, and your recent calls show up in your console.

How it works

01

Connect in one command

Run one install command, or point your client's upstream URL at this site and paste in an API token issued here. Then call any model on the price list, with no protocol changes.

02

Routed by model

The gateway checks your token, balance and concurrency limit, then routes the request to an upstream that serves the model. Responses stream back as they're generated, and input, output and cache tokens are metered separately along the way.

03

Settled by the ledger

Each charge and its ledger entry commit in the same database transaction, so your balance can always be recomputed from the ledger.

Pricing

USD per million tokens

You pay the official price times the multiplier. For discounted models, the highlighted price on top is what you pay, and the struck-through price below is the official one.

Service status

  • Claude

    7 models

    Operational
  • Codex

    7 models

    No data
  • Antigravity

    1 model

    No data

Based on real calls per provider over the last 15 minutes. A provider isn't marked degraded or down with fewer than 3 failures. Failures on the caller's side (such as insufficient balance or cancelled requests) and sharers' calls on their own subscriptions don't count.

ModelServed byMultiplierInputOutputCache readCache write (5 min / 1 hour)
claude-fable-5Served byClaudeMultiplier-75% 0.25xInputYou pay $2.50 List price $10OutputYou pay $12.50 List price $50Cache readYou pay $0.25 List price $1Cache write (5 min / 1 hour)You pay $3.125 / $5 List price $12.50 / $20
claude-fable-5-1Served byClaudeMultiplier-75% 0.25xInputYou pay $2.50 List price $10OutputYou pay $12.50 List price $50Cache readYou pay $0.063 List price $0.25Cache write (5 min / 1 hour)You pay $3.125 / $5 List price $12.50 / $20
claude-haiku-5-5Served byClaudeMultiplier-80% 0.2xInputYou pay $0.02 List price $0.10OutputYou pay $0.10 List price $0.50Cache readYou pay $0.002 List price $0.01Cache write (5 min / 1 hour)You pay $0.025 / $0.04 List price $0.125 / $0.20
claude-opus-5Served byClaudeMultiplier-80% 0.2xInputYou pay $1 List price $5OutputYou pay $5 List price $25Cache readYou pay $0.10 List price $0.50Cache write (5 min / 1 hour)You pay $1.25 / $2 List price $6.25 / $10
claude-opus-5-5Served byClaudeMultiplier-80% 0.2xInputYou pay $0.80 List price $4OutputYou pay $4 List price $20Cache readYou pay $0.04 List price $0.20Cache write (5 min / 1 hour)You pay $1 / $1.60 List price $5 / $8
claude-sonnet-5Served byClaudeMultiplier-80% 0.2xInputYou pay $0.40 List price $2OutputYou pay $2 List price $10Cache readYou pay $0.04 List price $0.20Cache write (5 min / 1 hour)You pay $0.50 / $0.80 List price $2.50 / $4
claude-sonnet-5-5Served byClaudeMultiplier-80% 0.2xInputYou pay $0.40 List price $2OutputYou pay $2 List price $10Cache readYou pay $0.02 List price $0.10Cache write (5 min / 1 hour)You pay $0.50 / $0.80 List price $2.50 / $4
gemini-3.8-flashServed byAntigravityMultiplier-90% 0.1xInputYou pay $0.083 List price $0.825OutputYou pay $0.413 List price $4.125Cache readYou pay $0.008 List price $0.083Cache write (5 min / 1 hour)You pay $0.004 / $0.15 List price $0.042 / $1.50
gpt-5.6-lunaServed byCodexMultiplier-80% 0.2xInputYou pay $0.04 List price $0.20OutputYou pay $0.24 List price $1.20Cache readYou pay $0.004 List price $0.02Cache write (5 min / 1 hour)You pay $0.05 / $0.08 List price $0.25 / $0.40
gpt-5.6-solServed byCodexMultiplier-80% 0.2xInputYou pay $0.80 List price $4OutputYou pay $4 List price $20Cache readYou pay $0.08 List price $0.40Cache write (5 min / 1 hour)You pay $1 / $0.80 List price $5 / $4
gpt-5.6-terraServed byCodexMultiplier-80% 0.2xInputYou pay $0.40 List price $2OutputYou pay $2.40 List price $12Cache readYou pay $0.04 List price $0.20Cache write (5 min / 1 hour)You pay $0.50 / $0.80 List price $2.50 / $4
gpt-6-astraServed byCodexMultiplier-75% 0.25xInputYou pay $2.50 List price $10OutputYou pay $12.50 List price $50Cache readYou pay $0.25 List price $1Cache write (5 min / 1 hour)You pay $3.125 / $5 List price $12.50 / $20
gpt-6-lunaServed byCodexMultiplier-75% 0.25xInputYou pay $0.025 List price $0.10OutputYou pay $0.125 List price $0.50Cache readYou pay $0.003 List price $0.01Cache write (5 min / 1 hour)You pay $0.031 / $0.05 List price $0.125 / $0.20
gpt-6-solServed byCodexMultiplier-75% 0.25xInputYou pay $0.50 List price $2OutputYou pay $2.50 List price $10Cache readYou pay $0.05 List price $0.20Cache write (5 min / 1 hour)You pay $0.625 / $1 List price $2.50 / $4
gpt-6.1-solServed byCodexMultiplier-75% 0.25xInputYou pay $0.50 List price $2OutputYou pay $2.50 List price $10Cache readYou pay $0.025 List price $0.10Cache write (5 min / 1 hour)You pay $0.625 / $2.50 List price $2.50 / $10

“Served by” lists the providers with subscriptions here that can serve each model. A model can have more than one.

List prices follow the official pricing pages. Prices that aren't struck through are exactly what you're billed. You can deposit with Alipay or with USDT or USDC, and 1 USDT or 1 USDC equals $1. New accounts get a $1 signup bonus once they verify their email.

Setup guide

The one-line command at the top sets up Claude Code and Codex CLI. To set it up by hand or connect another client, first create a token on the API tokens page in your console, then follow the steps below. On Windows, ~ in a path means %USERPROFILE%. For OpenClaw, Hermes Agent and other clients, change the upstream URL as shown under Call the API directly; they can call any model on the price list too.

sk-your-token below is a placeholder. Sign up, create a token in your console and use it instead.

Claude Code

Save this as ~/.claude/sub2tok.settings.json and start Claude Code with claude --settings ~/.claude/sub2tok.settings.json. Only sessions started this way use sub2tok; your usual settings stay as they are. The three DEFAULT_*_MODEL variables can be set to any model on the price list.

~/.claude/sub2tok.settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.sub2tok.com",
    "ANTHROPIC_AUTH_TOKEN": "sk-your-token",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-5-5",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5-5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-5-5",
    "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1",
    "DISABLE_TELEMETRY": "1",
    "DISABLE_ERROR_REPORTING": "1"
  }
}

Codex CLI

Save this as ~/.codex/sub2tok.config.toml and start Codex CLI with codex --profile sub2tok; no need to edit config.toml. model can be set to any model on the price list.

~/.codex/sub2tok.config.toml
model_provider = "sub2tok"
model = "gpt-6.1-sol"

[model_providers.sub2tok]
name = "sub2tok"
base_url = "https://api.sub2tok.com/v1"
capabilities = { remote_compaction = "v2" }
experimental_bearer_token = "sk-your-token"

Call the API directly

For other clients or your own code, set the base URL to https://api.sub2tok.com for Anthropic Messages, or https://api.sub2tok.com/v1 for OpenAI Chat Completions and Responses, and send the token as Authorization: Bearer. Any model on the price list works on any of them.

Terminal · Chat Completions
export SUB2TOK_API_KEY="sk-your-token"

curl https://api.sub2tok.com/v1/chat/completions \
  -H "content-type: application/json" \
  -H "authorization: Bearer $SUB2TOK_API_KEY" \
  -d '{
    "model": "claude-opus-5-5",
    "messages": [{ "role": "user", "content": "Hi" }]
  }'

magpie

Install the sub2tok plugin and sign in with your token, then pick sub2tok models in magpie. The model list, prices and balance sync automatically; every charge is recorded in the ledger on the Balance page of your console.

Terminal
magpie plugin add @sub2tok/magpie
magpie plugin login sub2tok

Claude desktop app

The Claude desktop app doesn't read the config files above. Set it up once inside the app.

  1. From the menu bar, choose Help → Troubleshooting → Enable Developer Mode (on Windows, it's in the ☰ menu at the top left of the sign-in screen).
  2. Then choose Developer → Configure Third-Party Inference….
  3. Under Connection, set Inference provider to Gateway, Gateway base URL to https://api.sub2tok.com, and Gateway API key to sk-your-token. Leave Gateway auth scheme on Bearer.
  4. Click Apply Changes. The app restarts on sub2tok and lists the Claude models from the gateway.

Anthropic's guide (opens in a new tab)

Codex app

The Codex app ignores profiles and only reads config.toml. Install the sub2tok command with the one-line command at the top of the page, then run this. It backs up config.toml and adds the sub2tok settings at the top. To switch back to your original settings, run sub2tok codex-app off.

Terminal
sub2tok codex-app on