AI GLOSSARY · PRICING, LIMITS AND PLANS

Inference cost

Markdown version

Definition

Inference cost is what it costs to run a trained AI model to produce answers. For hosted models it is usually billed per token read and written; for self-hosted models it is the hardware and energy.

Also called: LLM inference cost, cost of inference, inference pricing, AI inference cost, cost per token, running cost of AI.

In plain language

Inference cost is the price of using an AI model, as opposed to the one-off cost of training it. Each time you ask a question, the model does work, and someone pays for the computers that do it. With a hosted model, the vendor turns that into a price per token, where a token is a small piece of text. Anthropic's pricing page lists separate rates for text sent in and text generated. Longer prompts and longer answers cost more, and an agent that reads many files sends a lot of text. Before you automate something at volume, estimate the cost for one run and multiply it.

Technical definition

Anthropic's pricing documentation prices usage per million tokens, with separate rates for base input tokens, cache writes, cache hits and output tokens, and a discount for asynchronous batch processing. It states that tool use adds tokens, including those for tool definitions and results. Claude Code's cost documentation says Claude Code charges by API token consumption and that token costs scale with context size. IBM describes the goal of inference as deploying a trained model in a maximally efficient, cost-effective way, and says loading model parameters into memory for each run uses energy, which batching spreads across many inputs. Self-hosted cost is hardware, energy and operations, not a per-token price.

Worked examples in this catalogue

Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.

  1. Skill by Skill Almanac · Illustrative, not executed

    llm-cost-estimator 56/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What to try
    Give the skill a usage profile (requests per day, input and output tokens) and your own price table.
    What you see
    A monthly LLM cost range with cache, batch and subscription effects.
    Why it exercises the concept
    It turns the per-token pricing idea into a budget for your own usage, using prices you supply.
  2. Skill by Skill Almanac · Illustrative, not executed

    agent-session-cost-review 58/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    A report of where a coding-agent session spent its tokens, built by parsing the saved session transcript with a script.
    Why it exercises the concept
    Inference cost in an agent session comes from what each request carries. This skill shows where the spend went.
  3. Guide · Illustrative, not executed

    Claude Code Pricing: What Drives Cost and Plan Options

    What you see
    The guide explains how Claude Code usage is billed on plans and per token, and the settings that control spend.
    Why it exercises the concept
    It is the plain-language companion for one product: which billing path applies and what drives the cost.
  4. Coding tool · Illustrative, not executed

    Claude Code

    What to try
    /usage
    What you see
    Claude Code shows plan usage and the token use of the current session. /cost is an alias of /usage.
    Why it exercises the concept
    It is the in-session view of the token use that inference cost is built from.

How it shows up when you use agents

In an agent session, inference cost is the sum of every request the harness sends to the model. Each request carries the conversation so far, plus file contents and tool results, and the model's reply is billed as output. Claude Code's cost documentation says costs scale with context size and that it sends the full conversation with every request. Anthropic's pricing page also says tool use adds tokens. See Token for the unit and Rate limit for the separate caps on how fast you may send requests.

What breaks when this is misunderstood: a loop that looked cheap per step becomes expensive because each step carries the growing history. Cost per run and cost per month are different questions, and a cheap run can still add up when automated.

Next actions: run /usage in Claude Code to see the session's token use, clear context between unrelated tasks, pick a smaller model for simple work, and estimate a monthly range before scaling a workflow. Use your own current prices; vendors change them.

Common confusions

  • Inference cost versus training cost. Training builds the model. Inference is the cost of each use after that. See Inference.
  • Per-token price versus total cost. The rate is only one factor. Total cost also depends on prompt length, output length and how many requests an agent makes.
  • API cost versus subscription. Anthropic's Claude Code documentation says Claude Code charges by API token consumption and points to a separate page for subscription plan pricing. See AI subscription.
  • Hosted versus self-hosted cost. A hosted model has a price list. A self-hosted model has hardware, energy and upkeep, which are harder to turn into a per-token figure.
  • Myth. Caching does not make requests free. Anthropic's pricing page lists cache writes and cache reads as separate priced items.
Show all 24 related terms

Terms that mention Inference cost

10 terms mention this one

More in Pricing, limits and plans

Next steps

  1. Claude Code Pricing: What Drives Cost and Plan Options The long-form guide.
  2. llm-cost-estimator A skill that exercises it.
  3. Token Related term.
  4. Inference Related term.
  5. All glossary terms A to Z and by family.

Sources

Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-24. Wikipedia is never the only source.

Review record

Last verified

Drafted by claude-sonnet-5-5; sources and example targets checked by claude-haiku-5-5 source check; claude-sonnet-5-5 editor pass on 2026-11-24. Last verified .

This entry is still in review, so it is not listed in search engines yet.

Change log (2)
  • : First version.
  • : Verifier pass: added commands page source for /cost alias.