59API

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

59API FAQ: API relay keys and model access with Claude Code

API · EN · 2026-11-30

One account, one key, one API host

The trouble usually starts before you write a single line of code. Every model family tends to bring its own account, its own API key and its own dashboard, so a project that compares Claude with GPT with Gemini can quietly turn into key management instead of engineering. 59API removes that overhead. It is an independent third-party AI API relay: one account and one API key, one API host at https://api.59api.com, and access to Claude, GPT, Gemini, DeepSeek and other models. One key also means fewer credentials to store, fewer secrets to rotate and fewer places where a configuration mistake can hide.

The billing model is deliberately plain. You top up a prepaid balance, and 59API charges per request according to real token usage. There is no monthly fee, and your balance never expires. Monthly and weekly cards are optional, so you can start small and decide later whether a card fits your workflow better than pay-as-you-go.

Top-ups are available at ¥10, ¥50, ¥100, ¥200, ¥500 and ¥1000, paid by WeChat Pay or bank card, and invoices are available. A first test does not require a large commitment, and a busy month does not force you into a subscription you did not plan to use.

Claude Code and Claude Desktop: the exact settings

If your plan is to work with Claude models through Claude Code or Claude Desktop, the setup is two environment variables and nothing more. Set ANTHROPIC_BASE_URL=https://api.59api.com and ANTHROPIC_AUTH_TOKEN=YOUR_59API_KEY, then start the genuine Claude Code or Claude Desktop client. Claude Code 2.1.285 or newer is required.

There is an important boundary here. Claude models work only through the genuine Claude Code or Claude Desktop client. They do not work through the OpenAI SDK, cURL or any other client, and pointing an OpenAI-compatible tool at 59API will not unlock them. If you have previously configured an Anthropic-style base URL and token, those same two values are all that change when you point the client at 59API.

For a hypothetical small Claude project, you would create your account on 59API, add a top-up such as ¥50, copy the API key into ANTHROPIC_AUTH_TOKEN, set the base URL, and open Claude Code. Your requests are then billed against the prepaid balance by actual token usage, with no monthly fee and no expiry on the money you have already paid in.

OpenAI-compatible clients and Gemini CLI: what each one can call

Not every tool speaks the same protocol, so 59API gives you two different connection paths and it matters which one you pick. Codex, OpenAI SDKs, cURL and OpenAI-compatible clients such as Cursor, Cherry Studio, Cline and OpenCode use base_url https://api.59api.com/v1 with the chat endpoint https://api.59api.com/v1/chat/completions. On that path you can call GPT, DeepSeek and other non-Claude, non-Gemini models. Claude models are not available there, and Gemini models are not OpenAI-compatible, so they are not available there either.

Gemini models use Google's native protocol only, through Gemini CLI. Set GOOGLE_GEMINI_BASE_URL=https://api.59api.com and GEMINI_API_KEY=YOUR_59API_KEY. Gemini requests do not run through /v1/chat/completions, and they will not work in an OpenAI-compatible client.

So the rule of thumb is simple: match the client to the model family. Claude Code or Claude Desktop for Claude. Gemini CLI for Gemini. Codex, the OpenAI SDKs, cURL or OpenAI-compatible clients for GPT, DeepSeek and the other supported non-Claude, non-Gemini models. All of them can share the same 59API account and the same API key.

What the key actually costs per request

Because 59API bills on real token usage, the numbers you care about are the per 1 million token rates. Billing is in CNY, and the USD figures shown here use ¥7.2 = $1. GPT-6.1 Sol is listed at $0.1847 (¥1.33) for input, $0.9264 (¥6.67) for output and $0.0375 (¥0.27) for a cache read. Claude Sonnet 5.5 is $1.11 (¥8) for input, $5.56 (¥40) for output and $0.0972 (¥0.7) for a cache read. Claude Haiku 4.5 is $0.3472 (¥2.5) for input, $1.67 (¥12) for output and $0.0278 (¥0.2) for a cache read.

The worked examples make the arithmetic easier to picture. Take GPT-6.1 Sol with 5M input and 1M output tokens, no cache: that is $1.85 (¥13.32) on 59API, compared with the official list price of $20 (about ¥144), so 59API is about 9% of list price. Now take Claude Sonnet 5.5 with 3M input and 0.5M output tokens, no cache: $6.11 (¥44) on 59API against an official list price of $11 (about ¥79.2), so 59API is about 56% of list price.

Official list price is a reference point only. 59API is an independent third-party relay, not an official channel, and what you are billed is the 59API rate for the tokens your requests actually consume.

Balance or card: how the two models differ

The prepaid balance is the default and simplest option: no monthly fee, no expiry, and payment only for the tokens you use. A card is a separate product with its own key, its own validity period and its own caps. A card can call only that family's models, and 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, so they should not be read as official prices.

For example, the C-PRO Entry card for Claude over 30 days costs $83.19 (¥599), with quota $610 and a weekly cap of $230, and its reference value at official list prices is about $169.44 (¥1220). The Weekly Card G-PRO $1100 for GPT over 7 days costs $40.56 (¥292), with quota $1100 and a weekly cap of $1100, and a reference value at official list prices of about $305.56 (¥2200). Cards drain at the card's metering price × 2.4.

A sensible first step for a new developer is the balance path: top up ¥10 or ¥50, connect one client with the settings above, watch real usage, and upgrade to a card only when the pattern of your work justifies it.

दस्तावेज़

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

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

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