Back to guides

Token Basics

Input Tokens vs Output Tokens: Why AI API Costs Are Different

Understand the difference between input and output tokens and why output tokens usually drive a large share of AI API bills.

5 min read - Published 2026-06-16 - Updated 2026-06-16

What input tokens include

Input tokens are everything you send to the model: instructions, chat history, user messages, retrieved documents, and tool definitions.

Long context windows are powerful, but they make it easy to send too much repeated text. Trimming stale context is one of the fastest ways to lower cost.

What output tokens include

Output tokens are the text generated by the model. They are often priced higher than input tokens, so controlling response length can have a direct margin impact.

For many support and workflow automations, concise responses are better for both cost and user experience.

How to budget both sides

Track typical input and output token counts separately for each feature. A support copilot, code assistant, and document summarizer will each have a different token profile.

Use the calculator to model best case, normal case, and heavy usage case before you commit to pricing your own product.

Estimate your own AI API cost.

Use the calculator with your model, token counts, and request volume.

Open calculator