# AI API pricing explained: tokens, media units, and real cost

URL: https://infro.io/blog/ai-api-pricing-explained
Author: INFRO Editorial (https://infro.io/blog/editorial)
Publisher: INFRO
Published: 2026-08-05
Last modified: 2026-09-11
Last reviewed: 2026-09-11 (next review due 2027-03-10)
Topic: Cost and FinOps
Format: Brief

> AI API cost is the sum of workload units multiplied by model rates, plus retries and failed work. Text often bills input and output tokens separately; image, video, and audio use model-specific units such as generations, resolution, seconds, or characters.

## Text pricing has two sides

Input includes system instructions, conversation history, retrieved context, tool schemas, and user content. Output includes visible text and, depending on the model contract, billed reasoning or tool-call tokens. Generation-heavy workloads are sensitive to output rates; RAG can be dominated by input.

Estimate with observed percentiles rather than one average prompt. Long-tail contexts can dominate the bill.

## Media uses different units

Images may vary by model, count, resolution, quality, and editing inputs. Video commonly depends on duration, resolution, frames, or model tier. Audio can depend on characters, tokens, or seconds. Read the unit next to the rate before comparing providers.

Async job retries and abandoned results still matter if generation completed.

## Price per unit is not cost per outcome

Add retries, malformed output, human correction, verification, and orchestration steps. For agents, sum the whole trajectory. For media, include the number of variants needed to produce one usable asset.

The winning model is the one with acceptable quality and the lowest cost per successful task, not necessarily the lowest rate card.

## Build a living forecast

Track volume, input and output distributions, model mix, cache effects, retry and fallback rate, media settings, and growth. Recalculate when models, prompts, retrieval, or product behavior changes.

Keep assumptions beside the result so finance and engineering can challenge the same model.

## Revision history

- 2026-09-11: Removed the promotional template sections and the generic FAQ, moved product context into the product section, and corrected product wording to the current BYOK model.
