Cline on CheapRelay: an API relay session from $0.1208
01 / Pick the client and model before you count the tokens
I start every coding-session estimate the same way: pick the client, pick the model, then multiply the real token counts by the published rate. That order matters because the client decides which protocol you can use. Cline and Roo Code are OpenAI-compatible clients, so on CheapRelay they connect to models served under /v1, including GPT, DeepSeek, Kimi, GLM, Qwen, Grok and MiniMax.
- ■ Choose Cline or Roo Code as the editor client — $0 for the client setup.
- ■ Set the API base to https://api.cheapapirelay.com and the compatible path to /v1 — $0 in endpoint charges.
- ■ Start with Qwen3.7 Plus, model id qwen3.7-plus — $0.1208 per 1M input tokens, $0.3625 per 1M output tokens, $0.0361 per 1M cache-read tokens.
- ■ Check the prepaid balance before the run — $0.09 sign-up credit on every new account, usable on any model.
There is no monthly fee. CheapRelay bills against a prepaid balance, charges per real token, and the balance does not expire. That makes a small session easy to price because there is no fixed subscription charge to subtract from the arithmetic. If the balance is at or below zero, the service returns HTTP 402; top up, then continue.
02 / Price a small Cline edit with three models
Here is an example session: 100,000 input tokens and 20,000 output tokens. I call it an example because your repository, prompts and diffs determine the real token counts. The formula is simple: input tokens divided by one million, multiplied by the input rate, plus output tokens divided by one million, multiplied by the output rate.
- ■ Qwen3.7 Plus example: 100,000 × $0.1208 ÷ 1M = $0.01208; 20,000 × $0.3625 ÷ 1M = $0.00725; total $0.01933.
- ■ MiniMax M3 example: 100,000 × $0.1236 ÷ 1M = $0.01236; 20,000 × $0.4917 ÷ 1M = $0.009834; total $0.022194.
- ■ MiMo V2.6 Pro example: 100,000 × $0.1736 ÷ 1M = $0.01736; 20,000 × $0.3472 ÷ 1M = $0.006944; total $0.024304.
Those three lines show how the price list works. MiMo V2.6 Pro input at $0.1736 is higher than Qwen3.7 Plus input at $0.1208, but its output rate of $0.3472 is lower than Qwen3.7 Plus at $0.3625. For this example, Qwen3.7 Plus costs $0.01933, MiMo V2.6 Pro costs $0.024304 and MiniMax M3 costs $0.022194. The spread in this particular example is $0.004974, so the model choice changes the bill by less than half a cent.
For a longer Roo Code run, the same arithmetic scales with the tokens. A 500,000-input, 100,000-output Qwen3.7 Plus example costs 0.5 × $0.1208 + 0.1 × $0.3625 = $0.0604 + $0.03625 = $0.09665. Nothing is hidden in that figure: it is the input rate times input tokens plus the output rate times output tokens.
03 / Compare GPT output rates with the published list prices
CheapRelay publishes official list prices for Claude and GPT only, converted at 7.2 yuan per US dollar. For GPT models, the gap is visible in the output column, which is usually where an agent session spends heavily.
- ■ GPT-6.1 Sol, model id gpt-6.1-sol — $0.1486 input, $0.7375 output, $0.0347 cache read per 1M tokens; official list $2.00 input, $10.00 output, $0.10 cache read.
- ■ GPT-5.6 Sol, model id gpt-5.6-sol — $0.3056 input, $1.71 output, $0.0264 cache read; official list $4.00 input, $20.00 output, $0.40 cache read.
- ■ GPT-6 Astra, model id gpt-6-astra — $0.5639 input, $2.82 output, $0.0569 cache read; official list $10.00 input, $50.00 output, $1.00 cache read.
Do the subtraction on the output rates. GPT-6.1 Sol output is $10.00 − $0.7375 = $9.2625 below list, or about 93% under the published output rate. GPT-5.6 Sol output is $20.00 − $1.71 = $18.29 below list, about 91% under. GPT-6 Astra output is $50.00 − $2.82 = $47.18 below list, about 94% under.
Now apply one example session of 100,000 input tokens and 20,000 output tokens to GPT-6.1 Sol through Cline: 0.1 × $0.1486 + 0.02 × $0.7375 = $0.01486 + $0.01475 = $0.02961. At official list rates, the same token counts would be 0.1 × $2.00 + 0.02 × $10.00 = $0.20 + $0.20 = $0.40. The difference is $0.40 − $0.02961 = $0.37039 for that example session.
04 / Use the cache-read rate when the editor repeats context
Agentic coding tools often resend context. The price list includes a cache-read rate for most models, so include it in the estimate instead of pretending every token costs the input rate.
- ■ MiMo V2.6 Pro, model id MiMo-V2.6-Pro — $0.1736 input, $0.3472 output, $0.002778 cache read per 1M tokens.
- ■ DeepSeek V4 Flash, model id deepseek-v4-flash — $0.2389 input, $0.9556 output, $0.005556 cache read.
- ■ DeepSeek V4 Pro, model id deepseek-v4-pro — $1.01 input, $3.03 output, $0.0333 cache read.
- ■ Qwen3.8 Max, model id qwen3.8-max — $0.5722 input, $1.72 output, $0.0681 cache read.
A DeepSeek V4 Flash example with 100,000 input, 20,000 output and 100,000 cache-read tokens costs 0.1 × $0.2389 + 0.02 × $0.9556 + 0.1 × $0.005556 = $0.02389 + $0.019112 + $0.0005556 = $0.0435576. Compare that with DeepSeek V4 Pro on the same example: 0.1 × $1.01 + 0.02 × $3.03 + 0.1 × $0.0333 = $0.101 + $0.0606 + $0.00333 = $0.16493. The two lines use the same token counts, so the difference of $0.1213724 is a clean comparison of the published rates.
For models without a cache-read figure on the price list, such as Qwen3.6 Plus Uncensored, model id qwen3.6-plus-uncensored, use $0.3431 per 1M input tokens and $1.83 per 1M output tokens. A 100,000-input, 20,000-output example is $0.03431 + $0.0366 = $0.07091.
05 / Keep the client rules straight and control the run
One compatibility trap can waste an afternoon, so write the rules on the checklist. Claude models work only with the official Claude Code and Claude Desktop clients, version 2.1.285 or newer, never with Cline or Roo Code and never through an OpenAI-compatible path. Gemini models use the native protocol under /v1beta through Gemini CLI, also not through an OpenAI-compatible path. Cline and Roo Code belong with GPT, DeepSeek, Kimi, GLM, Qwen, Grok, MiniMax and the other models served under /v1.
- ■ Use Cline or Roo Code with Qwen3.7 Plus — $0.1208 input and $0.3625 output per 1M tokens.
- ■ Use Cline or Roo Code with GLM-5.3, model id glm-5.3 — $0.4583 input and $1.38 output per 1M tokens.
- ■ Use Cline or Roo Code with Kimi K3, model id kimi-k3 — $0.9333 input and $4.67 output per 1M tokens.
- ■ Use Cline or Roo Code with Grok 4.7, model id grok-4.7 — $0.5056 input and $1.52 output per 1M tokens.
- ■ Stay within 120 calls per minute per key and 8 calls at once per account — $0 extra usage charge inside those limits.
Top-ups are refundable on the unused balance within 12 days, minus what was spent and the payment fee. Referral rewards add another line to the arithmetic: 20% of what a directly invited user pays, plus 6% from the second level, paid into a withdrawable rewards balance. The smallest withdrawal is ¥20, via Alipay.
CheapRelay makes the session bill legible because every step has a rate beside it. Pick the compatible model, count the tokens, multiply, and the number tells you what the coding session costs. The site is https://cheapapirelay.com, and the API base is https://api.cheapapirelay.com.
More reading
| Date | Aisle | Written in | Title |
|---|---|---|---|
| 2026-10-30 | Coding agents, cheaply | EN | One Claude Code fix: $18.40 first, $2.13 second Two Claude Code receipts judged on price per useful result, plus the two environment variables that changed the bill. |
| 2026-10-30 | Coding agents, cheaply | EN | Running Claude Code on $4.10 a Day Instead of $38 Two daily receipts, the same coding work, and a price-per-useful-result verdict. Real token math, no subscriptions. |
| 2026-10-30 | Coding agents, cheaply | EN | The $50 Coding Bill: 6 Habits That Quietly Double It Six coding assistant habits that quietly double an AI bill, and a $5-a-month workflow that keeps token costs honest. |
| 2026-10-30 | Coding agents, cheaply | EN | One $5 Receipt Covers Claude, Codex and Gemini CLI A beginner walkthrough for running Claude Code, Codex and Gemini CLI on one cheap relay key, with a $5 first-month cap and honest token math. |
| 2026-10-30 | Coding agents, cheaply | EN | $0.50 per pipeline run: the hard cap for CI agents A beginner walkthrough for capping coding agent spend in CI: token math, hard stops and a $0.50 per run budget. |
| 2026-10-30 | Coding agents, cheaply | EN | Claude Code on Windows: $0 Setup and a $10 First Receipt Set up Claude Code on Windows with PowerShell environment variables, then meter every token with CheapRelay pay-as-you-go billing. |