Skip to content

What does a text-to-sql analytics agent cost to run?

An agent that turns plain-English questions into SQL against your schema, runs the query, and explains the result. Schema context is retrieved per request and the query runs as a tool call. On Claude Sonnet this works out to about $2,270 a month; here is the figure across every model and what drives it.

assumptions

A planning estimate for this shape of workload. Tune any of it in the calculator.

  • 1,500 questions a day
  • ~1,800 prompt tokens plus ~1,500 retrieved tokens of schema and examples
  • ~300 output tokens (SQL plus a short explanation)
  • 2 tool calls (run query, then summarize)

monthly_cost · Claude Sonnet

$2,270/ month

Input tokens12.3k/req · agentic context
$1,661
Output tokens900/req
$608
Embeddings (RAG)query embedding per request
$1.62

12.3k input · 900 output · 3 LLM turns / request

cost_by_model

A text-to-sql analytics agent across every model

Monthly cost of a Text-to-SQL analytics agent across models
modelcost / month
Gemini 1.5 FlashGoogle (Vertex)$55.28cheapest
GPT-4o miniOpenAI$109
Claude HaikuAnthropic$606
Gemini 1.5 ProGoogle (Vertex)$896
GPT-4oOpenAI$1,790
Claude SonnetAnthropic · shown above$2,270
Claude OpusAnthropic$11,342

cheapest · public list prices as of 2026-06 · planning estimate, not a quote

free_toolTune this scenario to your numbersOpens the AI Agent Cost Calculator prefilled with this workload. Change the volume, tokens, tool calls, and RAG to match your own and watch the cost move.

what_drives_it

Where the money goes

Schema retrieval plus the tool loop means context is re-sent a few times per question, so input tokens carry the cost.

The cheapest option here, Gemini 1.5 Flash, comes to about $55.28 a month against $2,270 on Claude Sonnet. Whether the cheaper model fits is a question for your evaluation set, not the price sheet. The bigger lever is usually the workload itself: caching re-sent context, trimming what each turn carries, and capping the tool loop move the bill more than swapping models does.

faq

Questions & answers

How much does a text-to-sql analytics agent cost per month?
On Claude Sonnet, about $2,270 a month at 1,500 requests a day with the assumptions below. The cheapest model compared here, Gemini 1.5 Flash, runs about $55.28 for the same workload. Your real figure moves with volume and tokens, so tune it in the calculator.
What makes a text-to-sql analytics agent expensive?
Schema retrieval plus the tool loop means context is re-sent a few times per question, so input tokens carry the cost.
Which model is cheapest for a text-to-sql analytics agent?
Gemini 1.5 Flash, at about $55.28 a month for this workload. Cheaper is not automatically better: a model that needs retries or longer prompts can cost more in practice, so test the candidates on your own evaluation set before committing.

A cost estimate is a start. Making an agent cheap in production is the work.

Prompt caching, context trimming, and the right model per step usually cut an agent's bill by more than half. Book a call, or leave your email and I'll reach out.

Book a call

No spam. You'll get a reply from me.

Prefer proof first? See how this plays out in real case studies →