GPT-6.1 Sol via 59API API proxy: change the base URL
The problem is usually the provider, not your code
Most developers reach for an AI API change for a simple reason: the current setup is expensive, awkward, or limited to one model family. The frustrating part is that switching providers often turns into a refactor. You hunt for SDK differences, rewrite request builders, chase documentation, and discover halfway through that the endpoint path changed or the model names do not match.
It does not have to be that way. 59API is an independent third-party AI API relay built around a simple idea: one account, one API key, and one API host for Claude, GPT, Gemini, DeepSeek and other models. If your project already speaks the OpenAI SDK dialect, the migration is mostly a base URL change. The rest of your request code, model calls, and response handling can stay where they are.
That matters because time spent rewriting working integration code is time not spent shipping features. Whether you are testing a prototype, running an internal tool, or moving a service that has real traffic, the shortest path from a working OpenAI SDK project to a working 59API project is the one with the fewest moving parts. Let us walk through the exact settings, the endpoint, the models you can call, and what the billing looks like once you are connected.
Change the base URL and keep your SDK
For an OpenAI SDK project, the whole switch comes down to two client values: the API key and the base URL. Point the client at https://api.59api.com/v1 and pass your 59API key as the API key. There is no separate SDK to install and no new request format to learn.
In Python, the change looks roughly like this:
from openai import OpenAIclient = OpenAI(api_key='YOUR_59API_KEY', base_url='https://api.59api.com/v1')response = client.chat.completions.create(model='gpt-6.1-sol', messages=[{'role': 'user', 'content': 'Say hello in one line'}])
Everything above the client construction is unchanged. Your existing helper functions, retry logic, streaming code, and logging can continue to work as they are. The only edits are the base URL and the key.
One account and one API key cover 59API, and the key is the same key you use across supported clients. Billing is prepaid and charged per request by real token usage, with no monthly fee, and your balance never expires. Top-ups are available at ¥10, ¥50, ¥100, ¥200, ¥500 and ¥1000, paid by WeChat Pay or bank card, with invoices available. So a small test run costs exactly what you use, and topping up again is a routine step rather than a contract negotiation.
The endpoint and clients that just work
Behind the base URL, the OpenAI-compatible chat endpoint is https://api.59api.com/v1/chat/completions. Send a standard chat completion payload with your chosen model id and messages, and the response format stays familiar to any OpenAI SDK project.
That makes 59API a practical API proxy for a wide range of tooling. Codex, OpenAI SDKs, cURL and OpenAI-compatible clients such as Cursor, Cherry Studio, Cline and OpenCode work with GPT, DeepSeek and other non-Claude, non-Gemini models. If your team already uses one of these clients, the setup is the same base URL and the same key.
Two boundaries are worth stating plainly, because guessing wrong here wastes an afternoon. Claude models work only through the genuine Claude Code or Claude Desktop client, using Claude Code 2.1.285 or newer, and never through the OpenAI SDK, cURL or other clients. Gemini models use Google's native protocol only, through Gemini CLI, and are not OpenAI-compatible, so they do not work on /v1/chat/completions.
So for this article's path, stay with GPT, DeepSeek, and other non-Claude, non-Gemini models. That is not a limitation on what 59API carries; it is a clean separation of protocols that keeps the setup predictable. Pick a supported model id, keep your existing request code, and the migration is done.
Model rates you can check before you switch
Because 59API bills by real token usage, the sensible next question is what a call actually costs. Prices are per 1 million tokens, billed in CNY, with USD shown at ¥7.2 = $1. Here are a few model ids that work through the OpenAI-compatible path, with input, output, and cache read rates:
- GPT-6.1 Sol (
gpt-6.1-sol): input $0.1847 (¥1.33), output $0.9264 (¥6.67), cache read $0.0375 (¥0.27). - GPT-5.6 Sol (
gpt-5.6-sol): input $0.3472 (¥2.5), output $1.94 (¥14), cache read $0.0278 (¥0.2). - DeepSeek V4 Pro (
deepseek-v4-pro): input $1.25 (¥9), output $3.75 (¥27), cache read $0.0417 (¥0.3). - Qwen3.8 Max (
qwen3.8-max): input $0.6944 (¥5), output $2.08 (¥15), cache read $0.0833 (¥0.6).
Compare that with the official list price reference for the same GPT models: GPT-6.1 Sol is $2 / $10 and GPT-5.6 Sol is $4 / $20. The list price is a reference point only; 59API is an independent relay, not an official or authorised channel.
Two practical habits make this easy to manage. First, record the model id in your configuration rather than scattering it through the codebase, so switching models is a one-line change. Second, keep an eye on output tokens, which cost more than input across these models. Cache reads are cheaper again, so reuse of cached context is worth designing for when your workload allows it.
What a real workload costs on 59API
Per-token rates are easier to trust when you translate them into a concrete workload. Two worked examples show the gap clearly, using official list price as the reference.
For GPT-6.1 Sol, a run of 5M input tokens plus 1M output tokens without cache costs $1.85 (¥13.32) on 59API. At the official list price of $20 (about ¥144), 59API comes to about 9% of list price. For GPT-5.6 Sol, 2M input tokens plus 0.5M output tokens without cache costs $1.67 (¥12) on 59API, against an official list price of $18 (about ¥129.6), which is also about 9% of list price.
These are hypothetical workloads, but they reflect how pay-as-you-go billing behaves in practice. There is no commitment period, no monthly invoice for unused capacity, and no fee sitting on top of usage. If a batch job is heavy one week and quiet the next, your bill follows the tokens you actually sent.
That makes 59API easy to test against your own numbers. Measure your current input and output token volumes, plug them into the per-million rates above, and compare the result with what you pay today. A small prepaid top-up is enough to run a genuine test against your real prompts, which is a more convincing evaluation than any pricing table on its own.
Balance, cards, and the limits worth knowing
59API's default model is prepaid balance: top up, then let each request deduct by real token usage. Balance never expires, and monthly and weekly cards are optional rather than required.
Cards work differently, and the details matter. A card has its own key, can call only 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 converted into official prices. For example, the G-PRO Starter card for GPT runs 30 days at $83.19 (¥599), with quota $3250 and a weekly cap of $1250, draining at the card's metering price × 2.4.
Finally, keep the client boundaries in mind as you expand: Claude only through the genuine Claude Code or Claude Desktop client at 2.1.285 or newer, Gemini only through Gemini CLI's native protocol, and GPT, DeepSeek and other non-Claude, non-Gemini models through the OpenAI-compatible path.
For an existing OpenAI SDK project, that is the whole story. Change the base URL, insert your 59API key, pick a supported model id, and send your first request. The code you already wrote keeps working, the billing follows real usage, and you can evaluate the result against your own workload.
Ready to get started?
One key for Claude, GPT and more, billed by real token usage with no monthly fee. Sign up to create your API key; rates for every model are on the pricing page.
Sign up free Pricing