Running inference cheaply

Most of an inference bill is decided before the request is sent: which model, how long the answer is, and whether a machine is running while nobody is asking anything.

LeverWhat it changesWhat it costs
Smaller modelA model with fewer parameters answers faster and costs less per token if its publisher priced it lower.Quality on hard questions. A 350M model is fine at rewriting and poor at arithmetic.
Smaller answerThe output rate applies per generated token, so a shorter answer is a smaller bill at the same rate.Nothing, if the question was specific. `max_tokens` is a bound, not a target.
A list instead of a conversationA batch is answered from a queue at half the model rate.You wait for it, and the answers arrive out of order.
Nothing running between requestsBilling is per token. An idle key costs nothing, unlike a rented GPU that bills by the hour.Availability depends on an operator being online for that model.
Refusals and failuresA request refused before it runs, or one that produces no text, is not charged.Nothing. This is why a wrong parameter is an error rather than a silently different answer.

The idle machine

The largest single difference in a month's bill is whether anything is charged while you are not asking, and the price of a token comes second. A rented GPU costs its hourly rate from the moment it starts: on the numbers published by the services in the comparisons, an A100 is between one and two dollars an hour at rest. A month of that is more than most projects spend on tokens in a year.

Per-token billing inverts the risk. A quiet week costs nothing, and the expensive hour is the hour you used. The trade is that you do not get a machine of your own, and a model needs an operator online to answer at all.

The model

Every model here is a GGUF file, and the publisher chooses how much of it is quantised. A 4-bit quantisation is roughly a quarter the size of the 16-bit original with a small quality cost, which is why most of the catalogue is small. The catalogue shows the file size for each one, and each model page says the format its weights are stored in when the gateway could read it.

Choosing the smallest model that answers well is the lever with the largest effect and the one most often skipped. A model twice the size is not twice as useful.

The answer

The output rate is per generated token. A question that asks for one sentence gets one sentence; a question that asks for "a full analysis" gets what it asked for and is billed for it. Set max_tokens to what you actually need: it is an upper bound, and reaching it truncates the answer rather than extending it.

The list

A batch is a list of requests submitted once and answered later, and it bills at half the model rate. If the work does not need an answer in the same second, that is half the money for the same tokens. It is the one place this endpoint sells the same thing cheaper because it can be scheduled.

What a failure costs

Nothing. A request refused before it runs, one that fails without producing text, and one priced above a ceiling you set all leave the balance alone. Budget for the answers you get, and treat a broken client as free to fix.

The cheapest models here

By the rate each model carries. A rate can change, so the catalogue is the page to check.

ModelPrice
LFM2 1.2B RAG0.005 USDC per 1M generated tokens
LFM2 1.2B Tool0.005 USDC per 1M generated tokens
LFM2.5 350M0.01 USDC per 1M generated tokens