AI API cost glossary
Input tokens
Input tokens are the tokenized units sent to a model, including instructions, user content, conversation history, retrieved context, and tool definitions.
Why it matters for API cost
Providers commonly price input separately from generated output. Large system prompts, long conversations, and retrieved documents increase the cost of every request.
Formula
Example
A request with 2,000 input tokens at $1 per million input tokens has an estimated input cost of $0.002.
Frequently asked questions
Is the system prompt included in input tokens?
Yes. Instructions and other content sent with the request contribute to input usage.
Related guides
How to Calculate LLM Tokens and Estimate API Cost
Learn how to estimate LLM tokens, convert input and output usage into API cost, and build a realistic monthly AI budget.
OpenOpenAI API Pricing Explained: Tokens, Cache, Batch, and Cost
Understand OpenAI API input, output, cached input, batch, image, audio, and embedding pricing with practical formulas.
Open