All models

OpenAI

GPT-5.2

images

Model id

openai/gpt-5.2
Input
$1.75
per M tokens
Output
$14
per M tokens
Cache read
$0.175
per M tokens
Context
400K
tokens

Provider list price

Pricing

Input$1.75 / M tokens
Output$14 / M tokens
Cache read$0.175 / M tokens
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.

First request

Run it

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="openai/gpt-5.2",
    messages=[{"role": "user", "content": "hello"}],
)

JavaScript · OpenAI SDK

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.tokenspend.dev/v1", apiKey: process.env.TOKENSPEND_RAIL_KEY });
const resp = await client.chat.completions.create({
  model: "openai/gpt-5.2",
  messages: [{ role: "user", content: "hello" }]
});

curl

curl https://api.tokenspend.dev/v1/chat/completions \
  -H "content-type: application/json" \
  -H "Authorization: Bearer $TOKENSPEND_RAIL_KEY" \
  -d '{"model":"openai/gpt-5.2","messages":[{"role":"user","content":"hello"}]}'

Claude Code integration

export ANTHROPIC_BASE_URL=https://api.tokenspend.dev
export ANTHROPIC_API_KEY=$TOKENSPEND_RAIL_KEY
export ANTHROPIC_MODEL=openai/gpt-5.2

One request shape reaches every model. Claude Code connects as an integration with two environment variables and keeps every feature. Request history included; zero data retention is one click away.