59API

← 返回教程列表

59API API relay for solo devs: Gemini CLI setup

API 使用 · EN · 2026-11-14

The solo developer's three-part setup problem

Shipping something on your own usually means juggling three problems at once: money, credentials and model choice. You want to test an idea this weekend, but you do not want to commit to a recurring platform bill before anyone has even opened the app. You want Claude, GPT, Gemini or DeepSeek depending on the task, yet each provider usually asks for its own account, its own key and its own billing setup. That is a lot of surface area for one person.

59API was built for exactly this kind of situation. It is an independent third-party API relay: one account, one API key and one API host, https://api.59api.com, covering Claude, GPT, Gemini, DeepSeek and other models. You are not choosing between providers before you can even start. You pick the model you want for a given task and point your client at the same host.

Consider a hypothetical situation. You are building a small customer-support bot with GPT, testing a Gemini CLI workflow for long research prompts, and running a cheap DeepSeek model for background summarisation. With separate provider accounts, that is three dashboards and three payment methods. With 59API, it is one prepaid balance and one key. The rest of this guide walks through who this setup suits, how the money works, and where the client boundaries are, so you can decide whether it fits your own project.

Prepaid balance, no monthly fee, no expiry

Cost control is the part most solo developers care about first, so start there. 59API uses a prepaid balance, charged per request according to real token usage. There is no monthly fee, and your balance never expires. That means an experiment that costs you a fraction of a top-up does not create a recurring charge, and money left over is still there months later when the project comes back to life.

Top-ups come in small and large steps: ¥10, ¥50, ¥100, ¥200, ¥500 and ¥1000, paid by WeChat Pay or bank card. Invoices are available if you need one for your records. Billing is in CNY, and USD figures are shown at ¥7.2 = $1, so you can read the per-token rates in either currency without guessing at an exchange rate.

Monthly and weekly cards are optional. If you prefer pay-as-you-go, you do not need to buy one at all. If you already know you will use a family of models heavily in a fixed window, a card can give you a separate quota with its own key. Cards are separate from wallet balance: a card key never falls back to wallet balance, and a balance key never draws on a card. Unused card quota does not roll over, so treat a card as a deliberate commitment rather than a default.

For a hypothetical weekend prototype, a ¥10 top-up is enough to see real usage and real output before you commit to anything larger. Because payment runs through prepaid balance and per-request token billing, the cleanest way to evaluate 59API is to add a small amount, point one client at it, and measure what your own prompts actually cost.

Gemini CLI setup: two settings and one key

If your day-to-day tool is Gemini CLI, the switch is deliberately small. Set GOOGLE_GEMINI_BASE_URL=https://api.59api.com and GEMINI_API_KEY=YOUR_59API_KEY, then start the genuine Gemini CLI client. There is no SDK wrapper to write and no separate account for each model family.

One important boundary: Gemini models use Google's native protocol only. They are not OpenAI-compatible, and they do not work on /v1/chat/completions. That is not a limitation you fight; it is a rule that keeps routing predictable. If you use Gemini CLI, you stay on the native path, and 59API handles the relay on the same host you already configured.

The rates make this practical for a solo workflow. Gemini 2.5 Flash is listed at $0.2083 (¥1.5) per 1 million input tokens and $1.67 (¥12) per 1 million output tokens, with cache read at $0.0208 (¥0.15). Gemini 3.1 Pro, for heavier reasoning, is $1.39 (¥10) input and $8.06 (¥58) output per 1 million tokens, with cache read $0.1389 (¥1). Gemini 4 Argon sits at $1.39 (¥10) input and $6.67 (¥48) output, with cache read $0.0694 (¥0.5).

For a hypothetical solo developer, that means you can keep a fast model in the terminal for everyday edits and a stronger model for the harder design questions, paying only for the tokens you actually send and receive.

Other clients: GPT, DeepSeek and more through one endpoint

Not everything runs in Gemini CLI. Codex, OpenAI SDKs, cURL and OpenAI-compatible clients such as Cursor, Cherry Studio, Cline and OpenCode work with 59API through base_url https://api.59api.com/v1 and chat endpoint https://api.59api.com/v1/chat/completions. Those clients pair with GPT, DeepSeek and other non-Claude, non-Gemini models only.

Claude models work only through the genuine Claude Code or Claude Desktop client (Claude Code 2.1.285 or newer), never through the OpenAI SDK, cURL or other clients. Gemini models, as covered above, use Google's native protocol only. Keeping those rules straight is what makes a multi-model setup feel predictable instead of mysterious.

Some rates to keep in mind for these clients: GPT-6.1 Sol is $0.1847 (¥1.33) input and $0.9264 (¥6.67) output per 1 million tokens, with cache read $0.0375 (¥0.27). DeepSeek V4 Flash is $0.2778 (¥2) input and $1.11 (¥8) output, with cache read $0.006944 (¥0.05). MiniMax M3 is $0.1389 (¥1) input and $0.5556 (¥4) output, with cache read $0.0278 (¥0.2).

For a hypothetical solo developer running Cursor for a weekend build, this is the practical shape of the day: one endpoint, one key, and a choice of models per task.

What a real workload costs

Per-token rates only matter once you look at a workload. Take GPT-6.1 Sol with 5M input and 1M output tokens, no cache. On 59API that is $1.85 (¥13.32). At official list price the same usage is $20 (about ¥144), so 59API is about 9% of list price for that example. Official list price here is only a reference price; 59API is an independent third-party relay, not an official channel.

Claude usage lands differently. Claude Sonnet 5.5 with 3M input and 0.5M output tokens, without cache, is $6.11 (¥44) on 59API, against an official list price of $11 (about ¥79.2), which is about 56% of list price. The per-model rates are $1.11 (¥8) input and $5.56 (¥40) output per 1 million tokens, with cache read $0.0972 (¥0.7).

For a hypothetical solo developer, the lesson is that model choice matters as much as volume. A fast, inexpensive model for routine calls and a stronger model for the difficult few can keep a month of usage predictable, especially with cache reads included in the mix.

Because you are billed on real token usage, the only honest way to forecast your own cost is to run your own prompts. That is exactly what a small prepaid balance is for, and it is why 59API suits developers who would rather watch usage than subscribe to a plan.

Is 59API right for you?

59API suits solo developers who want several model families without several billing relationships, who prefer prepaid control over recurring platform fees, and who are comfortable switching a base URL and a key in their own tools. It also suits developers who work across Gemini CLI and OpenAI-compatible clients and want both to point at the same host.

It suits you less well if you want a recurring subscription, or unused card quota that rolls over. Cards are optional, and unused quota does not roll over, so buy one only when you know the window and the family of models you will use. As an example, the weekly G-PRO $1100 card for GPT runs 7 days at $40.56 (¥292) with quota $1100 and weekly cap $1100.

One more practical note: 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. That makes a small first top-up a low-risk way to find out whether this API relay fits the way you actually work.

Start small, keep one key, and let your own usage decide.

接入文档

准备好开始了吗?

一个 Key 接入 Claude、GPT 等模型,按真实 token 计费,没有月费。注册后即可创建 API 密钥,每个模型的单价都在价格页。

免费注册 价格