Reportman.AI Logo Reportman.AI

← All articles

How much does it cost each time you ask the AI about your database?

· Toni Martir, arquitecto de software

At a wholesale distributor, the company's AI runs on a pay-as-you-go cloud model. Someone in sales types «how much did we sell in Girona yesterday?»: eight words. The provider does not charge for those eight words, but for everything the model reads and writes to answer them.

The bill is counted in tokens (chunks of words), with one price per million for the tokens the model reads and another, higher one for those it writes. It reads far more than your question, and part of what it writes never reaches your screen. The published prices of Anthropic's Claude Sonnet 5.5 show where the money goes.

«How much did we sell in Girona yesterday?»: what gets billed

Instructions and the description of your tables The tool sends all of it with every question
reads 20,000 tokens 4 cents you don't see it
Your question Eight words
reads 20 tokens 0.004 cents you see it
The reasoning What the model writes for itself before answering
writes 2,000 tokens 2 cents you don't see it
The SQL statement The answer: the instruction that pulls the figure from the database
writes 200 tokens 0.2 cents you see it
Total: 6.2 US cents With the instructions and the description read from the cache, 2.4
What you see: 3%

An example with round numbers and Claude Sonnet 5.5 prices, in dollars per million tokens: 2 to read, 10 to write and 0.10 to read from the cache. This is the first question of the conversation; on later ones, everything already said is added to what it reads.

What it reads: everything, every time

The model remembers nothing from one question to the next. Anthropic's API, the door through which programs use the model, is «stateless»: the tool sends it the whole conversation every time. And OpenAI warns that even when its API keeps the conversation, everything that came before is «billed as input tokens» again.

So every question carries the tool's instructions, the description of your tables, which the AI needs to write the right SQL statement (the technical instruction that fetches the data), and everything said so far. Say the instructions and the table description add up to 20,000 tokens: at 2 dollars a million, that is 4 cents per question. Giving it only the sub-schema for the question's area makes each one cheaper. On your own machine, that reading costs you a wait before the first word.

What it writes: including what you don't see

Models that reason before answering first write an internal text, and that text is billed. Anthropic bills it as output tokens, «for the full thinking process», not for the part you can see. OpenAI does the same, and the reasoning can take «anywhere from a few hundred to tens of thousands» of tokens, depending on how hard the question is.

Reasoning tokens are charged at the writing price: on Sonnet 5.5, 10 dollars a million, five times the reading price; 2,000 come to 2 cents.

The cache makes repeats cheaper

The cache exists for what repeats with every question: the provider keeps what it has already read and charges less to read it again. On Sonnet 5.5, reading from the cache costs 5% of the normal price, and writing to it costs 25% more.

But the tool has to ask for it: on Anthropic's API, with a field in each request. And it expires: it lasts five minutes from the last time it was used. The question after the coffee break pays for the whole description again, plus 25% to store it.

So how much does each question cost?

Whatever it costs to read everything that comes with it —instructions, table description and conversation, all over again each time— plus what it writes, reasoning included. In the example, 6.2 US cents, of which your question and the SQL statement are 3%; with the cache, 2.4. A thousand questions a month come to 62 dollars without the cache, and 24 if they all hit the cache.


At Reportman AI every SQL statement the AI writes goes through a blind audit, optional and on by default, which explains in plain words what it does without knowing your question: that is how you know whether the figure is right. The plans have a fixed fee, with an approximate number of cloud queries per day, and one-off credit packs if those run out. Local AI is not charged per question: unlimited queries on every plan, including the €0 one, with you providing the machine and the electricity. With the Agent running as a service, any machine with AI can be shared by granting access by email and, wherever it is, while it is connected it shows up in the pool of machines of everyone with access, who picks which one to ask.

Sources

Toni Martir, arquitecto de software · · sources checked on