59API

← Retour aux guides

Codex API proxy: a practical guide to 59API for daily coding

Claude Code · EN · 2026-11-13

The all-day Codex problem: too many keys, too many bills

Running Codex all day is not a casual workload. You are chaining prompts across a morning refactor, an afternoon debugging session, and a late-night review. Every one of those turns burns input tokens, output tokens, and often cached context. The practical pain is rarely the code itself. It is keeping track of which provider serves which request, hunting for API keys in environment files, and wondering whether the month-end invoice will surprise you.

Consider a hypothetical situation. You are switching between a stronger model for architecture decisions and a lighter one for routine edits. You also want a fallback when one provider is slow or expensive for a particular task. With separate provider accounts, that means separate credentials, separate billing dashboards, and separate failure modes to debug.

That is the gap 59API is built to close. 59API is an independent third-party AI API relay, not an official service or an authorised channel of any model vendor. It gives you one account, one API key, and one API host, with access to GPT, DeepSeek, and other non-Claude, non-Gemini models. If your day is spent inside Codex and you want one predictable place to route that traffic, 59API is worth a close look before you commit another month to scattered subscriptions.

One key, one host, and billing that follows actual usage

The appeal of 59API for a heavy Codex user is operational simplicity combined with straightforward accounting. Instead of juggling provider portals, you top up a prepaid balance and send requests through a single endpoint. Billing is charged per request according to real token usage, and there is no monthly fee. Your balance never expires, which matters if your usage is spiky: a heavy sprint week does not force you to pay for a quiet month, and a quiet month does not mean losing your credit.

Top-ups are available at ¥10, ¥50, ¥100, ¥200, ¥500, and ¥1000, paid by WeChat Pay or bank card, and invoices are available. Pricing is listed per 1 million tokens and billed in CNY, with USD figures shown at ¥7.2 = $1. That dual display helps when you are comparing a 59API rate with an official list price.

For a developer who lives in Codex, the important part is that the meter reflects what you actually send, not a seat licence or a flat subscription that you may or may not use. 59API also offers optional monthly and weekly cards, but they are not required to get started with pay-as-you-go usage. The core model is simple: fund the balance, use the key, and let token accounting do the rest.

Getting Codex pointed at 59API

Setting up 59API for Codex takes two values. Point your client at base_url https://api.59api.com/v1, and use the chat endpoint https://api.59api.com/v1/chat/completions. Your key goes in as YOUR_59API_KEY. Because 59API follows the OpenAI-compatible path, Codex, OpenAI SDKs, cURL, and OpenAI-compatible clients such as Cursor, Cherry Studio, Cline, and OpenCode can all work with GPT, DeepSeek, and other non-Claude, non-Gemini models.

That compatibility is the reason many developers can move an existing Codex configuration without rewriting their workflow. The host changes, the key changes, and the model identifier changes. The surrounding habits — your prompts, your review loop, your terminal routine — stay the same.

There is one boundary worth stating clearly. Claude models on 59API work only through the genuine Claude Code or Claude Desktop client, and Claude Code 2.1.285 or newer is required. They do not work through the OpenAI SDK, cURL, or other clients. Gemini models use Google's native protocol only through Gemini CLI and are not OpenAI-compatible. For a Codex user, this simply means your model menu is the GPT, DeepSeek, and other compatible families — not a reason to run two separate relays for one coding session.

What an all-day session actually costs

Let us look at rates that matter when Codex is processing large contexts repeatedly. GPT-6.1 Sol is listed at $0.1847 (¥1.33) input, $0.9264 (¥6.67) output, and $0.0375 (¥0.27) cache read per 1 million tokens. GPT-5.6 Sol is $0.3472 (¥2.5) input, $1.94 (¥14) output, and $0.0278 (¥0.2) cache read. If you want a lower-cost option in the same compatible path, DeepSeek V4 Flash sits at $0.2778 (¥2) input, $1.11 (¥8) output, and $0.006944 (¥0.05) cache read.

Two worked examples make the arithmetic concrete. For GPT-6.1 Sol, 5M input plus 1M output tokens without cache costs $1.85 (¥13.32) on 59API, compared with the official list price of $20 (about ¥144) — about 9% of list price. For GPT-5.6 Sol, 2M input plus 0.5M output tokens without cache costs $1.67 (¥12) on 59API, against an official list price of $18 (about ¥129.6), again about 9% of list price.

Cache reads matter here too. A Codex loop that re-reads the same repository context on every turn can generate substantial cached input. Keeping an eye on cache-read rates, rather than only input and output, gives you a more honest picture of a long session. Official list prices are reference prices only; 59API is an independent relay and does not represent itself as an official channel.

Should you pay per request or buy a card?

Pay-as-you-go suits the developer whose usage changes day to day. You top up when you need to, you pay for real token usage, and there is no monthly fee or expiring balance to defend. If you are running Codex continuously for weeks, an optional card may fit better. Cards have their own key, can only call that family's models, and are paid only from the card: they never fall back to wallet balance, and a balance key never draws on a card. Unused quota does not roll over, and quota and caps are card metering units written in $, not official list-price dollars.

For a GPT-focused user, G-PRO 入门版 is $83.19 (¥599) for 30 days, with quota $2300 and a weekly cap $880; its reference value at official list prices is about $638.89 (¥4600). Card quota drains at the card's metering price × 2.4, so compare the card's own metering against your expected daily usage rather than against the reference value.

Here is the decision rule. If Codex usage is occasional or experimental, prepaid pay-as-you-go is the lower-friction starting point. If you are certain you will burn through a predictable amount every week, a card gives you a separate key and defined caps. Either way, 59API gives a full-day Codex user the thing that matters most: one account, one key, one host, and costs you can inspect before you commit.

Docs

Prêt à commencer ?

Une seule clé pour Claude, GPT et d’autres modèles, facturée aux tokens réels, sans abonnement mensuel. Inscrivez-vous pour créer votre clé API ; les tarifs de chaque modèle sont sur la page Tarifs.

Inscription gratuite Tarifs