LLMCostBot
100,000 queries per monthVerified 2026-12-0230 of 30 models meet the constraints

What a SQL generation costs per month

December 2026 · list prices, standard tier

At 100,000 queries per month with 8,000 input and 4,000 output tokens per call, a SQL generation costs $58.52 per month on GLM 5.3 Flash with a 70% cache hit rate, at list prices verified 2026-12-02. This is an estimate, not a quote; assumptions and a ±30% range are below.

±30% volume range on the same model: $40.97 – $76.08 per month.

Monthly cost by model

Sorted by the stated assumptions; rows that fail a constraint stay visible with the reason.

Monthly cost for SQL generation: 30 recorded models, with constraint status, cached and uncached totals
ModelConstraintsMonthlyWithout cacheInput / 1MOutput / 1MContext
GLM 5.3 FlashZ.aiMeets constraints$58.52cached$61.69$0.0356$0.08151.05M
Llama 4 ScoutMetaMeets constraints$202.00$202.00$0.1$0.31.31M
Claude Haiku 5.5AnthropicMeets constraints$231.90cached$282.80$0.1$0.51M
Qwen3.8 FlashAlibaba (Qwen)Meets constraints$235.29cached$311.08$0.15$0.471M
DeepSeek V4.1 FlashDeepSeekMeets constraints$251.61cached$270.28$0.051$0.5671.05M
Llama 4 MaverickMetaMeets constraints$584.99cached$686.80$0.35$1524K
MiniMax M3MiniMaxMeets constraints$591.46cached$727.20$0.3$1.21.05M
GLM 5.3Z.aiMeets constraints$621.51cached$622.08$0.0699$1.41.05M
Command A+CohereMeets constraints$763.56cached$848.40$0.3$1.5192K
Qwen3.8 27BAlibaba (Qwen)Meets constraints$839.75cached$840.32$0.06$1.961.02M
Devstral 2 2512Mistral AIMeets constraints$927.58cached$1,131$0.4$2262K
DeepSeek V4 Pro 0423DeepSeekMeets constraints$936.41cached$1,296$0.8349$1.541.05M
Mistral Large 4Mistral AIMeets constraints$1,058cached$1,414$0.7$2.11.05M
Grok 4.3xAIMeets constraints$1,426cached$2,020$1.25$2.51M
Kimi K2.7 CodeMoonshot AIMeets constraints$1,652cached$1,923$0.63$3.5262K
DeepSeek V4 Pro 0813DeepSeekMeets constraints$1,819cached$1,827$0.111$4.31.05M
Nova Pro 1.0AmazonMeets constraints$1,939$1,939$0.8$3.2300K
Muse Spark 1.3MetaMeets constraints$2,105cached$2,727$1.25$4.251.05M
Qwen4 MaxAlibaba (Qwen)Meets constraints$2,113cached$2,879$1.43$4.281M
GPT-6.1 TerraOpenAIMeets constraints$2,291cached$2,828$1$51.05M
Grok 4.7xAIMeets constraints$3,192cached$4,040$2$6500K
Gemini 4 HydrogenGoogleMeets constraints$3,436cached$4,242$1.5$7.51.05M
Kimi K3.1 ProMoonshot AIMeets constraints$3,718cached$3,760$0.253$8.81.05M
Mistral Medium 3.5Mistral AIMeets constraints$4,242$4,242$1.5$7.5262K
Claude Sonnet 5.5AnthropicMeets constraints$4,581cached$5,656$2$101M
GPT-6.2 SolOpenAIMeets constraints$4,581cached$5,656$2$101.05M
Gemini 4 NeonGoogleMeets constraints$6,872cached$8,484$3$151.05M
Claude Opus 5.5AnthropicMeets constraints$9,163cached$11,312$4$201M
Gemini 4 CarbonGoogleMeets constraints$9,163cached$11,312$4$201.05M
GPT-6.2 Astra ProOpenAIMeets constraints$18,325cached$22,624$8$401.05M

Assumptions behind the total

  • 8,000 input tokens per query: schema, table descriptions and the question.
  • 4,000 output tokens per query: the SQL, an explanation and validation notes.
  • 70% cache hit rate on the stable schema prefix.
  • 1% retry rate.
  • No modality or context floor beyond the catalog's recorded limits.

Every figure is an estimate from these assumptions and list prices. It is not a quote, and it excludes taxes, credits and negotiated discounts.

Hard constraints

  • No hard constraint beyond recorded limits

The ranking question is different from the cost question. The task guide scores models on recorded price, context and output limits.

Read the coding task guide

Sensitivity: which assumption moves the bill

All seven rows use GLM 5.3 Flash's unit prices and change one assumption at a time. The largest move comes from “Calls −30%” at $17.56.

ScenarioWhat changesMonthlyChange
Calls −30%Volume falls to 70% of the assumption$40.97−$17.56
Calls +30%Volume rises to 130% of the assumption$76.08+$17.56
No cacheCache hit rate 0%$61.69+$3.17
Cache 50%Half of input tokens hit the cached price$59.43+$0.905
Cache 80%Most input tokens hit the cached price$58.07−$0.4525
No retriesRetry rate 0%$57.94−$0.5794
Retries 5%Retry rate 5%$60.84+$2.32

SQL generation: questions

+What does a SQL generation cost per month?

$58.52 per month on GLM 5.3 Flash under the assumptions on this page (100,000 queries per month, 8,000 input and 4,000 output tokens per call). Without cache pricing the same workload is $61.69. Both figures are estimates from list prices, not a negotiated quote.

+What assumptions drive this estimate?

The page assumes 100,000 queries per month, 8,000 input tokens and 4,000 output tokens per call, a 70% cache hit rate and a 1% retry rate. These are example assumptions, not measured traffic. Change them in the cost calculator or edit the downloadable JSON template.

+Which model is cheapest for a SQL generation?

GLM 5.3 Flash (Z.ai) totals $58.52 per month at $0.0356 per 1M input tokens and $0.0815 per 1M output tokens. 30 of 30 recorded models meet the constraints. The ranking uses recorded list prices only, not answer quality or latency.

+Which assumption changes the bill the most?

Across the seven sensitivity scenarios, “Calls −30%” moves the monthly total by $17.56 (volume falls to 70% of the assumption). The full sensitivity table is on this page, and the ±30% volume range is shown next to the headline answer.

+What is not included in this estimate?

Batch discounts, negotiated rates, credits, taxes and failed-request waste beyond the stated retry rate are not included. Answer quality, latency, throughput, rate limits, region and retention are not measured in this release. Some vendors publish batch pricing, but this page uses standard list prices so every model is comparable.

+How can I price my own volume?

Open the cost calculator with this workload pre-filled, or download the JSON template and CSV table from this page. The public API at /api/public/v1/workloads/sql-generation returns the same assumptions and monthly totals as JSON.

Cite this page

LLMCostBot. "What a SQL generation costs per month (December 2026)". Prices and limits verified 2026-12-02. https://llmcostbot.com/en/workloads/sql-generation (CC BY 4.0).

Data is licensed under CC BY 4.0. Keep the link and the verification date when you reuse it.