Claude Code pricing on 59API: FAQ, setup and token costs
Why Claude Code users keep asking the same first question
Most developers who ask about Claude Code are not asking for a different model. They are asking why the same session costs so much, and why the setup instructions they found online keep failing.
Here is the short version. 59API is an independent third-party AI API relay. One account and one API key give you one API host, https://api.59api.com, and access to Claude, GPT, Gemini, DeepSeek and other models. You top up a prepaid balance, and every request is charged by real token usage. There is no monthly fee, and the balance never expires.
That model matters when you run Claude Code every day. You are not buying a seat or a subscription. You are paying for the tokens your agent actually reads and writes, which keeps the cost of a task visible and controllable.
But one rule trips up a lot of developers, and it is the most important answer in this FAQ. Claude models on 59API work only inside the genuine Claude Code or Claude Desktop client, version 2.1.285 or newer. The routing is deliberate: each model family has one native protocol, and each client speaks only its own.
In the sections below you will find the exact environment variables, the current per-1-million-token rates for the Claude models, worked cost examples, and a clear comparison between paying per request from your balance and buying an optional Claude card.
How to connect Claude Code to 59API in two variables
Start with the client, not the key. Open the genuine Claude Code or Claude Desktop client, make sure you are on version 2.1.285 or newer, and set two environment variables:
ANTHROPIC_BASE_URL=https://api.59api.comANTHROPIC_AUTH_TOKEN=YOUR_59API_KEY
That is the whole Claude path. There is no separate Claude base URL, no extra path segment, and no OpenAI-style /v1/chat/completions endpoint involved. The key comes from your 59API account and the host is always https://api.59api.com.
Now the part that saves you an afternoon of debugging. Every model family on 59API has exactly one protocol, and mixing them is the usual cause of an empty response. Claude models are served over Anthropic native protocol, which means the genuine Claude Code or Claude Desktop client at 2.1.285 or newer is the only supported way to call them. OpenAI-compatible SDKs and clients connect through base_url https://api.59api.com/v1 and chat endpoint https://api.59api.com/v1/chat/completions, and those routes serve GPT, DeepSeek and other non-Claude, non-Gemini models only. Gemini models follow their own rule as well: they use Google native protocol through Gemini CLI with GOOGLE_GEMINI_BASE_URL=https://api.59api.com and GEMINI_API_KEY=YOUR_59API_KEY.
So the routing rule is simple: pick the client that speaks your model family, set its two variables, and you are running. One account, one key, one host, and a clear lane for every model.
Claude Code pricing: what each token actually costs
59API prices per 1 million tokens, with billing in CNY and USD shown at ¥7.2 = $1. For Claude models, the official list price is shown only as a reference price, not as a 59API rate. Here are four Claude models you can call through Claude Code, with input, output and cache read prices:
- Claude Fable 5.1 (model id claude-fable-5-1): input $3.61 (¥26), output $18.06 (¥130), cache read $0.2222 (¥1.6). Official list price $10 / $50.
- Claude Sonnet 5.5 (model id claude-sonnet-5-5): input $1.11 (¥8), output $5.56 (¥40), cache read $0.0972 (¥0.7). Official list price $2 / $10.
- Claude Opus 5.5 (model id claude-opus-5-5): input $1.53 (¥11), output $7.22 (¥52), cache read $0.0694 (¥0.5). Official list price $4 / $20.
- Claude Haiku 4.5 (model id claude-haiku-4-5-20251001): input $0.3472 (¥2.5), output $1.67 (¥12), cache read $0.0278 (¥0.2). Official list price $1 / $5.
Two details are worth internalising. First, output tokens cost several times more than input tokens on every Claude model above, so a chatty agent costs more than a token-heavy one. Second, cache read is priced far below input, which is why a session that reuses context can cost noticeably less than the raw token count suggests.
A card has its own key and can call only that family of models, so a Claude card is the natural companion to a Claude Code workflow. And because every request is metered by real token usage, you can watch the balance move while you work instead of discovering the cost at the end of the month.
Worked examples: what a real Claude Code session costs
Rates are easier to trust when you see them applied. The examples below use no cached tokens, and the official list prices are reference prices only.
Claude Sonnet 5.5, 3M input plus 0.5M output: $6.11 (¥44) on 59API, against an official list price of $11 (about ¥79.2), so 59API is about 56% of list price.
Claude Opus 5.5, 2M input plus 0.5M output: $6.67 (¥48) on 59API, against an official list price of $18 (about ¥129.6), so 59API is about 37% of list price.
Claude Haiku 4.5, 5M input plus 1M output: $3.4 (¥24.5) on 59API, against an official list price of $10 (about ¥72), so 59API is about 34% of list price.
Read those three lines as a planning tool rather than a promise. A long refactor that reads a repository, rewrites several files and explains its changes will land in the input-heavy column, while an agent that mostly writes short answers will lean on output. The practical move is to pick the model that matches the job: Haiku for quick questions, Sonnet for everyday coding work, Opus when you want the heavier reasoning tier, and Fable when you need the top-end Claude option.
Because 59API charges per request by real token usage, the number on the meter is the number your work produced. Nothing renews, nothing expires, and there is no monthly fee sitting on top of your usage.
Balance, cards, and the questions we hear most
Top-ups come in six sizes: ¥10, ¥50, ¥100, ¥200, ¥500 and ¥1000, paid by WeChat Pay or bank card, and invoices are available. Monthly and weekly cards are optional, and they behave differently from your wallet balance in ways that surprise people.
A card has its own key and can call only that family of models. It is paid only from the card: it never falls back to wallet balance, and a balance key never draws on a card. Unused quota does not roll over. Quota and caps are card metering units written in $, not official list-price dollars. For example, the C-PRO entry edition (Claude, 30 days) is $83.19 (¥599) with quota $1300 and a weekly cap of $500, and its reference value at official list prices is about $361.11 (¥2600). The weekly C-PRO $600 card (Claude, 7 days) is $40.14 (¥289) with quota $600 and a weekly cap of $600.
So: does the balance expire? No. Is there a monthly fee? No. Which client calls Claude models? The genuine Claude Code or Claude Desktop client at 2.1.285 or newer, and nothing else. Can you use one key for everything? Yes, for the models your client supports, through the single host https://api.59api.com.
Try 59API with a small top-up, point Claude Code at the two variables above, and watch your first real session on the meter.
¿Listo para empezar?
Una sola clave para Claude, GPT y más, con facturación por tokens reales y sin cuota mensual. Regístrate para crear tu clave API; las tarifas de cada modelo están en la página de precios.
Registro gratis Precios