1. Subscriptions and API billing are two different payment models

Most people first meet AI through a web subscription: pay a fixed fee each month (ChatGPT Plus, say), and as long as usage stays within the plan you barely think about cost. But once you start using the API — calling a large model directly from your own program, script, or a third-party tool — the billing logic changes. It's no longer a capped monthly fee; you're charged per call for the exact number of tokens processed, with no monthly ceiling. That has two direct consequences. First, cost tracks usage completely: use little and it's cheap, use a lot and it can far exceed a subscription. Second, there's no "plan runs out and stops" safety net — one buggy loop can burn tens of dollars in minutes. Understanding how tokens are billed is the prerequisite for using an API well.

2. What a token actually is, and how it maps to text

A token is the smallest unit a large model uses to process text, but it's neither a "character" nor a "word." The model splits text into tokens, where a token might be a whole English word, part of a word, or a punctuation mark. Rough rules of thumb: in English, one token corresponds to about 4 characters, or 0.75 of a word; languages with denser characters, like Chinese, often cost 1 to 2 tokens per character and are "heavier" on tokens than English. That means the same passage usually costs more tokens in Chinese than in English. When you need a precise estimate, don't count characters by eye — every platform provides a token counter (tokenizer); paste in the actual text and it gives you the exact token count. Before shipping a batch job, run real samples through the counter rather than guessing.

3. Why input and output are priced differently

The most easily overlooked part of API billing: input tokens and output tokens are priced separately, and output is usually noticeably more expensive — for the same model, output can run three to five times the input rate. The reason is the cost structure. Input tokens are the model "reading" what you send (prompt, context, conversation history), which can be processed highly in parallel. Output tokens are generated one at a time, and each generated token requires a full forward pass, so the compute cost — and therefore the price — is higher. This has a direct implication for cost optimization: controlling output length is often more effective than compressing input. Getting the model to "cut the fluff and give the conclusion" lowers cost faster than laboriously trimming your prompt.

4. Why longer context makes every call more expensive

Many people are puzzled the first time they use an API: why does each turn cost more as the conversation goes on? The key is that large models are "stateless" — they don't remember what was said in the previous turn, so each call you have to resend the full conversation history as context. In other words, the longer the conversation, the more input tokens you resend each turn, and cost accumulates with the number of turns. The same applies to long-document analysis or codebase Q&A: stuffing a whole document into the context makes for a lot of input tokens. There are a few ways to handle this: keep only the last few turns, summarize a long document before asking about it, or use retrieval to feed in only the relevant snippets rather than the full text every time. Some platforms also offer prompt caching, billing repeated identical prefixes at a lower rate — worth enabling when you repeatedly call with long context.

5. How to estimate a month of API cost

An API has no monthly cap, so you have to estimate cost yourself. A workable method: use real samples to measure the average input and output tokens per call, multiply each by the model's input and output rates to get a per-call cost, then multiply by your expected monthly call count for the order of magnitude of your monthly spend. For example, an app handling 200 requests a day, each roughly 800 input tokens and 400 output tokens, works out to about 6,000 calls a month, 4.8 million input tokens, and 2.4 million output tokens — plug those two numbers into the platform's price list and you get a reasonably reliable budget, rather than discovering the overspend when the bill arrives. Run this calculation before launch, then leave yourself a 20–30% buffer for variance to stay on the safe side.

6. Practical techniques for controlling API cost

Without sacrificing quality, a few cost-cutting habits are worth keeping. First, match the model to the task — simple classification or extraction is fine on a small model; don't route every request to the priciest flagship. Second, control output length by setting a max-tokens parameter so the model doesn't ramble. Third, trim context — keep only the necessary history in long chats, and summarize long documents or use retrieved snippets instead of the full text. Fourth, enable prompt caching, which meaningfully lowers the price of repeated identical prefixes. Fifth, add usage monitoring and budget alerts — many platforms let you set usage caps or spend alerts, which catches "buggy loop burns tens of dollars" incidents early. Stacked together, these often push the actual bill to under half your initial estimate.

7. Handling API top-ups with stablecoin or a virtual card

Paying for overseas large-model APIs works much like subscriptions — you usually bind an international card to prepay or settle monthly. If you're already paying for ChatGPT or Midjourney with a virtual card or stablecoins, the same setup carries straight over to API platform top-ups; no separate payment channel needed. If your stablecoins sit on the wrong chain, a cross-chain swap aggregator can bridge them ahead of time — AllSwap works without registration and is non-custodial: pick your source and destination assets, compare quotes, and complete the swap before a balance alert. On prepaid API platforms especially, watch your balance so a usage spike doesn't cut off service for lack of funds.

8. Summary

Per-token API billing is a completely different payment model from subscriptions: pay for what you use, no cap, input and output priced separately with output more expensive, and every call getting pricier as context grows. To control cost, estimate a monthly budget from real samples first, then combine picking the right model, limiting output, trimming context, enabling caching, and setting usage alerts. Payment still comes down to the same virtual card or stablecoin setup. This is the latest in our ongoing billing series; more AI service billing details will follow.