All models

Google

Gemini 3.1 Pro

google/gemini-3.1-proimages

Input

$2

per M · $4 past 200K context

Output

$12

per M · $18 past 200K context

Cache read

$0.2

per M tokens

Context

1,048K

tokens

Pricing

Input$2 / M tokens
Output$12 / M tokens
Cache read$0.2 / M tokens
Past 200K prompt tokens$4 in / $18 out per M
RoutingFree

Provider list price. BYOK requests bill on your own provider account; managed credits draw down at exactly these rates. No markup, no request fee. Every request is metered per engineer and joined to the work it shipped.

Run it

Claude Code

export ANTHROPIC_BASE_URL=https://api.tokenspend.dev
export ANTHROPIC_API_KEY=$TOKENSPEND_RAIL_KEY
export ANTHROPIC_MODEL=google/gemini-3.1-pro

curl

curl https://api.tokenspend.dev/v1/messages \
  -H "content-type: application/json" \
  -H "x-api-key: $TOKENSPEND_RAIL_KEY" \
  -d '{"model":"google/gemini-3.1-pro","max_tokens":256,"messages":[{"role":"user","content":"hello"}]}'

Python · OpenAI SDK

from openai import OpenAI

client = OpenAI(base_url="https://api.tokenspend.dev/v1", api_key=os.environ["TOKENSPEND_RAIL_KEY"])
resp = client.chat.completions.create(
    model="google/gemini-3.1-pro",
    messages=[{"role": "user", "content": "hello"}],
)

Both dialects reach every model: send Anthropic-shaped requests or OpenAI-shaped requests and the rail translates. Prompts and responses are never stored.