What tokens are and how API billing works
Tokens explained: input and output, per-1M-token rates, a worked example on GPT-4o mini and the kiree.net cost calculator.
What a token is
A token is the unit of text the model reads and generates: part of a word, a word or punctuation. Text APIs are billed not by character or message, but by the number of tokens in the request and reply.
Input and output tokens
Input tokens are the system prompt, prompt and conversation history in the request. Output tokens are the model reply. Each model has separate input and output rates per 1M tokens.
How to read the rate
On GPT-4o mini, input is $0.30 per 1M input tokens and output $1.20 per 1M. Request price = (input tokens ÷ 1,000,000) × input rate + (output tokens ÷ 1,000,000) × output rate.
Worked example
Suppose the request has 10,000 input tokens and the reply 2,000 output tokens on GPT-4o mini: input ≈ 10,000 ÷ 1,000,000 × $0.30, output ≈ 2,000 ÷ 1,000,000 × $1.20. The calculator gives the exact figure for your conversation length.
Frequently asked questions
Are input and output billed at one rate?+
No, input and output token rates usually differ: output is typically more expensive. Both prices are shown on each model card.
How do I estimate the token count of my text?+
A token is closer to a word than to a character; the exact number depends on language and markup. Use the kiree.net token calculator for an estimate.
Are media models billed per token too?+
No: images, video, voice and avatars are billed per call; the per-frame or per-clip rate is shown on the model card.