59API

← Volver a las guías

GPT-6.1 Sol setup via 59API: your first cURL request

API · EN · 2026-11-01

Why is the first API request the hardest part?

Most developers do not struggle with prompts. They struggle with plumbing: which host to call, which endpoint, which model identifier, and where the key goes. A mismatch between a base URL and an endpoint can cost an afternoon and still leave you staring at an error you do not understand.

59API removes most of that friction. 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. You are not juggling several vendor accounts and several billing portals. You top up one prepaid balance and start calling.

The billing model is straightforward too. 59API charges per request based on real token usage, there is no monthly fee, and your balance never expires. That matters when you are evaluating a relay for a side project: if you stop building for a month, the money you already loaded is still there when you return.

This guide walks through a first request with cURL, the exact settings that matter, and the models that work in that client. All you need is a key, a model identifier and one command.

Which models can you actually call with cURL?

Here is the part worth reading twice. cURL is an OpenAI-compatible client, so through 59API it works with GPT, DeepSeek and other non-Claude, non-Gemini models only. The base URL is https://api.59api.com/v1 and the chat endpoint is https://api.59api.com/v1/chat/completions.

Claude models are different. They work only through the genuine Claude Code or Claude Desktop client, version 2.1.285 or newer, never through the OpenAI SDK, cURL or other clients. Gemini models use Google's native protocol only, through Gemini CLI, and they do not work on /v1/chat/completions.

So for your first cURL call, pick from the GPT, DeepSeek and other compatible families. A practical starting point is GPT-6.1 Sol, whose model id is gpt-6.1-sol. DeepSeek V4 Flash (deepseek-v4-flash) and DeepSeek V4 Pro (deepseek-v4-pro) are also available, along with GPT-5.6 Sol (gpt-5.6-sol), GPT-6 Astra (gpt-6-astra), Kimi K3 (kimi-k3), MiniMax M3 (MiniMax-M3) and Qwen3.7 Plus (qwen3.7-plus).

That is a protocol boundary rather than a limitation of the relay, and respecting it is what makes the first request succeed on the first try.

What are the exact cURL settings?

Once you have your key, the first request is one command. Use the endpoint https://api.59api.com/v1/chat/completions, send the key as a Bearer token, and pass the model id gpt-6.1-sol:

curl https://api.59api.com/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_59API_KEY" -d "{"model":"gpt-6.1-sol","messages":[{"role":"user","content":"Say hello in one sentence."}]}"

Three details cause most failures: the model id must match one 59API lists, the key belongs in the Authorization header, and the body must be valid JSON with a messages array. If you are scripting this, keep the base URL and the endpoint as separate configuration values so one can change without touching the other.

The same base URL, https://api.59api.com/v1, applies to Codex, OpenAI SDKs and OpenAI-compatible clients such as Cursor, Cherry Studio, Cline and OpenCode, again for GPT, DeepSeek and other non-Claude, non-Gemini models only.

If you later switch clients, the settings change with the protocol. For Claude Code or Claude Desktop, set ANTHROPIC_BASE_URL=https://api.59api.com and ANTHROPIC_AUTH_TOKEN=YOUR_59API_KEY. For Gemini CLI, set GOOGLE_GEMINI_BASE_URL=https://api.59api.com and GEMINI_API_KEY=YOUR_59API_KEY. One key, three setups, each with its own protocol.

What does GPT-6.1 Sol cost on 59API?

Because 59API meters real token usage, rates are per 1 million tokens. Billing is in CNY, with USD figures shown at ¥7.2 = $1.

GPT-6.1 Sol (gpt-6.1-sol) is listed at input $0.1847 (¥1.33), output $0.9264 (¥6.67) and cache read $0.0375 (¥0.27), against an official list price of $2 / $10. DeepSeek V4 Flash (deepseek-v4-flash) is listed at input $0.2778 (¥2), output $1.11 (¥8) and cache read $0.006944 (¥0.05).

A concrete example helps. For GPT-6.1 Sol, 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), that is 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, versus $18 (about ¥129.6) at official list price, again about 9% of list price.

Official list prices are reference prices for comparison. What you actually pay through 59API is the per-token rate above, deducted from your prepaid balance as requests run.

How do you fund 59API before you send?

59API runs on a prepaid balance. Top-up options are ¥10, ¥50, ¥100, ¥200, ¥500 and ¥1000, paid by WeChat Pay or bank card, and invoices are available. You are charged per request by real token usage, there is no monthly fee, and the balance never expires.

Monthly and weekly cards are optional. 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 list-price value.

For example, the G-PRO Starter card (GPT, 30 days) is $83.19 (¥599), with quota $3250 and a weekly cap $1250. It drains at the card's metering price × 2.4, and its reference value at official list prices is about $902.78 (¥6500).

Start with a small top-up if you want to test the workflow first. Either way, you know exactly what you have loaded before the first request goes out.

What should you do after the first response?

Once the first cURL call returns, the hard part is done. You have a working host, endpoint, key and model id. From there, move the same values into your application configuration, keep the key out of source control, and log the model id alongside each request so usage can be tied back to your 59API balance.

Then watch token usage rather than request count. A short request and a long one can cost very different amounts, and output tokens are usually the more expensive side. If a model id is not among the models 59API supports, use one that is instead of guessing at a name.

You can also compare families before committing to a stack: GPT-6.1 Sol and GPT-5.6 Sol for GPT work, DeepSeek V4 Flash and DeepSeek V4 Pro for lighter routes, or another listed model for a specific task. 59API keeps the access layer uniform while the model choice stays yours.

One account, one key, one host, and a balance that does not expire. That is the whole pitch, and your first cURL request is how you verify it.

Docs

¿Listo para empezar?

Una sola clave para Claude, GPT y más, con facturación por tokens reales y sin cuota mensual. Regístrate para crear tu clave API; las tarifas de cada modelo están en la página de precios.

Registro gratis Precios