Home / Tasks / Write a SQL query

How much does it cost to write a SQL query with AI?

Between 0.03¢ (DeepSeek V4.1 Flash) and 5.5¢ (Claude Fable 5.1) among popular models. The median across all 336 models is 0.22¢.

Cheapest popular0.03¢
Median0.22¢
Priciest popular5.5¢
1,000 tasks, cheapest$0.32
1,000 tasks, median$2.16
Models priced336

Full ranking: 336 models

Sorted by cost. Click a column to sort by quality or tokens.

#ModelCost per taskWebDev scoreTokens in / outBasis
1S
SummarizeScaledown
<0.01¢$0.0071 / 1,000
-177 / 2,630estimated
2S
ExtractScaledown
<0.01¢$0.0071 / 1,000
-177 / 2,630estimated
3OpenAI logo
gpt-oss-20bOpenAI
<0.01¢$0.04 / 1,000
1317126 / 459estimated best value
4Mistral logo
Mistral NemoMistral
<0.01¢$0.10 / 1,000
-121 / 3,158estimated
5S
Llama 3 8B LunarisSao10K
0.01¢$0.14 / 1,000
-177 / 2,630estimated
6OpenAI logo
gpt-oss-safeguard-20bOpenAI
0.01¢$0.15 / 1,000
-126 / 459estimated
7Google logo
Gemma 3 4BGoogle
0.02¢$0.17 / 1,000
1303135 / 1,589estimated
8I
Ling 3.0 FlashInclusionai
0.02¢$0.17 / 1,000
-176 / 2,629estimated
9OpenAI logo
GPT-5 NanoOpenAI
0.02¢$0.19 / 1,000
1338126 / 459estimated best value
10N
Nex-N2.5-MiniNex Agi
0.02¢$0.22 / 1,000
-145 / 2,129estimated
11Meta logo
Llama 3.1 8B InstructMeta
0.02¢$0.22 / 1,000
1211175 / 2,626estimated
12Google logo
Gemma 3 12BGoogle
0.02¢$0.25 / 1,000
1342135 / 1,589estimated best value
13Mistral logo
Mistral Small 3Mistral
0.03¢$0.26 / 1,000
1274121 / 3,158estimated
14R
Reka EdgeRekaai
0.03¢$0.28 / 1,000
-175 / 2,626estimated
15OpenAI logo
gpt-oss-120bOpenAI
0.03¢$0.29 / 1,000
1352126 / 459estimated best value
16IBM logo
Granite 4.0 MicroIBM
0.03¢$0.30 / 1,000
-175 / 2,626estimated
17G
MythoMax 13BGryphe
0.03¢$0.30 / 1,000
-177 / 2,630estimated
18DeepSeek logo
DeepSeek V4.1 FlashDeepSeek
0.03¢$0.32 / 1,000
1618145 / 2,129measured best value
19I
Mercury 2.5Inception
0.03¢$0.32 / 1,000
-140 / 2,117estimated
20Z.ai logo
GLM 5.3 FlashZ.ai
0.03¢$0.33 / 1,000
1606128 / 1,596measured
21OpenAI logo
GPT-4.1 NanoOpenAI
0.03¢$0.33 / 1,000
1322126 / 782estimated
22P
Laguna XS 2.1Poolside
0.03¢$0.33 / 1,000
-180 / 2,637estimated
23Mistral logo
Ministral 3 3B 2512Mistral
0.03¢$0.33 / 1,000
-121 / 3,158estimated
24Meta logo
Muse Spark 1.3 ContributorMeta
0.03¢$0.33 / 1,000
-128 / 1,596estimated
25Meta logo
Muse Spark 1.2 ContributorMeta
0.03¢$0.33 / 1,000
-128 / 1,596estimated
26R
Reka Flash 3Rekaai
0.03¢$0.33 / 1,000
-128 / 1,596estimated
27Alibaba Qwen logo
Qwen3.7 FlashAlibaba Qwen
0.03¢$0.35 / 1,000
-177 / 2,630estimated
28Google logo
Gemma 4 26B A4B Google
0.04¢$0.37 / 1,000
1360135 / 1,589estimated
29Amazon logo
Nova Micro 1.0Amazon
0.04¢$0.37 / 1,000
-171 / 2,618estimated
30Microsoft logo
Phi 4Microsoft
0.04¢$0.38 / 1,000
1256175 / 2,626estimated
31I
Schematron V2 TurboInference Net
0.04¢$0.40 / 1,000
-177 / 2,631estimated
32Cohere logo
Command R7B (12-2024)Cohere
0.04¢$0.40 / 1,000
-174 / 2,624estimated
33DeepSeek logo
DeepSeek V4 Flash 0423DeepSeek
0.04¢$0.40 / 1,000
1581145 / 2,129estimated
34OpenAI logo
GPT-6 Luna ProOpenAI
0.04¢$0.40 / 1,000
-126 / 782estimated
35OpenAI logo
GPT-6 LunaOpenAI
0.04¢$0.40 / 1,000
1578126 / 782measured
36Alibaba Qwen logo
Qwen3.5-9BAlibaba Qwen
0.04¢$0.41 / 1,000
-177 / 2,630estimated
37U
Solar Mini 4Upstage
0.04¢$0.43 / 1,000
-144 / 2,127estimated
38Tencent logo
Hy-MT2-1.8BTencent
0.05¢$0.47 / 1,000
-177 / 2,630estimated
39I
Ling 3.0 Flash VLInclusionai
0.05¢$0.48 / 1,000
-176 / 2,629estimated
40OpenAI logo
GPT-4o-miniOpenAI
0.05¢$0.49 / 1,000
-126 / 782estimated
41OpenAI logo
GPT-4o-mini (2024-07-18)OpenAI
0.05¢$0.49 / 1,000
1318126 / 782estimated
42P
Laguna S 2.1Poolside
0.05¢$0.49 / 1,000
-180 / 2,637estimated
43StepFun logo
Step 3.5 FlashStepFun
0.05¢$0.49 / 1,000
1393127 / 1,594estimated
44Mistral logo
Ministral 3 8B 2512Mistral
0.05¢$0.49 / 1,000
-121 / 3,158estimated
45Meta logo
Llama Guard 4 12BMeta
0.05¢$0.50 / 1,000
-175 / 2,626estimated
46U
Solar Pro 4Upstage
0.05¢$0.52 / 1,000
1371130 / 1,413estimated
47Meta logo
Llama 3.2 1B InstructMeta
0.05¢$0.53 / 1,000
1111175 / 2,626estimated
48NVIDIA logo
Nemotron 3.5 LightningNVIDIA
0.05¢$0.54 / 1,000
1351178 / 2,633estimated
49IBM logo
Granite 4.2 8BIBM
0.05¢$0.54 / 1,000
1290145 / 2,130estimated
50ByteDance logo
UI-TARS 7B ByteDance
0.05¢$0.54 / 1,000
-175 / 2,626estimated
51N
Nex-N2.5-ProNex Agi
0.05¢$0.54 / 1,000
-145 / 2,129estimated
52Alibaba Qwen logo
Qwen2.5 7B InstructAlibaba Qwen
0.05¢$0.54 / 1,000
-177 / 2,630estimated
53NVIDIA logo
Nemotron 3.5 Content SafetyNVIDIA
0.06¢$0.56 / 1,000
-178 / 2,633estimated
54Google logo
Gemma 3 27BGoogle
0.06¢$0.57 / 1,000
1366135 / 1,589estimated
55ByteDance Seed logo
Seed-2.0-MiniByteDance Seed
0.06¢$0.58 / 1,000
-132 / 1,422estimated
56I
Ling 3.1 FlashInclusionai
0.06¢$0.60 / 1,000
-176 / 2,629estimated
57I
Schematron V2 SmallInference Net
0.06¢$0.61 / 1,000
-177 / 2,631estimated
58Amazon logo
Nova Lite 1.0Amazon
0.06¢$0.64 / 1,000
1260171 / 2,618estimated
59NVIDIA logo
Nemotron 3 Nano 30B A3BNVIDIA
0.06¢$0.64 / 1,000
1314178 / 2,633estimated
60Z.ai logo
GLM 4.7 FlashZ.ai
0.06¢$0.65 / 1,000
1364128 / 1,596estimated
61Google logo
Gemini 2.5 Flash LiteGoogle
0.06¢$0.65 / 1,000
1375135 / 1,589estimated
62NVIDIA logo
Nemotron 3 SuperNVIDIA
0.07¢$0.65 / 1,000
1360133 / 1,426estimated
63Alibaba Qwen logo
Qwen3 14BAlibaba Qwen
0.07¢$0.65 / 1,000
-177 / 2,630estimated
64DeepSeek logo
DeepSeek V4 Flash 0731DeepSeek
0.07¢$0.65 / 1,000
-145 / 2,129estimated
65Mistral logo
Ministral 3 14B 2512Mistral
0.07¢$0.66 / 1,000
-121 / 3,158estimated
66Google logo
Gemma 4 31BGoogle
0.07¢$0.66 / 1,000
1367135 / 1,589estimated
67Alibaba Qwen logo
Qwen3.5-FlashAlibaba Qwen
0.07¢$0.70 / 1,000
1244177 / 2,630estimated
68C
UncensoredCognitivecomputations
0.07¢$0.70 / 1,000
-278 / 719estimated
69P
Ternary Bonsai 2 27BPrism Ml
0.07¢$0.72 / 1,000
-132 / 1,420estimated
70T
Skyfall 36B V2Thedrummer
0.07¢$0.73 / 1,000
-278 / 719estimated
71Xiaomi logo
MiMo-V2.6-ProXiaomi
0.07¢$0.74 / 1,000
1625274 / 708estimated best value
72Xiaomi logo
MiMo-V2.5-ProXiaomi
0.07¢$0.74 / 1,000
1481274 / 708estimated
73MiniMax logo
MiniMax M2.5MiniMax
0.07¢$0.74 / 1,000
1386272 / 702estimated
74Alibaba Qwen logo
Qwen3 Coder 30B A3B InstructAlibaba Qwen
0.07¢$0.75 / 1,000
-177 / 2,630estimated
75Alibaba Qwen logo
Qwen3 32BAlibaba Qwen
0.08¢$0.75 / 1,000
1347177 / 2,630estimated
76Xiaomi logo
MiMo-V2.6-FlashXiaomi
0.08¢$0.76 / 1,000
1634175 / 2,626estimated best value
77Xiaomi logo
MiMo-V2.5Xiaomi
0.08¢$0.76 / 1,000
1438175 / 2,626estimated
78MiniMax logo
MiniMax M2MiniMax
0.08¢$0.79 / 1,000
1297272 / 702estimated
79Tencent logo
Hy-MT2-30B-A3BTencent
0.08¢$0.79 / 1,000
-177 / 2,630estimated
80Tencent logo
Hy-MT2-7BTencent
0.08¢$0.79 / 1,000
-177 / 2,630estimated
81Mistral logo
Mistral Small 3.2 24BMistral
0.08¢$0.80 / 1,000
1356121 / 3,158estimated
82ByteDance Seed logo
Seed 1.6 FlashByteDance Seed
0.08¢$0.80 / 1,000
-177 / 2,630estimated
83Alibaba Qwen logo
Qwen3 30B A3B Instruct 2507Alibaba Qwen
0.08¢$0.80 / 1,000
1382177 / 2,630estimated
84Meta logo
Llama 4 ScoutMeta
0.08¢$0.81 / 1,000
1322175 / 2,626estimated
85MiniMax logo
MiniMax-01MiniMax
0.08¢$0.83 / 1,000
-272 / 702estimated
86S
Llama 3.1 Euryale 70B v2.2Sao10K
0.08¢$0.83 / 1,000
-272 / 702estimated
87Anthropic logo
Claude Haiku 5.5Anthropic
0.08¢$0.84 / 1,000
1585182 / 1,650measured
88Meta logo
Llama 3.3 70B InstructMeta
0.09¢$0.86 / 1,000
1318175 / 2,626estimated
89U
Solar Pro 3Upstage
0.09¢$0.87 / 1,000
-130 / 1,413estimated
90Meta logo
Llama 3.2 3B InstructMeta
0.09¢$0.88 / 1,000
1167175 / 2,626estimated
91Tencent logo
Hy3Tencent
0.09¢$0.90 / 1,000
1506182 / 1,650estimated
92DeepSeek logo
DeepSeek V3.2 ExpDeepSeek
0.09¢$0.91 / 1,000
1272145 / 2,129estimated
93DeepSeek logo
DeepSeek V4 Pro 0423DeepSeek
0.09¢$0.92 / 1,000
1582145 / 2,129estimated
94MiniMax logo
MiniMax M3MiniMax
0.09¢$0.92 / 1,000
1482272 / 702measured
95MiniMax logo
MiniMax M2.7MiniMax
0.09¢$0.92 / 1,000
1399272 / 702estimated
96MiniMax logo
MiniMax M2-herMiniMax
0.09¢$0.92 / 1,000
-272 / 702estimated
97MiniMax logo
MiniMax M2.1MiniMax
0.09¢$0.92 / 1,000
1384272 / 702estimated
98M
LongCat 2.0Meituan
0.09¢$0.93 / 1,000
-274 / 707estimated
99DeepSeek logo
DeepSeek V3.2DeepSeek
0.09¢$0.93 / 1,000
1362145 / 2,129estimated
100OpenAI logo
GPT-5.1-Codex-MiniOpenAI
0.09¢$0.95 / 1,000
1244126 / 459estimated
101OpenAI logo
GPT-5 MiniOpenAI
0.09¢$0.95 / 1,000
1390126 / 459estimated
102Mistral logo
Voxtral Small 24B 2507Mistral
0.10¢$0.96 / 1,000
-121 / 3,158estimated
103OpenAI logo
GPT-5.6 Luna ProOpenAI
0.10¢$0.96 / 1,000
-126 / 782estimated
104OpenAI logo
GPT-5.6 LunaOpenAI
0.10¢$0.96 / 1,000
1519126 / 782estimated
105Perplexity logo
SonarPerplexity
0.10¢$0.97 / 1,000
-272 / 702estimated
106N
Hermes 3 405B InstructNous Research
0.10¢$0.98 / 1,000
-274 / 708estimated
107OpenAI logo
GPT-5.4 NanoOpenAI
0.10¢$1.00 / 1,000
1401126 / 782estimated
108Tencent logo
Hy3 previewTencent
0.10¢$1.02 / 1,000
1357182 / 1,650estimated
109NVIDIA logo
Nemotron 3.5 Super VLNVIDIA
0.11¢$1.07 / 1,000
-178 / 2,633estimated
110M
Morph V3 FastMorph
0.11¢$1.08 / 1,000
-276 / 712estimated
111I
Mercury 2Inception
0.11¢$1.08 / 1,000
1171127 / 1,398estimated
112R
Relace Apply 3Relace
0.11¢$1.11 / 1,000
-272 / 702estimated
113P
Perceptron Mk1Perceptron
0.11¢$1.11 / 1,000
-276 / 712estimated
114Alibaba Qwen logo
Qwen2.5 72B InstructAlibaba Qwen
0.11¢$1.12 / 1,000
1303177 / 2,630estimated
115Meta logo
Llama 3.1 70B InstructMeta
0.11¢$1.12 / 1,000
1293175 / 2,626estimated
116Google logo
Gemma 2 27BGoogle
0.11¢$1.12 / 1,000
1290135 / 1,589estimated
117Liquid AI logo
LFM2.5-24B-A2BLiquid AI
0.11¢$1.12 / 1,000
-128 / 1,596estimated
118T
UnslopNemo 12BThedrummer
0.11¢$1.12 / 1,000
-178 / 2,633estimated
119Cohere logo
Command A+Cohere
0.11¢$1.14 / 1,000
-272 / 704estimated
120OpenAI logo
GPT-3.5 TurboOpenAI
0.12¢$1.24 / 1,000
-126 / 782estimated
121Alibaba Qwen logo
Qwen3.8 Omni FlashAlibaba Qwen
0.13¢$1.26 / 1,000
-177 / 2,630estimated
122Alibaba Qwen logo
Qwen3.8 FlashAlibaba Qwen
0.13¢$1.26 / 1,000
-177 / 2,630measured
123A
Trinity Large ThinkingArcee AI
0.13¢$1.29 / 1,000
1238122 / 1,576estimated
124DeepSeek logo
DeepSeek V4.1 Flash 1017DeepSeek
0.13¢$1.30 / 1,000
-145 / 2,129estimated
125OpenAI logo
GPT-4.1 MiniOpenAI
0.13¢$1.30 / 1,000
1383126 / 782estimated
126Alibaba Qwen logo
Qwen3 30B A3BAlibaba Qwen
0.13¢$1.34 / 1,000
1327177 / 2,630estimated
127A
Aion-RP 1.0 (8B)Aion Labs
0.14¢$1.35 / 1,000
-274 / 707estimated
128T
Cydonia 24B V4.1Thedrummer
0.14¢$1.37 / 1,000
-178 / 2,633estimated
129Z.ai logo
GLM 4.5 AirZ.ai
0.14¢$1.37 / 1,000
1373128 / 1,596estimated
130DeepSeek logo
DeepSeek V4 Flash Vision ExpDeepSeek
0.14¢$1.41 / 1,000
-145 / 2,129estimated
131Alibaba Qwen logo
Qwen3 235B A22B Instruct 2507Alibaba Qwen
0.15¢$1.46 / 1,000
1422177 / 2,630estimated
132Z.ai logo
GLM 4.6VZ.ai
0.15¢$1.47 / 1,000
1378128 / 1,596estimated
133ByteDance Seed logo
Seed 1.6ByteDance Seed
0.15¢$1.50 / 1,000
-276 / 714estimated
134Tencent logo
Hunyuan A13B InstructTencent
0.15¢$1.52 / 1,000
-177 / 2,630estimated
135Cohere logo
Command R (08-2024)Cohere
0.16¢$1.60 / 1,000
1250174 / 2,624estimated
136M
Morph V3 LargeMorph
0.16¢$1.60 / 1,000
-276 / 712estimated
137Alibaba Qwen logo
Qwen3 VL 30B A3B InstructAlibaba Qwen
0.16¢$1.60 / 1,000
-177 / 2,630estimated
138OpenAI logo
GPT-3.5 Turbo (older v0613)OpenAI
0.17¢$1.69 / 1,000
-126 / 782estimated
139MiniMax logo
MiniMax M1MiniMax
0.17¢$1.69 / 1,000
1364272 / 702estimated
140Microsoft logo
WizardLM-2 8x22BMicrosoft
0.17¢$1.74 / 1,000
-175 / 2,626estimated
141Meta logo
Llama 4 MaverickMeta
0.17¢$1.75 / 1,000
1327175 / 2,626estimated
142OpenAI logo
GPT-3.5 Turbo InstructOpenAI
0.18¢$1.75 / 1,000
-126 / 782estimated
143U
ReMM SLERP 13BUndi95
0.18¢$1.77 / 1,000
-177 / 2,630estimated
144Mistral logo
Mistral Small 3.1 24BMistral
0.18¢$1.80 / 1,000
1303121 / 3,158estimated
145Moonshot AI logo
Kimi K2 0711Moonshot AI
0.18¢$1.80 / 1,000
1418276 / 714estimated
146Amazon logo
Nova 2 LiteAmazon
0.18¢$1.81 / 1,000
1335268 / 693estimated
147M
Moondream 3 PreviewMoondream
0.18¢$1.84 / 1,000
-272 / 702estimated
148M
Moondream 3.1Moondream
0.18¢$1.84 / 1,000
-272 / 702estimated
149StepFun logo
Step 3.7 FlashStepFun
0.19¢$1.87 / 1,000
-137 / 1,598estimated
150Mistral logo
Mistral Small 4Mistral
0.19¢$1.91 / 1,000
-121 / 3,158estimated
151Mistral logo
SabaMistral
0.19¢$1.92 / 1,000
-121 / 3,158estimated
152ByteDance Seed logo
Seed 2.1 TurboByteDance Seed
0.19¢$1.92 / 1,000
-276 / 714estimated
153Moonshot AI logo
Kimi K2.5Moonshot AI
0.19¢$1.92 / 1,000
1437276 / 714estimated
154DeepSeek logo
DeepSeek V3DeepSeek
0.19¢$1.94 / 1,000
1358145 / 2,129estimated
155Meta logo
Muse Glimmer 30BMeta
0.19¢$1.95 / 1,000
-135 / 1,589estimated
156Moonshot AI logo
Kimi K2 0905Moonshot AI
0.20¢$1.95 / 1,000
1419276 / 714estimated
157N
Hermes 3 70B InstructNous Research
0.20¢$1.96 / 1,000
-175 / 2,626estimated
158Alibaba Qwen logo
Qwen3 VL 8B InstructAlibaba Qwen
0.20¢$2.02 / 1,000
-177 / 2,630estimated
159Z.ai logo
GLM 5.3 FlashXZ.ai
0.20¢$2.04 / 1,000
-128 / 1,596estimated
160M
Weaver (alpha)Mancer
0.20¢$2.04 / 1,000
-177 / 2,630estimated
161DeepSeek logo
DeepSeek V3.1DeepSeek
0.21¢$2.06 / 1,000
1417145 / 2,129estimated
162S
Llama 3.3 Euryale 70BSao10K
0.21¢$2.09 / 1,000
-177 / 2,630estimated
163Alibaba Qwen logo
Qwen-PlusAlibaba Qwen
0.21¢$2.10 / 1,000
-177 / 2,630estimated
164Alibaba Qwen logo
Qwen3 Coder NextAlibaba Qwen
0.21¢$2.13 / 1,000
-177 / 2,630estimated
165OpenAI logo
o4 Mini HighOpenAI
0.22¢$2.16 / 1,000
-126 / 459estimated
166OpenAI logo
o4 MiniOpenAI
0.22¢$2.16 / 1,000
1391126 / 459estimated
167OpenAI logo
o3 Mini HighOpenAI
0.22¢$2.16 / 1,000
1364126 / 459estimated
168OpenAI logo
o3 MiniOpenAI
0.22¢$2.16 / 1,000
1348126 / 459estimated
169DeepSeek logo
DeepSeek V3.1 TerminusDeepSeek
0.22¢$2.17 / 1,000
1416145 / 2,129estimated
170OpenAI logo
GPT-3.5 Turbo 16kOpenAI
0.22¢$2.21 / 1,000
-126 / 459estimated
171E
GlimpseElorian
0.23¢$2.27 / 1,000
-272 / 702estimated
172A
Aion 3.5 MiniAion Labs
0.23¢$2.34 / 1,000
-137 / 1,600estimated
173A
Aion-3.0-MiniAion Labs
0.23¢$2.34 / 1,000
-137 / 1,600estimated
174R
Relace SearchRelace
0.24¢$2.38 / 1,000
-272 / 702estimated
175N
Hermes 4 405BNous Research
0.24¢$2.40 / 1,000
-274 / 708estimated
176Google logo
Gemini 3.1 Flash LiteGoogle
0.24¢$2.42 / 1,000
-135 / 1,589estimated
177Google logo
Gemini 3.1 Flash Lite PreviewGoogle
0.24¢$2.42 / 1,000
1257135 / 1,589estimated
178Amazon logo
Nova Pro 1.0Amazon
0.24¢$2.43 / 1,000
1290268 / 693estimated
179DeepSeek logo
DeepSeek V3 0324DeepSeek
0.25¢$2.47 / 1,000
1395145 / 2,129estimated
180U
Pareto 26.10Unbiased
0.25¢$2.47 / 1,000
-273 / 704estimated
181Alibaba Qwen logo
Qwen3 Coder FlashAlibaba Qwen
0.26¢$2.60 / 1,000
-177 / 2,630estimated
182Moonshot AI logo
Kimi K2.6Moonshot AI
0.26¢$2.61 / 1,000
1510276 / 714estimated
183Alibaba Qwen logo
Qwen3.6 35B A3BAlibaba Qwen
0.27¢$2.66 / 1,000
-177 / 2,630estimated
184Alibaba Qwen logo
Qwen3.5-35B-A3BAlibaba Qwen
0.27¢$2.66 / 1,000
1254177 / 2,630estimated
185A
Aion-2.0Aion Labs
0.27¢$2.67 / 1,000
-137 / 1,600estimated
186Alibaba Qwen logo
Qwen3 VL 30B A3B ThinkingAlibaba Qwen
0.27¢$2.68 / 1,000
-177 / 2,630estimated
187Alibaba Qwen logo
Qwen3 Coder 480B A35BAlibaba Qwen
0.27¢$2.68 / 1,000
1275177 / 2,630estimated
188Alibaba Qwen logo
Qwen2.5 Coder 32B InstructAlibaba Qwen
0.27¢$2.75 / 1,000
1271177 / 2,630estimated
189Alibaba Qwen logo
Qwen2.5 VL 72B InstructAlibaba Qwen
0.28¢$2.77 / 1,000
-177 / 2,630estimated
190Mistral logo
Codestral 2508Mistral
0.29¢$2.88 / 1,000
-121 / 3,158estimated
191Alibaba Qwen logo
Qwen3 Next 80B A3B InstructAlibaba Qwen
0.29¢$2.91 / 1,000
1398177 / 2,630estimated
192Z.ai logo
GLM 4.5VZ.ai
0.29¢$2.95 / 1,000
1352128 / 1,596estimated
193Alibaba Qwen logo
Qwen3.6 FlashAlibaba Qwen
0.30¢$2.99 / 1,000
-177 / 2,630estimated
194Alibaba Qwen logo
Qwen3 Next 80B A3B ThinkingAlibaba Qwen
0.32¢$3.18 / 1,000
1369177 / 2,630estimated
195Z.ai logo
GLM 4.7Z.ai
0.32¢$3.23 / 1,000
1435128 / 1,596estimated
196Z.ai logo
GLM 4.6Z.ai
0.33¢$3.26 / 1,000
1341128 / 1,596estimated
197Alibaba Qwen logo
Qwen3.7 PlusAlibaba Qwen
0.34¢$3.42 / 1,000
1456177 / 2,630estimated
198Z.ai logo
GLM 4.5Z.ai
0.36¢$3.59 / 1,000
1411128 / 1,596estimated
199OpenAI logo
GPT-5.4 MiniOpenAI
0.36¢$3.61 / 1,000
1398126 / 782estimated
200T
Inkling SmallThinkingmachines
0.38¢$3.82 / 1,000
1409117 / 3,143estimated
201OpenAI logo
o3OpenAI
0.39¢$3.92 / 1,000
1432126 / 459estimated
202OpenAI logo
GPT-4.1OpenAI
0.39¢$3.92 / 1,000
1415126 / 459estimated
203Z.ai logo
GLM 5.2Z.ai
0.39¢$3.94 / 1,000
1605128 / 1,596estimated
204Google logo
Gemini 3.5 Flash LiteGoogle
0.40¢$4.01 / 1,000
1441135 / 1,589estimated
205Google logo
Gemini 2.5 FlashGoogle
0.40¢$4.01 / 1,000
1409135 / 1,589estimated
206Moonshot AI logo
Kimi K2 ThinkingMoonshot AI
0.41¢$4.10 / 1,000
-138 / 1,605estimated
207Alibaba Qwen logo
Qwen3.5 Plus 2026-02-15Alibaba Qwen
0.41¢$4.15 / 1,000
-177 / 2,630estimated
208A
Magnum v4 72BAnthracite Org
0.42¢$4.22 / 1,000
-274 / 708estimated
209DeepSeek logo
DeepSeek V4 Pro 0813DeepSeek
0.43¢$4.31 / 1,000
-145 / 2,129estimated
210W
Palmyra X5Writer
0.44¢$4.41 / 1,000
-274 / 708estimated
211xAI logo
Grok Build 0.1xAI
0.44¢$4.42 / 1,000
-1,372 / 1,522estimated
212StepFun logo
Step 5 PreviewStepFun
0.45¢$4.45 / 1,000
1565137 / 1,598estimated
213DeepSeek logo
R1 0528DeepSeek
0.46¢$4.65 / 1,000
1421145 / 2,129estimated
214P
Perceptron Mk1.5Perceptron
0.47¢$4.74 / 1,000
-118 / 3,147estimated
215OpenAI logo
GPT-5.1-Codex-MaxOpenAI
0.47¢$4.75 / 1,000
-126 / 459estimated
216OpenAI logo
GPT-5.1-CodexOpenAI
0.47¢$4.75 / 1,000
1337126 / 459estimated
217OpenAI logo
GPT-5OpenAI
0.47¢$4.75 / 1,000
1418126 / 459estimated
218Alibaba Qwen logo
Qwen3.5 Plus 2026-04-20Alibaba Qwen
0.48¢$4.79 / 1,000
-177 / 2,630estimated
219Mistral logo
Mistral Large 3 2512Mistral
0.48¢$4.80 / 1,000
1230121 / 3,158estimated
220Google logo
Gemini 3 Flash PreviewGoogle
0.48¢$4.83 / 1,000
1440135 / 1,589estimated
221OpenAI logo
GPT-6.1 Sol ProOpenAI
0.48¢$4.84 / 1,000
-126 / 459estimated
222OpenAI logo
GPT-6.1 SolOpenAI
0.48¢$4.84 / 1,000
1756126 / 459measured best value
223R
Beam 1.0 501B A23BReflection
0.49¢$4.90 / 1,000
1438135 / 1,589estimated
224OpenAI logo
GPT-4o (2024-11-20)OpenAI
0.49¢$4.90 / 1,000
-126 / 459estimated
225OpenAI logo
GPT-4o (2024-08-06)OpenAI
0.49¢$4.90 / 1,000
1336126 / 459estimated
226OpenAI logo
GPT-4oOpenAI
0.49¢$4.90 / 1,000
-126 / 459estimated
227Z.ai logo
GLM 5.1Z.ai
0.50¢$4.97 / 1,000
1508128 / 1,596estimated
228Alibaba Qwen logo
Qwen3 VL 235B A22B InstructAlibaba Qwen
0.50¢$5.03 / 1,000
1413177 / 2,630estimated
229Alibaba Qwen logo
Qwen3.6 PlusAlibaba Qwen
0.52¢$5.19 / 1,000
1462177 / 2,630estimated
230Z.ai logo
GLM 5Z.ai
0.52¢$5.24 / 1,000
1435128 / 1,596estimated
231Alibaba Qwen logo
Qwen3.6 27BAlibaba Qwen
0.53¢$5.30 / 1,000
-177 / 2,630estimated
232DeepSeek logo
R1DeepSeek
0.54¢$5.42 / 1,000
1398145 / 2,129estimated
233Anthropic logo
Claude Haiku 4.5Anthropic
0.55¢$5.47 / 1,000
1330182 / 1,057estimated
234Moonshot AI logo
Kimi K2.7 CodeMoonshot AI
0.55¢$5.47 / 1,000
1474138 / 1,605estimated
235Alibaba Qwen logo
Qwen3.5-122B-A10BAlibaba Qwen
0.55¢$5.52 / 1,000
1360177 / 2,630estimated
236xAI logo
Grok 4.3xAI
0.55¢$5.52 / 1,000
13581,372 / 1,522estimated
237xAI logo
Grok 4.20 Multi-AgentxAI
0.55¢$5.52 / 1,000
-1,372 / 1,522estimated
238xAI logo
Grok 4.20xAI
0.55¢$5.52 / 1,000
13761,372 / 1,522estimated
239Alibaba Qwen logo
Qwen3.8 27BAlibaba Qwen
0.58¢$5.83 / 1,000
1593177 / 2,630estimated
240U
Pareto 26.9Unbiased
0.60¢$5.96 / 1,000
-273 / 704estimated
241Google logo
Gemini 3.7 FlashGoogle
0.61¢$6.06 / 1,000
1591135 / 1,589estimated
242Google logo
Gemini 3.6 FlashGoogle
0.61¢$6.06 / 1,000
1538135 / 1,589estimated
243ByteDance Seed logo
Seed-2.0-LiteByteDance Seed
0.63¢$6.33 / 1,000
-118 / 3,148estimated
244Mistral logo
Devstral 2 2512Mistral
0.64¢$6.36 / 1,000
1196121 / 3,158estimated
245Mistral logo
Mistral Medium 3.1Mistral
0.64¢$6.36 / 1,000
1408121 / 3,158estimated
246Mistral logo
Mistral Medium 3Mistral
0.64¢$6.36 / 1,000
1387121 / 3,158estimated
247Z.ai logo
GLM 5V TurboZ.ai
0.65¢$6.54 / 1,000
1402128 / 1,596estimated
248Z.ai logo
GLM 5 TurboZ.ai
0.65¢$6.54 / 1,000
-128 / 1,596estimated
249OpenAI logo
GPT-5.2-CodexOpenAI
0.66¢$6.65 / 1,000
1339126 / 459estimated
250OpenAI logo
GPT-5.2 ChatOpenAI
0.66¢$6.65 / 1,000
1476126 / 459estimated
251Google logo
Gemini 3.8 FlashGoogle
0.67¢$6.67 / 1,000
1585135 / 1,589measured
252Mistral logo
Mistral Large 4Mistral
0.67¢$6.68 / 1,000
1542121 / 3,158measured
253Alibaba Qwen logo
Qwen3.5-27BAlibaba Qwen
0.69¢$6.88 / 1,000
1358177 / 2,630estimated
254Meta logo
Muse Spark OpenMeta
0.69¢$6.92 / 1,000
1511135 / 1,589estimated
255Meta logo
Muse Spark 1.3Meta
0.69¢$6.92 / 1,000
1658135 / 1,589estimated
256Meta logo
Muse Spark 1.2Meta
0.69¢$6.92 / 1,000
1534135 / 1,589estimated
257Meta logo
Muse Spark 1.1Meta
0.69¢$6.92 / 1,000
1542135 / 1,589estimated
258Xiaomi logo
MiMo-V2.6-Pro-UltraSpeedXiaomi
0.74¢$7.35 / 1,000
-274 / 708estimated
259OpenAI logo
GPT-4o (2024-05-13)OpenAI
0.75¢$7.51 / 1,000
1346126 / 459estimated
260NVIDIA logo
Nemotron 3 UltraNVIDIA
0.76¢$7.64 / 1,000
1426119 / 3,152estimated
261Z.ai logo
GLM 5.3Z.ai
0.77¢$7.67 / 1,000
1621128 / 1,596estimated
262Cohere logo
Command ACohere
0.77¢$7.72 / 1,000
1354272 / 704estimated
263Cohere logo
Command R+ (08-2024)Cohere
0.77¢$7.72 / 1,000
1276272 / 704estimated
264OpenAI logo
GPT-5.1OpenAI
0.80¢$7.98 / 1,000
1396126 / 782estimated
265Tencent logo
Hy4 previewTencent
0.80¢$8.00 / 1,000
1632121 / 3,158estimated
266OpenAI logo
GPT-6 Sol ProOpenAI
0.81¢$8.07 / 1,000
-126 / 782estimated
267OpenAI logo
GPT-6 SolOpenAI
0.81¢$8.07 / 1,000
1683126 / 782estimated
268Perplexity logo
Sonar Reasoning ProPerplexity
0.88¢$8.82 / 1,000
-182 / 1,057estimated
269Perplexity logo
Sonar Deep ResearchPerplexity
0.88¢$8.82 / 1,000
-182 / 1,057estimated
270Alibaba Qwen logo
Qwen3 235B A22B Thinking 2507Alibaba Qwen
0.93¢$9.28 / 1,000
1400177 / 2,630estimated
271Amazon logo
Nova Premier 1.0Amazon
0.93¢$9.33 / 1,000
-268 / 693estimated
272ByteDance Seed logo
Seed-2.0-CodeByteDance Seed
0.95¢$9.50 / 1,000
-118 / 3,148estimated
273Alibaba Qwen logo
Qwen3.5 397B A17BAlibaba Qwen
0.96¢$9.56 / 1,000
1400177 / 2,630estimated
274OpenAI logo
GPT-5.6 Terra ProOpenAI
0.96¢$9.64 / 1,000
-126 / 782estimated
275OpenAI logo
GPT-5.6 TerraOpenAI
0.96¢$9.64 / 1,000
1522126 / 782estimated
276Anthropic logo
Claude Sonnet 5.5Anthropic
1.1¢$10.93 / 1,000
1768182 / 1,057measured best value
277OpenAI logo
GPT-5.3-CodexOpenAI
1.1¢$11.17 / 1,000
1407126 / 782estimated
278OpenAI logo
GPT-5.2OpenAI
1.1¢$11.17 / 1,000
1417126 / 782estimated
279Perplexity logo
Sonar ProPerplexity
1.1¢$11.35 / 1,000
-272 / 702estimated
280xAI logo
Grok 4.7xAI
1.2¢$11.88 / 1,000
16391,372 / 1,522measured
281S
Fugu MaxSakana
1.2¢$11.88 / 1,000
-1,372 / 1,522estimated
282xAI logo
Grok 4.6xAI
1.2¢$11.88 / 1,000
16171,372 / 1,522estimated
283xAI logo
Grok 4.5xAI
1.2¢$11.88 / 1,000
15531,372 / 1,522estimated
284Alibaba Qwen logo
Qwen3.7 MaxAlibaba Qwen
1.2¢$11.90 / 1,000
1515177 / 2,630estimated
285OpenAI logo
GPT-5.4OpenAI
1.2¢$12.04 / 1,000
1464126 / 782estimated
286S
Sakana NamazuSakana
1.3¢$12.75 / 1,000
-121 / 3,158estimated
287A
Aion 3.5Aion Labs
1.3¢$12.80 / 1,000
-1,278 / 1,494estimated
288A
Aion-3.0Aion Labs
1.3¢$12.80 / 1,000
-1,278 / 1,494estimated
289T
InklingThinkingmachines
1.3¢$12.85 / 1,000
1414117 / 3,143estimated
290OpenAI logo
GPT Chat LatestOpenAI
1.4¢$14.40 / 1,000
-126 / 459estimated
291Z.ai logo
GLM 5.3 PrimeZ.ai
1.4¢$14.40 / 1,000
-128 / 1,596estimated
292OpenAI logo
GPT-4 TurboOpenAI
1.5¢$15.03 / 1,000
1324126 / 459estimated
293Alibaba Qwen logo
Qwen3.8 Max (0902)Alibaba Qwen
1.6¢$16.13 / 1,000
1674177 / 2,630estimated
294Alibaba Qwen logo
Qwen3.8 2.4T A95BAlibaba Qwen
1.6¢$16.13 / 1,000
-177 / 2,630estimated
295OpenAI logo
GPT-5.6 Sol ProOpenAI
1.6¢$16.14 / 1,000
-126 / 782estimated
296OpenAI logo
GPT-5.6 SolOpenAI
1.6¢$16.14 / 1,000
1616126 / 782estimated
297Anthropic logo
Claude Sonnet 4.5Anthropic
1.6¢$16.40 / 1,000
1394182 / 1,057estimated
298Anthropic logo
Claude Sonnet 5Anthropic
1.7¢$16.86 / 1,000
1540182 / 1,650estimated
299Mistral logo
Mistral Large 2407Mistral
1.9¢$19.19 / 1,000
1314121 / 3,158estimated
300Mistral logo
Mixtral 8x22B InstructMistral
1.9¢$19.19 / 1,000
-121 / 3,158estimated
301Mistral logo
Mistral LargeMistral
1.9¢$19.19 / 1,000
-121 / 3,158estimated
302Anthropic logo
Claude Opus 5.5Anthropic
2.2¢$21.87 / 1,000
1807182 / 1,057estimated best value
303Google logo
Gemini 3.5 FlashGoogle
2.4¢$23.63 / 1,000
1500135 / 2,603estimated
304Mistral logo
Mistral Medium 3.5Mistral
2.4¢$23.87 / 1,000
1264121 / 3,158estimated
305OpenAI logo
GPT-5.5OpenAI
2.4¢$24.09 / 1,000
1513126 / 782estimated
306OpenAI logo
GPT-6 AstraOpenAI
2.4¢$24.21 / 1,000
1777126 / 459estimated
307OpenAI logo
GPT-6 Astra ProOpenAI
2.4¢$24.21 / 1,000
-126 / 459estimated
308Anthropic logo
Claude Sonnet 4.6Anthropic
2.5¢$25.30 / 1,000
1523182 / 1,650estimated
309Google logo
Gemini 2.5 ProGoogle
2.6¢$26.20 / 1,000
1226135 / 2,603estimated
310Google logo
Gemini 2.5 Pro Preview 06-05Google
2.6¢$26.20 / 1,000
-135 / 2,603estimated
311Google logo
Gemini 4 ArgonGoogle
2.6¢$26.30 / 1,000
1678135 / 2,603estimated
312Anthropic logo
Claude Opus 4.5Anthropic
2.7¢$27.34 / 1,000
1494182 / 1,057estimated
313OpenAI logo
o1OpenAI
2.9¢$29.43 / 1,000
1402126 / 459estimated
314OpenAI logo
GPT-4OpenAI
3.1¢$31.32 / 1,000
1288126 / 459estimated
315Google logo
Gemini 3.1 Pro Preview Custom ToolsGoogle
3.2¢$31.51 / 1,000
-135 / 2,603estimated
316Google logo
Gemini 3.1 Pro PreviewGoogle
3.2¢$31.51 / 1,000
1447135 / 2,603measured
317Alibaba Qwen logo
Qwen3.8 Max PrimeAlibaba Qwen
3.2¢$32.27 / 1,000
-177 / 2,630estimated
318Moonshot AI logo
Kimi K3Moonshot AI
3.8¢$37.61 / 1,000
1655118 / 3,148estimated
319OpenAI logo
o3 ProOpenAI
3.9¢$39.24 / 1,000
-126 / 459estimated
320Perplexity logo
Sonar Pro SearchPerplexity
3.9¢$39.45 / 1,000
-135 / 2,603estimated
321Anthropic logo
Claude Opus 5Anthropic
4.2¢$42.16 / 1,000
1689182 / 1,650estimated
322Anthropic logo
Claude Opus 4.8Anthropic
4.2¢$42.16 / 1,000
1556182 / 1,650estimated
323Anthropic logo
Claude Opus 4.7Anthropic
4.2¢$42.16 / 1,000
1558182 / 1,650estimated
324Anthropic logo
Claude Opus 4.6Anthropic
4.2¢$42.16 / 1,000
1547182 / 1,650estimated
325F
Ember-1Fireworks
4.8¢$47.57 / 1,000
-118 / 3,148estimated
326Meta logo
Muse WonderMeta
5.3¢$52.60 / 1,000
1650135 / 2,603estimated
327Anthropic logo
Claude Fable 5.1Anthropic
5.5¢$54.67 / 1,000
1741182 / 1,057estimated
328Anthropic logo
Claude Fable 5Anthropic
5.5¢$54.67 / 1,000
1625182 / 1,057estimated
329OpenAI logo
GPT-5 ProOpenAI
5.7¢$56.97 / 1,000
-126 / 459estimated
330S
Fugu Ultra v2Sakana
7.9¢$78.77 / 1,000
-135 / 2,603estimated
331S
Fugu UltraSakana
7.9¢$78.77 / 1,000
-135 / 2,603estimated
332OpenAI logo
GPT-5.2 ProOpenAI
8.0¢$79.76 / 1,000
-126 / 459estimated
333Anthropic logo
Claude Opus 4.1Anthropic
8.2¢$82.00 / 1,000
1390182 / 1,057estimated
334OpenAI logo
GPT-5.5 ProOpenAI
8.6¢$86.40 / 1,000
-126 / 459estimated
335OpenAI logo
GPT-5.4 ProOpenAI
8.6¢$86.40 / 1,000
-126 / 459estimated
336OpenAI logo
o1-proOpenAI
29¢$294 / 1,000
-126 / 459estimated
Showing 100 of 336 models.

How the price is spread

Number of models per price band (log scale). Most models cluster in a narrow band; a few frontier and reasoning-heavy models cost 100x more.

<0.01¢0.01¢0.10¢1.0¢10¢0 models2 models0 models0 models1 models1 models4 models9 models36 models53 models37 models50 models45 models37 models23 models18 models12 models7 models0 models1 models

FAQ

How much does it cost to write a SQL query with AI?

On Oct 18, 2026 it costs from 0.03¢ with DeepSeek V4.1 Flash to 5.5¢ with Claude Fable 5.1 among popular models. The median of 336 models is 0.22¢ per task.

What is the cheapest AI to write a SQL query?

The cheapest model overall is Summarize at <0.01¢; the cheapest popular model is DeepSeek V4.1 Flash at 0.03¢. The best value among popular models (cheap and highly rated) is Claude Opus 5.5 at 2.2¢.

Why do reasoning models cost more for the same task?

Reasoning (thinking) tokens are billed as output tokens even though you never see them. On some tasks a model thinks for thousands of tokens before a short answer, which can multiply the cost.

How is the cost calculated?

A natural-language question turned into a SQL query for a 4-table schema, with a short explanation. We send the same prompt (66 words of input) to every measured model through OpenRouter with default settings and record the input, output and reasoning tokens it uses.