59API

← सभी गाइड पर लौटें

59API FAQ: Claude Code API relay setup and token rates

Claude Code · EN · 2026-11-18

The question almost every developer asks first

Most developers arrive at the same place: how do I point Claude Code at a different endpoint without breaking the client? Claude Code expects a base URL and a token, and once those two values are correct the rest of your workflow stays exactly as it was. That is the core promise of 59API: one account, one API key and one API host, https://api.59api.com, serving Claude, GPT, Gemini, DeepSeek and other models. You are not switching tools. You are switching the endpoint that Claude Code talks to.

There is a second reason to look at an API relay: predictable cost visibility. 59API is an independent third-party relay, and it bills per request against a prepaid balance based on real token usage. There is no monthly fee, and your balance never expires. You top up once and spend it down as you work, which makes it easy to keep a tight ceiling on what a coding session can cost.

The catch is that a relay only helps if you use it the right way. Claude models on 59API work only inside the genuine Claude Code or Claude Desktop client, version 2.1.285 or newer. They do not work through the OpenAI SDK, cURL or other clients. That restriction is not a weakness of the relay; it is simply how the Claude models are reached. The rest of this FAQ covers the exact settings, the model rates and the billing behaviour.

The two environment variables that matter

Here is the complete configuration. In Claude Code or Claude Desktop, set ANTHROPIC_BASE_URL=https://api.59api.com and ANTHROPIC_AUTH_TOKEN=YOUR_59API_KEY, where YOUR_59API_KEY is the key generated for your 59API account. There is nothing else to wire up: no second endpoint, no separate account per model family, no monthly subscription.

Two details cause most of the confusion. First, the client must be the genuine Claude Code or Claude Desktop application, version 2.1.285 or newer. Claude models are not exposed through the OpenAI-compatible path, so pointing Codex, the OpenAI SDKs, cURL, Cursor, Cherry Studio, Cline or OpenCode at a Claude model will not work. Those clients pair 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 is separate again: Gemini CLI uses GOOGLE_GEMINI_BASE_URL=https://api.59api.com and GEMINI_API_KEY=YOUR_59API_KEY, because Gemini models speak Google’s native protocol and do not work on /v1/chat/completions.

Second, the model id is part of the request. Use the exact ids listed below, including the dated suffix on Claude Haiku 4.5. A near-miss id is the most common reason a request fails after a correct base URL and key.

Claude rates on 59API, per 1 million tokens

Every Claude model is billed on three numbers: input, output and cache read, all per 1 million tokens. Billing is in CNY, with USD shown at ¥7.2 = $1. Here is a short selection of the current Claude rates:

Two things are worth noticing. Output tokens cost several times more than input tokens on every model above, so the shape of your prompts matters more than the number of requests you send. And cache reads are priced far below fresh input, which is why reusing a stable project context is a practical saving rather than a stylistic preference.

These are 59API rates, not list prices. For reference, the official list price for Claude Sonnet 5.5 is $2 / $10, for Claude Opus 5.5 it is $4 / $20, for Claude Haiku 4.5 it is $1 / $5, and for Claude Fable 5 it is $10 / $50. 59API is an independent relay and is not an official channel for any provider.

What a session actually costs

Rates per token are useful, but a worked number is easier to budget. Consider a hypothetical Claude Code session that sends 3M input tokens and 0.5M output tokens without cache, using Claude Sonnet 5.5. On 59API that is $6.11 (¥44). At the official list price of $11 (about ¥79.2), the same usage would be about 56% of list price.

Now take a heavier context: 5M input tokens and 1M output tokens without cache on Claude Haiku 4.5. That works out to $3.4 (¥24.5) on 59API, against an official list price of $10 (about ¥72), so roughly 34% of list price.

Both figures are worked examples on paper, not a promise about your workload. The point they make is structural: because 59API charges only for tokens actually used, a session that ends early simply stops spending. There is no session fee, no seat fee and no minimum. A quick question and a long refactor are billed on the same principle — they differ in token count, not in billing mechanics.

For a team that runs many such sessions, the same arithmetic can be applied to a monthly budget before you commit to anything. Estimate input and output volume per session, multiply by the per-million rates above, and compare the total against the official list price you would otherwise pay.

Prepaid balance, top-ups and invoices

59API uses a prepaid model. You top up, then every request draws down the balance by the value of the tokens it consumed. There is no monthly fee, and the balance never expires, so an unused top-up is not a deadline you have to rush to spend. Top-up options are ¥10, ¥50, ¥100, ¥200, ¥500 and ¥1000, paid by WeChat Pay or bank card, and invoices are available.

That structure suits two different styles of developer. If you are prototyping, the ¥10 top-up is enough to see real usage numbers before you commit to anything larger. If you are shipping, the larger top-ups mean fewer payment interruptions, and because the balance does not expire, the timing of a top-up is a convenience rather than a risk.

Cards are optional. If you prefer a prepaid subscription-style arrangement for Claude or GPT, you can buy a card instead of relying solely on wallet balance. The important distinction is that 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. Quota and caps are card metering units written in $, not official list-price dollars, so they should not be read as direct price comparisons.

Cards, and the mistakes worth avoiding

For Claude specifically, the entry card is C-PRO Entry (Claude, 30 days) at $83.19 (¥599), with quota $610 and a weekly cap of $230. It drains at the card’s metering price × 2.4, and its reference value at official list prices is about $169.44 (¥1220). Larger Claude options include C-MAX Standard (Claude, 30 days) at $319.31 (¥2299) with quota $2350, and C-PRO Standard (Claude, 30 days) at $152.64 (¥1099) with quota $1100 and a weekly cap of $410. There are also 7-day Claude cards, such as the weekly C-PRO $290 card at $40.14 (¥289) with quota $290 and a weekly cap of $290.

With those rules in hand, four mistakes account for most support questions. Using Claude through an OpenAI-compatible client instead of Claude Code. Forgetting to update the client to version 2.1.285 or newer. Typing a model id from memory instead of copying the exact one. And expecting a card key to top up from wallet balance, or a balance key to draw on card quota — neither happens, by design.

Once those are cleared, the workflow is short: top up, set ANTHROPIC_BASE_URL=https://api.59api.com and ANTHROPIC_AUTH_TOKEN=YOUR_59API_KEY in the genuine Claude Code client, pick an exact model id, and start working. 59API handles the relay and the metering so you can concentrate on the code in front of you.

दस्तावेज़

शुरू करने के लिए तैयार?

Claude, GPT और अन्य मॉडलों के लिए एक ही key, असली token उपयोग पर बिलिंग और कोई मासिक शुल्क नहीं। साइन अप करके अपनी API key बनाएं; हर मॉडल की दरें मूल्य पेज पर हैं।

मुफ़्त साइन अप मूल्य