What is an AI Token?#
A token is a small chunk of text that an AI model reads or generates.
Tokens are not exactly the same as words. A short word might be one token, a long word might be split into several tokens, and punctuation or spaces can count as tokens too.
For example, the sentence I like Sphinx docs. would be broken into several small pieces before the model
processes it. You do not usually need to see the exact split. The important point is that tokens are the unit
used for:
measuring how much text you send to the model
measuring how much text the model sends back
calculating usage and cost
In practice, more tokens usually means more cost.
Types of tokens#
There are two types of tokens:
Input tokens are the tokens you send to the model.
Output tokens are the tokens the model sends back to you.
The total number of tokens is the sum of input and output tokens.
If you ask a short question and get a long answer, then the output token count will usually be much higher than the input token count.
Cost of tokens#
How many tokens do I get for $1?
$1 buys 100 credits. The number of tokens you get for $1 depends on whether you are paying for input tokens or output tokens, because most models charge different prices for each.
The formula is the same in both cases:
So if input tokens cost $2.50 per million, then $1 buys:
If output tokens cost $10.00 per million, then $1 buys:
Representative pricing table:
Note
These are example per-million-token prices for comparison. Provider pricing and plan details can change, so treat this as a guide to the input/output cost split rather than a permanent price sheet.
Model |
Input $/1M |
Output $/1M |
Input tokens per $1 |
Output tokens per $1 |
|---|---|---|---|---|
OpenAI GPT-4o |
$2.50 |
$10.00 |
400,000 |
100,000 |
OpenAI GPT-4o mini |
$0.15 |
$0.60 |
6,666,667 |
1,666,667 |
OpenAI GPT-4.1 |
$2.00 |
$8.00 |
500,000 |
125,000 |
Anthropic Claude 3.5 Sonnet |
$3.00 |
$15.00 |
333,333 |
66,667 |
Anthropic Claude 3 Haiku |
$0.25 |
$1.25 |
4,000,000 |
800,000 |
Google Gemini 1.5 Pro |
$2.00 |
$8.00 |
500,000 |
125,000 |
Google Gemini 1.5 Flash |
$0.20 |
$0.80 |
5,000,000 |
1,250,000 |
Meta Llama 3.1 405B |
$1.50 |
$7.50 |
666,667 |
133,333 |
Mistral Large |
$1.00 |
$5.00 |
1,000,000 |
200,000 |
xAI Grok-2 |
$0.50 |
$2.50 |
2,000,000 |
400,000 |
DeepSeek-V3 |
$0.15 |
$0.75 |
6,666,667 |
1,333,333 |
Why output tokens cost more#
Generating text requires:
more compute
more model steps
more inference time
Reading your input is cheap; writing a long answer is expensive.
That’s why output tokens cost 5–15× more than input tokens.