Every major API meters usage in tokens, not words or characters. A token is a sub-word chunk; in English, roughly 1 token ≈ 4 characters ≈ 0.75 words (per Anthropic and OpenAI tokenization docs). A 500-word email is about 670 tokens; a 10-page document is roughly 5,000-6,000 tokens.
Pricing is almost always split into two rates. Input tokens (your prompt, system message, and any context you attach) are billed at one rate; output tokens (what the model generates) are billed at a higher rate — typically 4-6x the input rate. That asymmetry is why summarization (long input, short output) is cheap and generation (short input, long output) is comparatively expensive.
Rates are quoted per 1,000,000 tokens (1M, written MTok). So gpt-5.4 at $2.50 / $15.00 means $2.50 per million input tokens and $15.00 per million output tokens. A single request of 4,000 input + 1,000 output tokens on gpt-5.4 costs (4,000/1,000,000 × $2.50) + (1,000/1,000,000 × $15.00) = $0.01 + $0.015 = $0.025.
Three modifiers change that base math: prompt caching (cheaper repeated input), batch processing (cheaper non-urgent jobs), and context-window tier pricing (some models charge more above a context threshold). All three are covered below. To turn token counts into dollars without doing the arithmetic by hand, use the AI Prompt Cost Calculator. For an apples-to-apples bill at your monthly volume, run the numbers through our AI prompt cost calculator. <!-- calc-link-mesh:v2 -->