Run7 AIGet an API key ↗
RUN7 / LEARN & BUILD

Token billing explained: input, output and cache

By Run7 AI · Updated: 2026-11-17

Token cost depends on separately priced usage categories, not just the length of the visible answer. Count ordinary input, output and any cache categories according to the actual model’s billing rules.

What is a token?

A token is a unit produced by a model’s tokenizer. Words, punctuation, code and non-English text tokenize differently; there is no reliable universal word-to-token ratio. System instructions, conversation history and tool descriptions can all add input tokens. Visible text alone may omit reasoning or other billed categories.

Use the API usage fields and your billing portal for reconciliation. A local tokenizer is an estimate unless it matches the model and full request format.

Input, output and cached input

CategoryMeaningWhat to confirm
InputContent supplied to the modelWhether a published input total includes cache hits
OutputGenerated tokensWhether reasoning tokens are included or separately itemized
Cache readReused eligible prompt contentEligibility and the applicable read rate
Cache writeCreating a reusable prompt cacheWhether separately billed and which duration applies

Cache support and accounting vary by model and provider. A repeated prompt is not automatically a cache hit. Do not subtract cached tokens twice or apply a cache discount to the whole request.

A worked estimate

Illustrative rates only: input $2/M tokens and output $8/M tokens. A request with 10,000 ordinary input tokens and 2,000 output tokens costs 0.01 × $2 + 0.002 × $8 = $0.036, before any other applicable categories. These are not Run7 quotations.

For separately billed categories, estimate cost as the sum of each category’s token count divided by one million and multiplied by that category’s rate. Image, audio, search and long-context surcharges may use other units. Check the model price reference and confirm your effective rates before purchase.

Keep a useful budget record

Keep learning

All guides · API checker

Sources and scope

Based on public protocol references. Delivered model permissions, rates and capabilities govern actual use. This is not a compatibility guarantee for every client version.