59API FAQ: Claude Code pricing and setup answers
What does 59API actually give you?
Wiring a Claude model into your editor usually means juggling providers, hosts and billing rules. 59API removes that friction with one account, one API key and one API host: https://api.59api.com. It is an independent third-party AI API relay, not an official Anthropic channel, and it routes requests for Claude, GPT, Gemini, DeepSeek and other models through the same account.
For Claude Code specifically, the practical answer is short. You set two environment variables, send traffic to the 59API host and pay for the tokens you actually use. There is no monthly fee, and your prepaid balance never expires. Billing is per request based on real token usage, so a quiet week does not produce a quiet invoice, and a busy week does not charge you for time you did not spend coding.
Every request is metered on real token usage, so the same key serves a quick test and a long refactoring session without a separate plan or a second billing relationship to manage.
Money is billed in CNY, with USD figures shown at ¥7.2 = $1. Top-ups come in six amounts: ¥10, ¥50, ¥100, ¥200, ¥500 and ¥1000, paid by WeChat Pay or bank card, and invoices are available. Monthly and weekly cards are optional, so you can start small, measure your real usage, and only then decide whether a card fits your workflow better.
How do I connect Claude Code to 59API?
Setting up Claude Code through 59API takes two environment variables and one honest client check. In Claude Code or Claude Desktop, set ANTHROPIC_BASE_URL=https://api.59api.com and ANTHROPIC_AUTH_TOKEN=YOUR_59API_KEY, replacing the placeholder with the key from your 59API account.
There is a version floor that catches people out: Claude models work only through the genuine Claude Code or Claude Desktop client, and that client must be Claude Code 2.1.285 or newer. Older builds and look-alike tools are not a supported path. If a request fails while your key and host are correct, check the client version first.
Those two variables are the whole integration. There is no SDK package to install, no separate Claude account to fund and no second billing relationship to manage. The same key also reaches the rest of the catalogue served by 59API, including GPT, Gemini and DeepSeek models, although each model family has its own client requirements.
Before you wire anything up, decide how you want to pay. Pay-as-you-go uses your prepaid wallet balance, is charged per request by real token usage and carries no monthly fee. Cards are a separate option with their own key and their own metering rules. A wallet key never draws on a card, and a card key never falls back to wallet balance, so the two paths stay clean and predictable. That separation matters when you are testing: a misconfigured client should not quietly consume a card's weekly allowance.
Which clients work with Claude models?
A common FAQ is whether one 59API key can drive every editor and SDK you use. The answer is no, and knowing the boundary saves hours of debugging.
Claude models work only through the genuine Claude Code or Claude Desktop client, with Claude Code 2.1.285 or newer. They do not work through the OpenAI SDK, cURL or other clients, and 59API does not present Claude models as OpenAI-compatible.
GPT, DeepSeek and other non-Claude, non-Gemini models are the flexible half of the catalogue. They work with Codex, OpenAI SDKs, cURL and OpenAI-compatible clients such as Cursor, Cherry Studio, Cline and OpenCode. For those, use base_url https://api.59api.com/v1 and the chat endpoint https://api.59api.com/v1/chat/completions.
Gemini has its own lane again. Gemini models use Google's native protocol only, through Gemini CLI, configured with GOOGLE_GEMINI_BASE_URL=https://api.59api.com and GEMINI_API_KEY=YOUR_59API_KEY. They are not OpenAI-compatible and do not work on /v1/chat/completions.
So the routing rule in one line: Claude to Claude Code or Claude Desktop, Gemini to Gemini CLI, and everything else to the OpenAI-compatible path. One account and one API key cover all three, but the client you open decides which model family you can actually call.
What does Claude Code cost per 1 million tokens?
Here is the pricing that matters when you run Claude Code through 59API. All rates are per 1 million tokens, billed in CNY, with USD shown at ¥7.2 = $1.
Claude Sonnet 5.5 (model id claude-sonnet-5-5) is $1.11 (¥8) for input, $5.56 (¥40) for output and $0.0972 (¥0.7) for cache read. Claude Opus 5.5 (model id claude-opus-5-5) is $1.53 (¥11) input, $7.22 (¥52) output and $0.0694 (¥0.5) cache read. Claude Haiku 4.5 (model id claude-haiku-4-5-20251001) is $0.3472 (¥2.5) input, $1.67 (¥12) output and $0.0278 (¥0.2) cache read.
A worked example makes the numbers concrete. Claude Sonnet 5.5 with 3M input and 0.5M output tokens without cache costs $6.11 (¥44) on 59API. At the official list price of $11 (about ¥79.2), that is about 56% of list price.
Claude Opus 5.5 with 2M input and 0.5M output tokens without cache costs $6.67 (¥48) on 59API, against an official list price of $18 (about ¥129.6) — about 37% of list price.
Claude Haiku 4.5 with 5M input and 1M output tokens without cache costs $3.4 (¥24.5) on 59API, versus an official list price of $10 (about ¥72) — about 34% of list price. Official list price is a reference point only: 59API is an independent relay, and your actual charge is the token usage on your requests.
Should you use prepaid balance or a Claude card?
This is the question most developers ask after the first week of real usage, and the answer depends on how steadily you run Claude Code, because cards meter differently from wallet balance.
Cards are optional and come with their own key. That key can call only that family's models, is paid only from the card, and never falls back to wallet balance. A balance key never draws on a card either. Unused quota does not roll over. Quota and caps are card metering units written in $, not official list-price dollars, so they should not be read as official prices.
For Claude, the weekly C-PRO $290 card (7 days) is $40.14 (¥289), with quota $290 and weekly cap $290, draining at the card's metering price × 2.4. Its reference value at official list prices is about $80.56 (¥580). The 30-day C-PRO standard card is $152.64 (¥1099), with quota $1100 and weekly cap $410, and a reference value of about $305.56 (¥2200).
A practical rule: if your usage is spiky or you are still learning your token habits, prepaid balance is the lower-risk starting point, because unused balance never expires and you are billed only for real usage. If you know you will run Claude every day for a month and you want a fixed, prepaid allowance, a card gives you that structure.
One more detail worth knowing: unused balance can be refunded within 7 days of the top-up, minus what was used and payment-channel fees, through the Contact page, with requests handled within 3 business days.
शुरू करने के लिए तैयार?
Claude, GPT और अन्य मॉडलों के लिए एक ही key, असली token उपयोग पर बिलिंग और कोई मासिक शुल्क नहीं। साइन अप करके अपनी API key बनाएं; हर मॉडल की दरें मूल्य पेज पर हैं।
मुफ़्त साइन अप मूल्य