Blog
/
Guides

What Is a Token in AI? Costs, Examples & Usage (2026)

What is a token in AI, and why does it affect your bill? Explore input and output tokens, API pricing, context limits, and hidden usage costs.

Sara NelissenSara Nelissen
Written by
Sara Nelissen
Last updated
May 20, 2026
read time
8
minutes
What Is a Token in AI? Costs, Examples & Usage (2026)

Table of contents

A 1,000-word document doesn't necessarily use 1,000 AI tokens. Add code, unusual words, or another language, and the count changes again. For anyone building with AI, those differences can affect API costs faster than expected.

We'll look at how language models count tokens, how token limits work, and what popular models charge, and we'll also cover ways to reduce unnecessary usage. The focus here is on language model tokens, separate from AI-related cryptocurrencies.

What is a token in AI?

A token in AI is a small unit of text that a language model reads or generates, such as a word, part of a word, or punctuation mark. Before processing your prompt, a tokenizer splits the text into tokens and converts each into a numeric ID.

One word doesn't always equal one token, and the exact count depends on how the model's tokenizer breaks up the text.

  • Common words like "hello" may count as one token.
  • Longer or unusual words can split into several smaller pieces.
  • Numbers, punctuation, and spaces can also affect token counts.

A word counted as one token by one model could require several tokens in another.

Because token counts vary by model and text, actual tokenizer counts are more reliable than word-based estimates when tracking usage or calculating costs.

Token type Where it comes from What it affects
Input tokens User prompt Initial usage count
Output tokens Model response Response size and cost
Reasoning tokens Internal model processing Hidden usage that increases total cost

Reasoning tokens often remain invisible in the response but still increase total usage on complex requests. If your system does not track these counts accurately, limits fail, quotas drift, and pricing becomes inconsistent.

How many words is a token?

A token is about three-quarters of an English word on average. OpenAI's published rule of thumb puts 1 token at roughly 4 characters or ¾ of a word, and 100 tokens at roughly 75 words.

Tokens Approximate words Roughly equal to
100 75 A short paragraph
1,000 750 A 1.5-page memo
1 million 750,000 Several full-length novels

Ratios based on OpenAI's published guidance for English text.

Treat the table as an estimate. Code, technical text, and non-English content produce more tokens for the same length, and each model's tokenizer counts differently. For exact numbers, OpenAI points you to its Tokenizer tool or the tiktoken library for the specific model.

How tokenization works

Tokenization works by converting raw input into a sequence of integer IDs that the model can process. The tokenizer maps text into these IDs based on a fixed vocabulary tied to the model.

Each model uses its own tokenizer, so the same prompt can produce different token counts depending on the model you use. The difference shows up in how your system behaves:

  • Usage tracking against a customer's credit balance
  • Enforcement of per-feature limits across model versions
  • Entitlement updates when customers switch between model versions

Tokenization also applies to non-text inputs. Multimodal models convert images into patch tokens and audio into spectrogram or semantic tokens.

Each modality follows different counting rules. Your metering pipeline needs to handle these differences when a single request includes text, images, and tool outputs.

AI token pricing across popular models

API access to language models is billed by the token, with providers typically quoting a per-million-token rate for input and a higher rate for output.

For applications generating long responses or running multiple model calls, those differences can add up quickly.

Model Provider Input (per 1M tokens) Output (per 1M tokens)
GPT-6 Astra OpenAI logoOpenAI $10.00 $50.00
Claude Opus 5.5 Anthropic logoAnthropic $4.00 $20.00
Claude Sonnet 5.5 Anthropic logoAnthropic $2.00 $10.00
Gemini 3.8 Flash Google logoGoogle $0.75 $3.75

Standard short-context API rates as of October 8, 2026. Sources include OpenAI, Anthropic, and Google. Google’s Gemini 3.8 Flash rates are scheduled to double on January 1, 2027, moving to $1.50 per million input tokens and $7.50 per million output tokens. Prices may change.

For perspective, 10,000 input tokens and 2,000 output tokens on GPT-6 Astra would cost $0.20 at these rates. Cached input, batch processing, and long-context requests may have different pricing, while agent workflows can generate several charges from one task.

Consumer subscriptions like ChatGPT Plus work differently, charging a recurring fee for access rather than billing each API token separately.

Explore our guides to token-based pricing and AI token cost for more on pricing, tracking, and controlling token consumption.

Context windows: Why requests use more tokens than you see

A context window is the maximum number of tokens a model can consider in one request. It covers the prompt, the conversation history, attached files, tool results, and the response. Google's Gemini 3.8 Flash, for example, supports a 1M-token context window.

The visible question is often the smallest part of what gets billed. A request grows well past what the user typed in 4 common ways:

  1. Conversation history: A chat resends earlier turns with each new message, so a 20-word question in turn 15 carries every previous turn with it.
  2. Attached files: A PDF, spreadsheet, or codebase gets tokenized in full, even when the question is about one page.
  3. Agent loops: A coding agent can read a whole file before each edit, then add every tool result back into the next step, so token use compounds across a single task.
  4. Reasoning tokens: Models that think before answering bill those tokens as output, even when the response itself is short.

Long prompts can also cross a pricing threshold. On Gemini 3.1 Pro, prompts above 200,000 tokens are billed at a higher input and output rate, and the higher rate applies to the whole request, including the tokens below the threshold.

How to use fewer tokens

You can reduce AI token usage by choosing the right model, reusing cached inputs, trimming unnecessary context, and setting token budgets for each feature. Small changes to what you send and how often you send it can make a noticeable difference in API costs.

  • Match the model to the task: Use smaller models for classification, extraction, and simple answers. Reserve more expensive models for complex reasoning.
  • Cache repeated prompts: Reuse common instructions and context to avoid paying full input rates. On Claude Opus 5.5 and Sonnet 5.5, cache hits cost 5% of the standard input price.
  • Trim and summarize context: Shorten conversation history, retrieve only relevant file sections, and remove tool outputs that later steps don't need.
  • Set a token budget per feature: Define input and output limits for each feature, then track consumption to catch expensive workflows before costs grow.

Token budgets need accurate metering and request-time controls to work in production. Your application needs to know how much each request consumes and when to limit further usage.

How tokens drive AI pricing models

Tokens shape AI pricing models by determining how customers are charged, how usage is tracked, and when spending limits apply. Some products bill for every token consumed, while others bundle tokens into subscriptions or let customers spend prepaid credits.

Four common approaches work differently behind the scenes:

Model How customers pay What engineering needs
Pay-per-token Pay for input and output tokens consumed Accurate metering and usage attribution
Prepaid credits Spend purchased credits on token usage Credit ledger, atomic deductions, and balance checks
Subscription with limits Receive a token allowance with each plan Entitlement checks and usage limits
Hybrid Pay a subscription plus token-based overages Allowance tracking, overage detection, and billing sync

Hybrid pricing is particularly useful when customers want predictable monthly costs but need room for heavier AI workloads. It also introduces more moving parts, since subscriptions, token allowances, and credit balances must stay aligned.

Miro offers a real example. The company launched its credit-based AI pricing model with Stigg in under six weeks, saving an estimated 5,000 engineering hours compared with building the infrastructure internally.

How AI products meter and limit tokens

AI products meter and limit tokens by tracking consumption per request and checking available allowances before another model call runs.

A simple usage counter might work initially, but shared budgets, concurrent agents, and changing subscription limits make enforcement more complicated.

A production system needs to handle six things:

  1. Usage attribution: Track input and output tokens by customer, feature, agent, or workload for accurate billing and reporting.
  2. Real-time enforcement: Check allowances before model calls to block requests that would exceed hard limits or apply soft-limit rules.
  3. Atomic deductions: Reserve or debit shared balances safely so concurrent requests can't spend the same credits twice.
  4. Entitlements: Apply the right token limits based on each customer's plan, add-ons, and account overrides.
  5. Credit management: Record grants, expiry, refunds, and spending order in a ledger that supports reconciliation.
  6. Shared budgets: Allocate usage across teams, users, and agents without letting one workload consume more than its permitted share.

These checks also need to be fast. Stigg's Sidecar serves entitlement checks from a local in-memory cache at p99 under 10ms, falling back to Stigg’s Edge API at around 100ms on cache misses.

Applications can enforce access close to the workload while recording actual token consumption for billing and reconciliation.

Decide what AI tokens are allowed before the model runs

Billing tells you what happened, while Stigg decides what’s allowed to happen in the request path, before the model runs.

Stigg puts spending controls earlier in the request path. As the usage runtime for AI products, Stigg is the infrastructure that checks entitlements, credits, and usage limits before costly workloads begin, while your existing billing provider handles invoices and payments.

Here's what you get:

  • Token metering: Track consumption across customers, features, agents, and workloads.
  • Ledger-backed credits: Manage grants, expiry, burn order, and atomic deductions from shared balances.
  • Real-time limits: Enforce allowances and spending rules across plans, teams, and agents.
  • Low-latency checks: Use the Stigg Sidecar's local cache or Node.js SDK, with Edge API fallback.
  • Flexible integration: Start with credits, metering, or entitlements independently. Keep your billing stack, with BYOC available when needed.
  • Hierarchical governance: Enforce budgets across the full chain (org, department, team, user, and individual agent) with one usage event updating balances at every level and the most-generous grant winning on source conflict.

Explore the Stigg docs to see how request-time entitlement checks, credit deductions, and usage limits work together in production.

FAQs

1. How many words are 1,000 tokens?

1,000 tokens is roughly 750 English words, based on OpenAI's rule of thumb that 100 tokens equal about 75 words. Code, technical text, and non-English content produce more tokens for the same length.

2. How much is 1 million tokens in ChatGPT?

1 million tokens costs $10 for input and $50 for output on GPT-6 Astra through OpenAI’s API as of October 2026 (prices may change). A ChatGPT subscription charges a flat monthly fee, so per-token pricing applies only to API usage.

3. Do AI tokens cost money?

Yes, AI tokens cost money when you use a model through an API, with separate per-million-token rates for input and output. Consumer chat apps often include a free tier, but paid API access bills every token in the prompt, context, and response.

4. Why do different AI models return different token counts?

Different AI models return different token counts because each uses its own tokenizer and vocabulary. The same input can produce different token sequences across models, which affects limits, credit consumption, and cost after a model change.

5. What’s the difference between a token and a word?

A token in AI is a smaller unit than a word, often a word fragment, punctuation mark, or space, while a word is a complete lexical unit.

Common English words like “hello” often count as one token, but longer or unusual words split into several, so 1,000 tokens is roughly 750 English words, not 1,000.

Latest news.

One email per month.
From engineers, for engineers.

Thank you! Your submission has been received.
Oops! Something went wrong while submitting the form.