Gemini · Fast / Budget · 1,000K context window
$0.0113 per call at 1,500 input / 1,000 output tokens.
Per call
$0.0113
10K calls/mo
$112.5
Cache savings
75% off input
Batch savings
50% off all
Adjust token counts, volume, and discount toggles to model your sql generation spend. Pricing updated weekly.
Call Gemini 3.5 Flash with the Google Generative AI SDK:
import google.generativeai as genai
model = genai.GenerativeModel("gemini-3.5-flash")
response = model.generate_content("Your prompt here")
# Cost: ~$0.0113 per call at standard rates
# Input: $1.50/MTok
# Output: $9.00/MTokPer-call cost for all models scoring 50+ on sql generation benchmarks. Hover for details.
Cheapest viable option: Claude Sonnet 5 at $0.0130/call (-16% less, 93/100 quality).
| Direction | $/MTok | Tokens per call |
|---|---|---|
| Input | $1.50 | 1,500 |
| Output | $9.00 | 1,000 |
Caching drops input cost from $1.50 to $0.38/MTok. For repeated system prompts, that saves $0.001687 per call.
Submit requests asynchronously and receive 50% off all token costs. This works best for offline pipelines where latency requirements are flexible.
| Monthly volume | Cost per call | Standard monthly | Cached monthly | You save with caching |
|---|---|---|---|---|
| 10,000 calls | $0.0113 | $112.5 | $95.63 | $16.88 |
| 50,000 calls | $0.0113 | $562.5 | $478.13 | $84.38 |
| 100,000 calls | $0.0113 | $1,125 | $956.25 | $168.75 |
| 500,000 calls | $0.0113 | $5,625 | $4,781.25 | $843.75 |
| 1,000,000 calls | $0.0113 | $11,250 | $9,562.5 | $1,687.5 |
Consider alternatives for sql generation
Scores 68/100 (rank #7 of 14). Better options exist at similar price points for sql generation.
Top-ranked: Claude Fable 5 (96/100) at $0.0650/call
Gemini 3.5 Flash scores by task type. SQL Generation highlighted.
| Task type | Confidence score | Rank out of 14 |
|---|---|---|
| Classification | 92/100 | #1 |
| Extraction | 90/100 | #1 |
| Summarization | 85/100 | #3 |
| Q&A | 84/100 | #5 |
| Code Generation(current page) | 68/100 | #7 |
| Code Review | 65/100 | #6 |
| Reasoning | 60/100 | #6 |
| Creative Writing | 55/100 | #6 |
9 models score 80+ on sql generation benchmarks, sorted by input rate. Cheapest: Claude Sonnet 5 (-16% less, 93/100 quality).
| Model | Provider | Input $/MTok | Output $/MTok | Quality | Per call | vs Gemini |
|---|---|---|---|---|---|---|
| Claude Sonnet 5 | Claude | $2.00 | $10.00 | 93/100 | $0.0130 | 16% more |
| Gemini 3.1 Pro | Gemini | $2.00 | $12.00 | 86/100 | $0.0150 | 33% more |
| GPT 5.4 | GPT | $2.50 | $15.00 | 84/100 | $0.0187 | 67% more |
| GPT 5.6 Terra | GPT | $2.50 | $15.00 | 86/100 | $0.0187 | 67% more |
| Claude Sonnet 4.6 | Claude | $3.00 | $15.00 | 92/100 | $0.0195 | 73% more |
| Claude Opus 4.8 | Claude | $5.00 | $25.00 | 95/100 | $0.0325 | 189% more |
| GPT 5.5 | GPT | $5.00 | $30.00 | 91/100 | $0.0375 | 233% more |
| GPT 5.6 Sol | GPT | $5.00 | $30.00 | 94/100 | $0.0375 | 233% more |
| Claude Fable 5 | Claude | $10.00 | $50.00 | 96/100 | $0.0650 | 478% more |
Provider
Gemini
Tier
Fast / Budget
Context
1,000K tokens
Released
May 2026
| Model | Tier | Input $/MTok | Output $/MTok | Context |
|---|---|---|---|---|
| Gemini 3.1 Pro | Mid-tier | $2.00 | $12.00 | 1,000K |
| Gemini 3 Flash | Fast / Budget | $0.50 | $3.00 | 1,000K |
| Gemini 3.5 Flash-Lite | Fast / Budget | $0.25 | $1.50 | 1,000K |
You can compare Gemini 3.5 Flash head-to-head against any other model on our model comparison pages, or track how pricing has changed over time on the pricing history tracker.
See how Gemini 3.5 Flash costs change across different workload types.
Code Generation
$0.0390/call
Unit Test Generation
$0.0495/call
API Generation
$0.0585/call
Code Refactoring
$0.0420/call
Code Review
$0.0255/call
PR Review
$0.0390/call
Security Review
$0.0315/call
Bug Detection
$0.0255/call
Document Summarization
$0.0240/call
PDF Summarization
$0.0360/call
Meeting Notes
$0.0300/call
Email Summarization
$0.009000/call
Chatbot
$0.0120/call
RAG Pipeline
$0.0225/call
Customer Support Bot
$0.0135/call
FAQ Bot
$0.009450/call
Data Extraction
$0.0150/call
JSON Extraction
$0.0117/call
Invoice Parsing
$0.008400/call
Resume Parsing
$0.0110/call
Chain of Thought
$0.0495/call
Legal Analysis
$0.0510/call
Math Reasoning
$0.0292/call
Financial Analysis
$0.0480/call
Content Moderation
$0.001650/call
Sentiment Analysis
$0.001650/call
Categorization
$0.002550/call
Intent Detection
$0.001350/call
Copywriting
$0.0188/call
Blog Writing
$0.0735/call
Marketing Copy
$0.0282/call
Product Descriptions
$0.0143/call
$0.0113 per call at 1,500 input / 1,000 output tokens.
Scores 68/100, rank #7 of 14 models. Top-ranked: Claude Fable 5 at 96/100.
Claude Sonnet 5 scores 93/100 quality at $2.00/$10.00 per MTok. That is -16% less than Gemini 3.5 Flash per call.
Three strategies: prompt caching (75% off input), batch API (50% off all tokens), prompt optimization. Combined: $0.0113 drops to about $0.001406 per call.
Gemini also offers: Gemini 3.1 Pro at $2.00/$12.00, Gemini 3 Flash at $0.50/$3.00, Gemini 3.5 Flash-Lite at $0.25/$1.50.
1,000K tokens total. Typical sql generation calls use 1,500 plus 1,000 tokens, well within limits.
This calculator estimates costs based on published rates only. Connect your API usage to see where your money goes and which models drive your spend.