59API

← Volver a las guías

Running Codex all day with 59API: an API proxy guide

Claude Code · EN · 2026-11-29

Is 59API built for heavy Codex days?

If you keep Codex open all day, the API bill becomes a design decision rather than an afterthought. Every refactor, test run and long agentic loop consumes tokens, and a fixed subscription can feel awkward when your usage is spiky. You may also be juggling several tools that each expect a different endpoint. 59API is built for exactly this kind of day: one account, one API key and one API host, https://api.59api.com, serving GPT, DeepSeek and other models through a prepaid balance.

The appeal is straightforward. 59API charges per request based on real token usage, with no monthly fee, and your balance never expires. You top up only what you need, then point Codex at the same host you use elsewhere. Top-ups come in ¥10, ¥50, ¥100, ¥200, ¥500 and ¥1000, paid by WeChat Pay or bank card, and invoices are available.

This makes 59API a practical API proxy if your day is split between quick completions and long-running sessions. You are not buying a seat you may not use; you are paying for the tokens your requests actually consume. That suits a solo developer running Codex continuously, a small team sharing one configuration, or anyone who wants to try a second model without opening another provider account.

One caveat is worth stating early: 59API is an independent third-party relay, not an official channel of any model vendor. Its rates differ from official list prices, and it is on those published rates that you should judge it.

What Codex can call through 59API

Compatibility is the part people get wrong, so let us be precise. Codex, OpenAI SDKs, cURL and OpenAI-compatible clients such as Cursor, Cherry Studio, Cline and OpenCode connect to 59API with base_url https://api.59api.com/v1 and the chat endpoint https://api.59api.com/v1/chat/completions. In that setup you can use GPT, DeepSeek and other non-Claude, non-Gemini models.

Two model families sit outside that path. Claude models work only through the genuine Claude Code or Claude Desktop client, version 2.1.285 or newer, configured with ANTHROPIC_BASE_URL=https://api.59api.com and ANTHROPIC_AUTH_TOKEN=YOUR_59API_KEY. They do not work through the OpenAI SDK, cURL or other clients, and that includes Codex. Gemini models use Google's native protocol only, through Gemini CLI with GOOGLE_GEMINI_BASE_URL=https://api.59api.com and GEMINI_API_KEY=YOUR_59API_KEY; they are not OpenAI-compatible and do not work on /v1/chat/completions.

So if your entire day is Codex, 59API still gives you room to switch. GPT-6.1 Sol and GPT-5.6 Sol are there for heavier reasoning, while DeepSeek V4 Flash and Qwen3.7 Plus are lighter options for quick edits and routine commands.

A single key and a single host also mean fewer environment variables to manage. You can keep one configuration for the working day and change the model id instead of rebuilding your client setup each time.

Pay-as-you-go costs for an all-day workload

Token pricing on 59API is per 1 million tokens, billed in CNY, with USD figures shown at ¥7.2 = $1. For the models you would reach for inside Codex, GPT-6.1 Sol (gpt-6.1-sol) is $0.1847 (¥1.33) input, $0.9264 (¥6.67) output and $0.0375 (¥0.27) cache read. GPT-5.6 Sol (gpt-5.6-sol) is $0.3472 (¥2.5) input, $1.94 (¥14) output and $0.0278 (¥0.2) cache read. Lighter options include DeepSeek V4 Flash (deepseek-v4-flash) at $0.2778 (¥2) input and $1.11 (¥8) output, and Qwen3.7 Plus (qwen3.7-plus) at $0.1389 (¥1) input and $0.4167 (¥3) output.

Here is a hypothetical all-day workload. Running GPT-6.1 Sol with 5M input 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 plus 0.5M output tokens without cache costs $1.67 (¥12) on 59API, against an official list price of $18 (about ¥129.6), also about 9% of list price.

The useful point is not the percentage but the shape of the bill. Cache reads are priced separately and cheaply, so a workflow that reuses context can cost less than a naive estimate. Because 59API meters actual usage, a quiet afternoon costs less than a busy morning, and there is no fixed monthly line item arguing with your workload.

Cards or prepaid balance: choose your rhythm

If your Codex usage is steady enough to plan around, 59API's optional cards add a second way to pay. 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 read them as metering figures rather than a direct comparison with vendor pricing.

For GPT, the G-PRO Starter card costs $83.19 (¥599) for 30 days with quota $2300 and a weekly cap $880. If you only want to cover one intense week, the weekly G-PRO $1100 card costs $40.56 (¥292) for 7 days with quota $1100 and a weekly cap $1100. Each card drains at the card's metering price × 2.4.

Because a card key never draws on your balance, keep it separate from the key you use for ordinary requests. Otherwise, the prepaid balance remains the flexible option: no monthly fee, no expiry, and top-ups from ¥10 to ¥1000 by WeChat Pay or bank card, with invoices available for your records.

A practical setup for your first full day

Getting started is deliberately small. Create your account, top up a balance, and copy your 59API key. In Codex, set base_url to https://api.59api.com/v1 and point the chat endpoint at https://api.59api.com/v1/chat/completions. Use model ids exactly as listed, such as gpt-6.1-sol or deepseek-v4-flash, and confirm your client is sending an OpenAI-compatible request shape.

Then run a short test before a long session. Measure a small prompt, watch the balance move by real token usage, and compare the outcome with what the same workload would have cost you elsewhere. If your day is mostly steady, add a card later; if it is bursty, keep topping up the balance as needed.

Who should try 59API? Developers who run Codex all day and want one key and one host, teams that need a shared configuration across several tools, and anyone who prefers prepaid, per-request billing to a fixed monthly commitment. It is also worth a look if you want to move between GPT and DeepSeek models without changing providers.

59API does not remove the need for judgement about token usage. It does make that usage visible, predictable and easy to fund.

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