Skip to content
Glossary · LLM costs

Inference (AI)

Definition

Running a trained AI model on new input to get an output, such as an answer, a label or an embedding.

Last updated

What it is.

Training is when a model learns from data. Inference is every time the finished model is used: a chat reply, a document classified, an embedding created. With hosted APIs, you pay per inference call, usually by the token. If you host a model yourself, you pay for the machines that run it.

Inference cost depends on the size of the model, how many tokens go in and out, and how fast the answer must arrive. Reasoning models can produce many extra tokens before the final answer, which adds to the bill.

Why it matters

For most products, inference is the AI cost that keeps growing with usage, long after any training or fine-tuning is done. It is the number to model before launch, and the one that model routing, caching and batching are designed to bring down.

Watch out

Common mistakes.

  1. 01

    Budgeting only for training or setup. For API-based products, inference is usually the main AI cost.

  2. 02

    Ignoring latency. A cheaper model that is too slow for the user can still be the wrong choice.

  3. 03

    Forgetting retries and failed calls, which also count as usage.

Tools

Work it out with a tool.

Related

Related terms.

Building something with this? Ask an engineer.

OceanLab designs and builds production software. Tell us what you are planning and we will reply with how we would approach it.

OceanLab

Enterprise Software Engineering - Human + AI

Languages

Locations

Global Headquarters

21 Merchant Road, 3rd Floor, Singapore 058267

Main corporate office and leadership operations

North America Office

548 Market Street, PMB 12472, San Francisco, CA 94104

Client operations and business development

India Office

402 Shivalik Shilp II, SG Highway, Ahmedabad 380015

Engineering and delivery center

© 2026 - Copyright. All Rights reserved OceanLab