Claude Code pay-as-you-go on 59API: token costs worked out
The problem is not the subscription, it is the invisible meter
Most Claude Code users do not have a subscription problem. They have a visibility problem. A long agentic session reads files, rewrites functions and prints explanations, and every one of those steps moves tokens across three different meters: input, output and cache reads. When the only number you can see is a monthly invoice, it is hard to tell whether a change in spending came from a heavier prompt, a longer answer, or a cache that stopped working. That uncertainty is what pushes developers toward a fixed plan and then makes them wonder whether they are paying for idle capacity.
59API takes a different route. It is an independent third-party AI API relay with one account and one API key, one API host at https://api.59api.com, and access to Claude, GPT, Gemini, DeepSeek and other models. Billing is per request, based on real token usage. There is no monthly fee, and your prepaid balance never expires. The first step toward a predictable Claude Code bill is therefore not another subscription but a clearer unit of measurement: tokens in, tokens out, tokens read from cache.
This guide works through Claude Code costs on 59API token by token, using published per-1-million-token rates and the same worked examples we check our own numbers against. No estimates dressed up as invoices. Just the rates, the setup, and the places where the cost curve bends.
The Claude Code rates, per 1 million tokens
All 59API prices are quoted per 1 million tokens and billed in CNY, with USD figures shown at ¥7.2 = $1. Four Claude models cover most Claude Code work, and their rates differ enough that model choice is itself a budgeting decision:
- Claude Fable 5.1 (claude-fable-5-1): input $3.61 (¥26), output $18.06 (¥130), cache read $0.2222 (¥1.6)
- Claude Sonnet 5.5 (claude-sonnet-5-5): input $1.11 (¥8), output $5.56 (¥40), cache read $0.0972 (¥0.7)
- Claude Opus 5.5 (claude-opus-5-5): input $1.53 (¥11), output $7.22 (¥52), cache read $0.0694 (¥0.5)
- Claude Haiku 4.5 (claude-haiku-4-5-20251001): input $0.3472 (¥2.5), output $1.67 (¥12), cache read $0.0278 (¥0.2)
For reference only, the official list prices for these same models are $10 / $50 for Fable 5.1, $2 / $10 for Sonnet 5.5, $4 / $20 for Opus 5.5 and $1 / $5 for Haiku 4.5, in input / output terms. Treat those as a reference price, not as a channel you need to buy from.
Two patterns are worth internalising. First, output tokens cost several times more than input tokens on every model here, so a verbose assistant is the expensive part of the session. Second, cache reads are dramatically cheaper than fresh input, which means how a project is structured — repeated context versus fresh context — can matter more than which model you pick. Note that the Sonnet 5.5 and Sonnet 5 rates are identical on 59API, so switching between them does not change the bill.
Worked examples: what a session actually costs
Numbers become useful when they are attached to a workload. Here are three worked examples, all without cache, so only input and output tokens are counted.
Claude Sonnet 5.5, 3M input + 0.5M output tokens: $6.11 (¥44) on 59API. At the official list price of $11 (about ¥79.2), 59API is about 56% of list price.
Claude Opus 5.5, 2M input + 0.5M output tokens: $6.67 (¥48) on 59API. At the official list price of $18 (about ¥129.6), 59API is about 37% of list price.
Claude Haiku 4.5, 5M input + 1M output tokens: $3.4 (¥24.5) on 59API. At the official list price of $10 (about ¥72), 59API is about 34% of list price.
Read those three lines together and the shape of the decision appears. Haiku 4.5 handles a much larger volume of tokens than Opus 5.5 in this sample, yet costs roughly half as much, because its input rate is $0.3472 (¥2.5) against $1.53 (¥11). If your Claude Code workload is high-volume and repetitive, the cheaper model wins on arithmetic alone. If the workload is smaller but each turn demands deeper reasoning, Opus 5.5 at $1.53 (¥11) input and $7.22 (¥52) output puts a hard ceiling on what a session can cost. Because 59API charges by real token usage, you can start with one model, watch the meter, and change model without renegotiating a contract.
Connecting Claude Code in two settings
Setup is deliberately short. In Claude Code or Claude Desktop, set ANTHROPIC_BASE_URL=https://api.59api.com and ANTHROPIC_AUTH_TOKEN=YOUR_59API_KEY. That is the whole integration: one host, one key, and your existing client workflow stays intact.
There is one hard rule that saves a lot of debugging time. Claude models work only through the genuine Claude Code or Claude Desktop client, at version 2.1.285 or newer. They do not work through the OpenAI SDK, cURL or other clients. If you are coming from a script that talks to an OpenAI-compatible endpoint, that script cannot be pointed at Claude models — the protocol path simply is not there.
For everything else, 59API keeps its own conventions. Codex, OpenAI SDKs, cURL and OpenAI-compatible clients such as Cursor, Cherry Studio, Cline and OpenCode work with GPT, DeepSeek and other non-Claude, non-Gemini models, using base_url https://api.59api.com/v1 and chat endpoint https://api.59api.com/v1/chat/completions. Gemini CLI uses GOOGLE_GEMINI_BASE_URL=https://api.59api.com and GEMINI_API_KEY=YOUR_59API_KEY, because Gemini models use Google’s native protocol only and are not OpenAI-compatible.
The practical benefit of one key across all of that is budgeting, not convenience. You can route a Claude Code session, a GPT script and a Gemini CLI job through the same account, then read one balance against all three.
Prepaid balance, top-ups and what never expires
59API uses a prepaid balance model. You top up, then each request deducts based on the real token usage of that request. Top-ups come in six sizes: ¥10, ¥50, ¥100, ¥200, ¥500 and ¥1000, paid by WeChat Pay or bank card, and invoices are available. There is no monthly fee, and the balance never expires, so an unused ¥50 sitting in the account is not a subscription you forgot to cancel — it is working capital that stays there.
That structure changes how you think about a heavy Claude Code month. If your usage is spiky, a larger top-up covers the spikes without committing to a recurring charge. If your usage is flat and predictable, you can top up on the same rhythm you renew your own tooling. Either way, the number you can forecast is the token rate multiplied by the tokens you actually send.
Monthly and weekly cards are optional. A card has its own key, can only call that family’s models, and 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. Card quota and caps are card metering units written in $, not official list-price dollars, so they should not be converted into official prices. For a developer who wants pay-as-you-go semantics and no expiry, the prepaid balance is the default path; cards exist for users who prefer a defined window.
When a card makes more sense than pay-as-you-go
Pay-as-you-go on 59API is strongest when usage is irregular. A contractor shipping a feature in one week and touching nothing for three should pay for the week, not for a flat monthly commitment. That is exactly what the prepaid balance does: you top up ¥10, ¥50, ¥100, ¥200, ¥500 or ¥1000, and every request draws down only what it consumes.
Cards make sense when you want a bounded 30-day or 7-day window with a known cap. The C-PRO Starter edition (Claude, 30 days) is $83.19 (¥599), with quota $610 and a weekly cap of $230, draining at the card’s metering price × 2.4; its reference value at official list prices is about $169.44 (¥1220). The weekly C-PRO $290 card (Claude, 7 days) is $40.14 (¥289), with quota $290 and a weekly cap of $290, and a reference value at official list prices of about $80.56 (¥580).
Now the honest caveat: because a card drains at the card’s metering price × 2.4, and because quota units are metering units rather than official list-price dollars, a card is not simply pay-as-you-go with a discount attached. It is a different instrument with its own rules — own key, single model family, no fallback to wallet balance, no rollover. For steady daily Claude Code work, the balance and per-token rates are the transparent choice. For a fixed burst window with a hard ceiling, a card gives you a defined shape. Either way, 59API gives you the numbers first, so you can pick deliberately and start with a single top-up.
शुरू करने के लिए तैयार?
Claude, GPT और अन्य मॉडलों के लिए एक ही key, असली token उपयोग पर बिलिंग और कोई मासिक शुल्क नहीं। साइन अप करके अपनी API key बनाएं; हर मॉडल की दरें मूल्य पेज पर हैं।
मुफ़्त साइन अप मूल्य