Pricing + Economics

What actually matters in AI inference cost per million tokens?

Inference cost per million tokens is driven by four things: how input and output tokens are weighted, which tokenizer produced them, how much context you resend on every call, and how often retries and failed calls repeat work. Compute your own figure by multiplying measured input and output tokens by the provider's published rates, then compare it with a flat-rate plan.

Key facts

Input vs outputOutput tokens are typically priced higher than input tokens
Tokenizer varianceThe same text can produce different token counts across model families
Context resendMulti-turn and RAG workloads resend context on every request
CachingPrompt caching reduces cost when a stable prefix repeats
RetriesFailed and retried calls still consume budget on per-token plans
Flat alternativePlugsky self-serve plans are flat monthly with unlimited fair-use usage and no per-token billing
Model tiersCheaper small models handle classification and routing before frontier calls
Product statusChat, streaming, JSON mode, function calling, embeddings and RAG are live

TL;DR

  • Cost per million tokens is not one number — input and output are weighted differently.
  • Resent context and retries are the two costs teams forget to measure.
  • Tokenizers differ, so compare cost per task, not cost per character.
  • Cheap models for routing and classification cut spend before it starts.
  • Flat-rate pricing replaces the per-million maths with a fixed monthly plan.

How it works, step by step

  1. Instrument your application to log input and output token counts per request.
  2. Separate workload classes: chat, RAG, classification, extraction and agents.
  3. Measure average tokens per request and requests per user per month for each class.
  4. Multiply by the live rates for the models you actually call, then add retry overhead.
  5. Run the same workload through a smaller model and compare quality with an eval set.
  6. Compute the monthly total and compare it with the flat plan that covers your usage.
  7. Re-measure after every prompt or model change — token profiles drift quickly.
1Instrument yourapplication to loginput and output2Separate workloadclasses: chat, RAG,classification,3Measure averagetokens per requestand requests per4Multiply by thelive rates for themodels you actually5Run the sameworkload through asmaller model and6Compute the monthlytotal and compareit with the flat

Try it yourself

Open the LLM token calculator →

The four variables that set your per-million price

Input weighting. Most providers price input and output differently, and output is usually the expensive side. Tokenizer. The same paragraph can be more tokens on one model family than another, so a lower headline rate can still cost more per task. Context resend. A RAG call that sends a long retrieved passage pays for that passage on every turn. Retries. Timeouts and 429 retries that reach the model are billed work on per-token plans.

How to calculate your own cost per million tokens

Do not estimate from character counts. Log real usage, then apply this method:

  1. For each workload, record average input tokens and average output tokens per request.
  2. Multiply by monthly request volume to get monthly input and output tokens.
  3. Read the current input and output rates from the live pricing page and apply them separately.
  4. Add retry and re-run overhead as a percentage you measured, not a guess.
  5. Divide total monthly cost by total tokens to get your blended cost per million.

The token calculator runs the same arithmetic interactively. If the total is dominated by stable, predictable traffic, compare it against a flat-rate plan where usage is unlimited under fair use.

Where teams overspend without noticing

  • Full history on every turn. Chat apps resend the whole conversation; trimming or summarising old turns cuts input tokens immediately.
  • Oversized retrieved context. Sending ten chunks when three answer the question is a silent multiplier.
  • Frontier models for easy calls. Routing classification, formatting and extraction to small models changes the blended rate.
  • Uncapped output. A missing max-token setting lets a model ramble at output rates.
  • Re-embedding unchanged documents. Incremental indexing avoids paying twice for the same text.

When flat-rate beats per-million maths

Per-token pricing is efficient for low, spiky volume: you pay for exactly what you use. It becomes awkward when volume is steady and forecasting matters, because a prompt change, a new feature or a retry storm moves the bill. Flat monthly plans with unlimited fair-use usage convert that variable line into a fixed one, and there is no per-token charge or overage fee on self-serve plans.

Keep the measurement discipline either way: tokens per task is the metric that tells you whether a quality improvement is worth its cost.

Honest comparison

Cost factorPlugsky flat-ratePer-token pricingSelf-hosted inference
Billing unitFlat monthly planInput and output tokensGPU hours plus ops
Output-token premiumNone on self-serve plansUsually priced higher than inputDepends on your hardware
Context resendCovered by the plan under fair useBilled on every callConsumes GPU time
RetriesNo per-token charge on self-serveBilled when they reach the modelConsumes GPU time
ForecastabilityFixed monthly line itemVaries with traffic and promptsCapex plus utilisation risk
Optimisation leverRoute models for quality and latencyCompress prompts and contextBatch and quantise

Frequently asked questions

Why are output tokens more expensive than input tokens?

Generating text is sequential and compute-heavy, while prompts can be processed in parallel. Most providers therefore weight output tokens higher, which is why uncapped completions inflate bills.

Does streaming change the cost per million tokens?

No. Streaming changes how tokens are delivered, not how many are generated or how they are billed. It improves perceived latency while the token count stays the same.

How do I count tokens accurately?

Use the tokenizer for the model you call rather than estimating from words or characters. Log token counts returned in API responses so your measurements match what is actually billed.

Do retries cost money?

On per-token plans, yes — a retried call that reaches the model is billed again. On Plugsky self-serve plans there is no per-token billing, so retries consume rate-limit budget rather than adding charges.

What is a blended cost per million tokens?

It is your total monthly spend divided by total tokens across all models and workloads. It is the number to compare against flat-rate plans because it reflects your real model mix.

Is flat-rate always cheaper?

No. Flat-rate wins when usage is steady and predictable. Per-token can be cheaper for low, spiky or experimental workloads where a monthly plan would sit idle. Compare with your own measured volumes.

How much does Plugsky cost?

Prices change, so check the live pricing page for current plans; the free plan includes two models with no card.

Do embeddings count toward inference cost?

Yes. Embedding calls consume tokens and should be measured separately, especially when re-indexing. Incremental indexing and cached embeddings keep that line small.