Choose the smallest model that passes your test on the task, and estimate the cost before you build: requests per month, times the tokens each request reads and writes, times the provider's published price. This article gives the decision by task and the formula. It quotes no prices, because providers change them; the method does not change.
Match the model to the task
A product rarely needs one model. It needs the right size for each job. Providers sell roughly three sizes: small and fast, mid-range, and large.
- Turning text into structured data (a sentence into fields, an email into a category): start with the small model.
- Summarising a page of numbers into a few lines for a person to review: small or mid-range.
- Reading an image, such as a photo of a document or a meal: mid-range, and check it on real photos.
- Answering questions from a user's own data with tools: mid-range, with a small model screening the request first.
- Long reasoning over many documents, or code: large, and only where a test shows the smaller one fails.
On Dextra, our own product, the split follows this pattern: a small model turns a typed meal into dishes, a mid-range model reads meal photos, and drafting a three-line summary for a coach runs on the cheapest one.
Three questions before you pick
- How wrong can it be? A draft a person reviews tolerates more error than an answer shown directly to a customer.
- How fast must it answer? A model that takes several seconds is fine in a background job and painful in a chat.
- Where may the data go? If personal data is involved, the provider's region, retention and contract terms narrow the choice before quality does.
The cost formula
Model providers bill by the token, a unit of text of roughly three-quarters of a word in English, and they price what the model reads (input) and what it writes (output) separately. Output usually costs several times more than input.
Monthly cost = requests per month x (input tokens per request x input price + output tokens per request x output price).
To fill it in, you need four numbers of your own and two from the provider's price list:
- Requests per month: users, times how often each one uses the feature.
- Input tokens per request: your instructions, plus the user's text, plus any documents or history you send along. This is usually the largest number.
- Output tokens per request: how long the answer is. Short, structured answers are cheap.
- Images: priced by size as input tokens; check the provider's table.
- The provider's input and output prices for the model you chose.
What moves the bill
- Context you resend. Sending the whole conversation or a long document with every request multiplies the input. Send only what the task needs.
- Retries and screening calls. Each one is a request too. Count them.
- The model size. One step up in size is often several times the price for the same tokens.
- Caching and batching. Many providers discount repeated context and work that can wait. If your prompts share a long fixed part, this matters.
- Usage you did not plan for. A per-user limit and a monthly budget turn a surprise into a ceiling.
Measure, then decide
An estimate gets you a budget. A measurement gets you a decision: replay a set of real examples through two candidate models, record accuracy and the actual cost per answer, and choose the cheaper one that passes. We describe that method in our article on evaluating an AI feature.
FAQ
Should we use one provider or several?
Start with one, behind a thin layer of your own code so the model name is a setting. That keeps a second provider possible without building for it on day one.
Is a self-hosted open model cheaper?
Sometimes at high, steady volume, and when data cannot leave your servers. At low or uneven volume, paying per token is usually cheaper than keeping a graphics server running, and the hosted models are stronger.
How do we stop costs from running away?
A limit per user, a monthly budget that switches the feature off or down when reached, and a dashboard of cost per day. Decide all three before launch.