Gemini 3.1 Pro pricing on 59API: rates and setup
Why route Gemini through one relay instead of three accounts
Finding a Gemini model you trust is the easy part. The annoying part starts right after: juggling separate logins, separate API keys and separate billing pages for every tool in your stack. If you are a developer moving between a terminal, an editor and a small script, that friction adds up fast. What you actually want is one place to top up, one key to configure and a clear view of what each request costs.
59API is built around that idea. It is an independent third-party AI API relay, not an official channel from any model maker. One account gives you one API key and one API host, https://api.59api.com, and from there you can reach Claude, GPT, Gemini, DeepSeek and other models. Billing is prepaid and charged per request based on real token usage, so you pay for work you actually did. There is no monthly fee, and your balance never expires. Monthly and weekly cards are optional, which means you can begin with a small top-up and only consider a card later if your usage pattern changes.
This guide focuses on one model: Gemini 3.1 Pro. We will look at its pricing on 59API, walk through setup in Gemini CLI, and work out when this particular model is worth choosing over the other Gemini options available through the same key.
Gemini 3.1 Pro pricing: the three rates you will pay
All 59API rates are quoted per 1 million tokens, with billing handled in CNY and USD figures shown at ¥7.2 = $1. For Gemini 3.1 Pro, the model id gemini-3.1-pro, the rates are straightforward: input is $1.39 (¥10), output is $8.06 (¥58), and cache read is $0.1389 (¥1).
That structure is the same across the platform, so once you understand it for one model you understand it for all of them. Input tokens are the material you send to the model. Output tokens are what the model writes back, and they are always the more expensive side of the bill. Cache read covers context the model reuses from an earlier cached pass, which is why it is priced far below fresh input.
For context, two neighbouring Gemini options on 59API sit at different points. Gemini 3.8 Flash, model id gemini-3.8-flash, is input $1.11 (¥8), output $5 (¥36), cache read $0.1111 (¥0.8). Gemini 4 Argon, model id gemini-4-argon, is input $1.39 (¥10), output $6.67 (¥48), cache read $0.0694 (¥0.5). Gemini 2.5 Flash, model id gemini-2.5-flash, is input $0.2083 (¥1.5), output $1.67 (¥12), cache read $0.0208 (¥0.15).
One thing worth knowing: official list prices exist only for the Claude and GPT families in our reference sheet. There is no comparable official list price for Gemini, so the honest way to compare Gemini models is against each other on 59API rates, not against a headline number from somewhere else.
Setup in Gemini CLI: two environment variables
Gemini models on 59API use Google's native protocol, and Gemini CLI is the client built for it. Setup is short. Point GOOGLE_GEMINI_BASE_URL at https://api.59api.com and set GEMINI_API_KEY to your 59API key, written here as YOUR_59API_KEY. From that point, requests made by Gemini CLI travel through the 59API host and are billed per request against your prepaid balance using the token rates we listed above.
There is a protocol boundary here, and it saves people a lot of confusion. Gemini models are not OpenAI-compatible, so they do not work on https://api.59api.com/v1/chat/completions. If you reach for an OpenAI SDK, cURL, Codex or an OpenAI-compatible client such as Cursor, Cherry Studio, Cline or OpenCode, those pair with GPT, DeepSeek and other non-Claude, non-Gemini models only. Claude models have their own separate rule: they work only through the genuine Claude Code or Claude Desktop client, version 2.1.285 or newer.
So if Gemini is your target, Gemini CLI is the path. If you need Claude in the same project, run it in its supported client rather than trying to force it through an OpenAI-style request. Keeping those lines clear is what makes the setup feel pleasantly uneventful.
When to use Gemini 3.1 Pro instead of the alternatives
The right choice comes down to how much the model writes and how much context it carries. Consider a hypothetical workflow: a long coding session where you keep feeding the model a growing repository and asking for substantial rewrites. Output-heavy work like that is exactly where Gemini 3.1 Pro's $8.06 (¥58) per 1 million output tokens becomes the line that matters most, and where Gemini 3.8 Flash at $5 (¥36) per 1 million output tokens is the lighter alternative.
Now consider a different hypothetical: quick classification calls, short summaries and high-volume lookups where responses are brief. Gemini 2.5 Flash, at input $0.2083 (¥1.5), output $1.67 (¥12) and cache read $0.0208 (¥0.15), fits that shape more naturally. Gemini 4 Argon sits between the two on output at $6.67 (¥48), and its cache read rate of $0.0694 (¥0.5) is less than half of Gemini 3.1 Pro's $0.1389 (¥1), which is attractive when the same context is read back repeatedly.
Gemini 3.1 Pro earns its place when you want a capable model for the substantial work and can steer the lighter models toward the routine calls. A practical habit is to keep one key and one host, then switch model id per task rather than juggling providers. If your traffic is mostly long generations, start with Gemini 3.1 Pro and watch the output side of your bill; if it is mostly short answers, start cheaper and move up only where you notice a quality gap.
Pay-as-you-go, top-ups and getting your first request running
Because 59API is prepaid, there is no subscription to cancel and no invoice arriving after the fact. Top-ups are available at ¥10, ¥50, ¥100, ¥200, ¥500 and ¥1000, paid by WeChat Pay or bank card, and invoices are available. Your balance never expires, so a small top-up is a perfectly reasonable way to test the setup before committing to anything larger. Cards are there if you want them, but they are optional and they behave differently: a card has its own key, can only call that family of models and is paid only from the card, never from wallet balance.
For a first run with Gemini 3.1 Pro, the path is short. Create a 59API account, add a top-up, copy your key, set the two Gemini CLI environment variables, and send a test request using the model id gemini-3.1-pro. Then open your usage view and check that the request was metered as expected.
That first test is also the moment the pricing becomes concrete rather than abstract. You will see real token counts, you will see them billed at the rates in this guide, and you will have a direct answer to the question that matters: is this model the right one for the work you are actually doing? Try it, watch the meter, and adjust from there. Gemini 3.1 Pro through 59API is ready when you are.