April 12, 20264 min readGuide

What is a token, and how LLM billing actually works

If you've ever looked at an AI bill and wondered why a few paragraphs cost more than expected, the answer is one word: tokens. Tokens are the unit large language models read, generate, and bill for. Understanding them is the difference between guessing at costs and predicting them.

What is a token?

A token is a chunk of text — usually a few characters, often part of a word. Models don't read letters or whole words; they split text into tokens using a tokenizer, then process those numerically.

Rough rules of thumb for English:

  • 1 token ≈ 4 characters
  • 1 token ≈ ¾ of a word
  • 100 tokens ≈ 75 words
  • 1,000 tokens ≈ ~750 words (about 1.5 pages)

Common words like "the" are a single token. Rarer words, code, punctuation, and non-English scripts split into more tokens. The word "tokenization" might be 3 tokens; an emoji or a Chinese character can be several. That's why the same idea costs more in some languages than others.

Input tokens vs output tokens

Every API call has two token counts, and they are usually priced differently:

  • Input tokens — everything you send: your prompt, system instructions, chat history, and any documents or context. Often cheaper.
  • Output tokens — everything the model generates back. Often 3–5x more expensive than input.

This matters because context accumulates. In a long chat, every previous message is re-sent as input on each new turn. A 20-message conversation isn't billed once — the early messages are paid for again and again as the history grows.

How a single request is priced

Pricing is quoted per million tokens (sometimes per thousand). The formula is simple:

cost = (input_tokens / 1,000,000 × input_price)
     + (output_tokens / 1,000,000 × output_price)

Say a model costs $3 per million input tokens and $15 per million output tokens. You send a 1,500-token prompt and get a 500-token answer:

  • Input: 1,500 / 1,000,000 × $3 = $0.0045
  • Output: 500 / 1,000,000 × $15 = $0.0075
  • Total: $0.012

Fractions of a cent per call — but at scale, and with long contexts, it adds up fast. Prices vary widely between models, which is why it pays to compare options before committing.

What drives your bill up (and down)

A few practical levers control real-world spend:

Factor Effect on cost
Long chat history re-sent each turn Higher (input grows every message)
Verbose system prompts Higher (paid on every call)
Asking for long, detailed answers Higher (output is the pricey side)
Trimming history / summarizing context Lower
Choosing a cheaper model for simple tasks Much lower

The biggest savings usually come from model selection. A small, fast model can handle classification, extraction, or formatting at a fraction of the price of a flagship reasoning model. Reserve the expensive models for the work that genuinely needs them.

One key, every model, the same billing unit

The annoying part of multi-provider AI is that each vendor has its own keys, dashboards, and quirks. AnyModel gives you one OpenAI-compatible endpoint instead — https://anymodel.org/v1 — and a single API key that reaches GPT, Claude, Gemini, DeepSeek, GLM, Kimi, Qwen, and Grok. Switching models to chase a better price-per-token is a one-field change: edit the "model" id, nothing else.

Getting started in a supported CLI is one line:

bash <(curl -fsSL "https://anymodel.org/i?tool=codex") <YOUR_API_KEY>

Use tool=claude for Claude Code (also opencode, hermes). For Cursor, Windsurf, Zed, Cline, Aider, Continue, or Gemini CLI, point any OpenAI-compatible client at the same base URL and key.

Billing is honest pay-per-token: no subscription, no minimums. You start with 1,000,000 free tokens on signup — 6,000,000 total if you link Telegram — and no credit card. If retention is a concern, Ghost Mode offers opt-in zero-retention keys where we store only a token counter, not your prompts or responses. (The model provider still receives the prompt, so it's not magic privacy — just less stored on our side.)

Want more practical guides like this? Browse the blog.

Ready to see your own token counts in action? Create a free account and start with a million tokens, no card required.

Read next