Codex API proxy: is 59API right for all-day coding?
When Codex runs all day, cost control becomes part of the workflow
There is a kind of developer day where Codex is not a quick assistant but the main pair of hands. You start a refactor before lunch and let the agent work through context files while you review diffs. By the end of the day, the token bill is the price of the day you just had.
That is the situation 59API is built for. If you run Codex all day, you care about three things: predictable access to a model that suits the task, a way to cap spending without another fixed subscription, and the flexibility to move between models when one job needs depth and another needs speed.
59API is an independent third-party AI API relay. One account gives you one API key and one API host, https://api.59api.com. For Codex, that host serves GPT, DeepSeek and other non-Claude, non-Gemini models.
The billing model suits an all-day user better than a monthly seat. You top up a prepaid balance and 59API charges per request according to real token usage. There is no monthly fee, and the balance never expires, so a quiet week costs nothing and a busy week does not require renegotiating a plan.
So is 59API right for you? If your day is made of many short and medium Codex sessions, if you want your spend visible, and if you would rather top up small amounts than commit to a subscription, the answer is probably yes.
What 59API charges and how you fund it
Pricing is per 1 million tokens, split into input, output and cache read. Billing is in CNY, with USD figures shown at ¥7.2 = $1. That makes the numbers easy to check against a model list, because you can compare the input rate, the output rate and the cache read rate side by side instead of guessing what a request will cost.
Funding is deliberately simple. Top-up amounts are ¥10, ¥50, ¥100, ¥200, ¥500 and ¥1000, paid by WeChat Pay or bank card, and invoices are available. Because the balance is prepaid and never expires, you decide how much to expose your Codex workflow to at any moment. Start with ¥10, run a day of real usage, then top up again when the pattern tells you something.
Monthly and weekly cards are optional, which is the right default while you are still deciding. Cards give you a dedicated key, a quota and a weekly cap, and they are useful when usage is steady enough to plan around. But they are not required, and the balance route keeps you on pay-per-request billing with no commitment.
One detail matters for heavy users: a card is paid only from the card itself. A card never falls back to wallet balance, and a balance key never draws on a card. That separation means your card quota is a genuine ceiling for the key assigned to it, rather than something another key can quietly absorb. Unused card quota does not roll over, so treat cards as a planned budget for a specific window rather than a permanent reserve.
Connecting Codex to 59API in two settings
The setup is short because 59API speaks the OpenAI-compatible route that Codex, OpenAI SDKs and cURL already expect. Point the base URL at https://api.59api.com/v1 and the chat endpoint at https://api.59api.com/v1/chat/completions. The same pattern applies to OpenAI-compatible clients such as Cursor, Cherry Studio, Cline and OpenCode.
Two protocol boundaries are worth stating plainly, because they decide where each model family can run. Claude models work only through the genuine Claude Code or Claude Desktop client, using Claude Code 2.1.285 or newer, never through the OpenAI SDK, cURL, Codex or any other client. Gemini models use Google's native protocol only, through Gemini CLI, and they do not work on /v1/chat/completions. For a Codex-based day, 59API therefore serves GPT, DeepSeek and other non-Claude, non-Gemini models.
That boundary is a feature rather than a gap for most people. If your work is Codex-driven, you are choosing from GPT and the other compatible families anyway, and you reach them through one host and one key instead of juggling separate provider accounts.
Because 59API charges by real token usage, the practical workflow is to start with a small prepaid balance, run your normal Codex routine, and read the resulting usage against the rates below. If a particular model is too expensive for the way you prompt it, you can change models in the same session without changing hosts, keys or billing setup. That is the flexibility that matters when an agent runs for hours rather than minutes.
What a heavy Codex day costs on 59API
Here are a few rates that matter for coding workloads, all per 1 million tokens. 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 is $0.3472 (¥2.5) input, $1.94 (¥14) output and $0.0278 (¥0.2) cache read. For lighter tasks, DeepSeek V4 Flash is $0.2778 (¥2) input, $1.11 (¥8) output and $0.006944 (¥0.05) cache read, while Qwen3.7 Plus is $0.1389 (¥1) input, $0.4167 (¥3) output and $0.0417 (¥0.3) cache read.
Two worked examples show how a sustained session adds up. For GPT-6.1 Sol, 5M input plus 1M output tokens without cache costs $1.85 (¥13.32) on 59API, against an official list price of $20 (about ¥144), so 59API 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), so 59API is about 9% of list price.
Read those figures as a planning tool rather than a promise. A day of Codex work is not a fixed number of tokens; it depends on how much context you feed in, how much output you accept, and how often cached reads land. What 59API gives you is a per-request view of that reality, with no monthly fee sitting underneath it.
When a card makes more sense than pay-as-you-go
Imagine a developer whose Codex usage is predictable: the same repository, the same review routine, the same long-running agent tasks every weekday. In that situation, a card turns a variable bill into a planned one.
The weekly GPT option, 【周卡】G-PRO $1100 (GPT, 7 days), is $40.56 (¥292), with quota $1100 and weekly cap $1100. It drains at the card's metering price × 2.4, and its reference value at official list prices is about $305.56 (¥2200). For a longer horizon, G-PRO 入门版 (GPT, 30 days) is $83.19 (¥599), with quota $2300 and weekly cap $880, also draining at the card's metering price × 2.4, with a reference value at official list prices of about $638.89 (¥4600).
Quota and caps are card metering units written in $, not official list-price dollars, so read them as the card's own meter rather than as a conversion from any provider's price sheet.
So who should try 59API? If you run Codex all day, want to keep one key and one host across models, and prefer to fund usage per request from a balance that never expires, 59API fits naturally. If your usage is steady enough to plan against a weekly ceiling, add a card for that window and keep the balance for everything else. Either way, you get token-based billing, transparent per-million-token rates and a setup that takes two configuration values.
Start with a small top-up, point Codex at https://api.59api.com/v1, and let one honest day of coding produce the numbers you actually need.
शुरू करने के लिए तैयार?
Claude, GPT और अन्य मॉडलों के लिए एक ही key, असली token उपयोग पर बिलिंग और कोई मासिक शुल्क नहीं। साइन अप करके अपनी API key बनाएं; हर मॉडल की दरें मूल्य पेज पर हैं।
मुफ़्त साइन अप मूल्य