{"id":330,"date":"2026-09-24T00:01:54","date_gmt":"2026-09-23T16:01:54","guid":{"rendered":"https:\/\/qoraapi.com\/blog\/?page_id=330"},"modified":"2026-09-24T02:15:28","modified_gmt":"2026-09-23T18:15:28","slug":"ai-api-cost-calculator","status":"publish","type":"page","link":"https:\/\/qoraapi.com\/blog\/ai-api-cost-calculator\/","title":{"rendered":"AI API Cost Calculator: Compare GPT, Claude, Gemini &#038; DeepSeek Prices (2026)"},"content":{"rendered":"\n<style>\n.qapi-table{overflow-x:auto;margin:18px 0 22px;border:1px solid #e5e7eb;border-radius:12px}\n.qapi-table table{width:100%;border-collapse:collapse;font-size:14px;font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif}\n.qapi-table th{text-align:left;padding:10px 13px;background:#f9fafb;font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#6b7280;border-bottom:1px solid #e5e7eb;white-space:nowrap}\n.qapi-table td{padding:10px 13px;border-bottom:1px solid #e5e7eb;color:#111827;vertical-align:middle}\n.qapi-table tr:last-child td{border-bottom:0}\n.qapi-table td:first-child{font-weight:600;white-space:nowrap}\n.qapi-table th:nth-child(n+3),.qapi-table td:nth-child(n+3){text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}\n.qapi-cta{margin:26px 0;padding:22px;border-radius:14px;background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff;font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif}\n.qapi-cta strong{display:block;font-size:19px;font-weight:800;margin-bottom:7px;letter-spacing:-.01em}\n.qapi-cta p{margin:0 0 14px;font-size:14.5px;color:rgba(255,255,255,.93);line-height:1.6}\n.qapi-cta p:last-child{margin:0}\n.qapi-cta a{display:inline-block;background:#fff;color:#4f46e5;font-weight:700;font-size:14px;text-decoration:none;padding:11px 22px;border-radius:9px}\n.qapi-cta a:hover{background:#f5f3ff}\n@media (max-width:620px){.qapi-table table{font-size:13px}.qapi-table th,.qapi-table td{padding:8px 9px}.qapi-cta{padding:18px}}\n<\/style>\n\n<p>Every team building on AI APIs eventually asks the same question: <strong>what will this actually cost next month?<\/strong> The answer is not a single number, because the same workload can cost 150&times; more depending on which model you point it at.<\/p>\n\n<p>This calculator does the arithmetic for you. Enter your monthly token volume, set your prompt cache hit rate, and it prices your workload against every flagship model from OpenAI, Anthropic, Google and DeepSeek using current list rates.<\/p>\n\n<div class=\"qapi-tool\" id=\"qapi-tool\">\n<style>\n#qapi-tool{--qa-bg:#ffffff;--qa-fg:#111827;--qa-mut:#6b7280;--qa-line:#e5e7eb;--qa-soft:#f9fafb;--qa-acc:#4f46e5;--qa-acc-soft:#eef2ff;--qa-good:#059669;--qa-warn:#d97706;\nbox-sizing:border-box;background:var(--qa-bg);color:var(--qa-fg);border:1px solid var(--qa-line);border-radius:14px;padding:22px;margin:28px 0;font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:1.6}\n#qapi-tool *,#qapi-tool *::before,#qapi-tool *::after{box-sizing:border-box}\n#qapi-tool h3{margin:0 0 4px;font-size:19px;font-weight:700;color:var(--qa-fg);letter-spacing:-.01em}\n#qapi-tool .qa-h2{margin:0 0 4px;font-size:19px;line-height:1.35;font-weight:700;color:var(--qa-fg);letter-spacing:-.01em}#qapi-tool .qa-cap{margin:26px 0 10px;font-size:15px;line-height:1.35;font-weight:700;color:var(--qa-fg);text-transform:uppercase;letter-spacing:.04em}#qapi-tool h4{margin:26px 0 10px;font-size:15px;font-weight:700;color:var(--qa-fg);text-transform:uppercase;letter-spacing:.04em}\n#qapi-tool p{margin:0 0 14px;color:var(--qa-mut);font-size:14px}\n#qapi-tool .qa-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:14px;margin:18px 0}\n#qapi-tool .qa-f{display:flex;flex-direction:column;gap:6px}\n#qapi-tool label{font-size:12.5px;font-weight:600;color:var(--qa-mut);text-transform:uppercase;letter-spacing:.03em}\n#qapi-tool input[type=number]{width:100%;padding:10px 12px;font-size:16px;font-weight:600;color:var(--qa-fg);background:var(--qa-soft);border:1px solid var(--qa-line);border-radius:9px;font-family:inherit}\n#qapi-tool input[type=number]:focus{outline:2px solid var(--qa-acc);outline-offset:-1px;background:#fff}\n#qapi-tool input[type=range]{width:100%;accent-color:var(--qa-acc);margin:6px 0 0}\n#qapi-tool .qa-presets{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 4px}\n#qapi-tool .qa-preset{cursor:pointer;font:inherit;font-size:12.5px;font-weight:600;padding:7px 13px;border-radius:999px;border:1px solid var(--qa-line);background:var(--qa-soft);color:var(--qa-fg);transition:.15s}\n#qapi-tool .qa-preset:hover{border-color:var(--qa-acc);color:var(--qa-acc);background:var(--qa-acc-soft)}\n#qapi-tool .qa-preset.qa-on{background:var(--qa-acc);border-color:var(--qa-acc);color:#fff}\n#qapi-tool .qa-sum{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:20px 0 6px}\n#qapi-tool .qa-card{background:var(--qa-soft);border:1px solid var(--qa-line);border-radius:11px;padding:13px 15px}\n#qapi-tool .qa-card .qa-k{font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--qa-mut)}\n#qapi-tool .qa-card .qa-v{font-size:24px;font-weight:800;letter-spacing:-.02em;margin-top:3px;color:var(--qa-fg)}\n#qapi-tool .qa-card .qa-s{font-size:12.5px;color:var(--qa-mut);margin-top:1px}\n#qapi-tool .qa-hl .qa-v{color:var(--qa-good)}\n#qapi-tool .qa-scroll{overflow-x:auto;margin:10px 0 4px;border:1px solid var(--qa-line);border-radius:11px}\n#qapi-tool table{width:100%;border-collapse:collapse;font-size:13px;table-layout:auto}\n#qapi-tool th{text-align:left;padding:9px 8px;background:var(--qa-soft);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:var(--qa-mut);border-bottom:1px solid var(--qa-line);white-space:nowrap}\n#qapi-tool td{padding:9px 8px;border-bottom:1px solid var(--qa-line);vertical-align:middle}\n#qapi-tool tr:last-child td{border-bottom:0}\n#qapi-tool td.qa-n{font-weight:600;color:var(--qa-fg)}\n#qapi-tool td.qa-num{text-align:right;font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap}\n#qapi-tool tr.qa-win td{background:#ecfdf5}\n#qapi-tool tr.qa-win td.qa-num{color:var(--qa-good)}\n#qapi-tool .qa-pill{display:inline-block;font-size:10px;font-weight:700;padding:2px 6px;border-radius:999px;background:var(--qa-acc-soft);color:var(--qa-acc);margin-left:6px;vertical-align:1px;letter-spacing:.02em;white-space:nowrap}\n#qapi-tool .qa-pill.qa-pg{background:#ecfdf5;color:var(--qa-good)}\n#qapi-tool .qa-bar{height:7px;border-radius:4px;background:var(--qa-acc);min-width:2px;max-width:100%;display:block}\n#qapi-tool .qa-barwrap{width:60px;display:block}\n#qapi-tool .qa-note{font-size:12.5px;color:var(--qa-mut);margin:12px 0 0;padding-top:12px;border-top:1px solid var(--qa-line)}\n#qapi-tool .qa-src code{background:var(--qa-soft);padding:1px 5px;border-radius:4px;font-size:12px}\n@media (max-width:620px){\n#qapi-tool{padding:16px;font-size:14.5px}\n#qapi-tool th:last-child,#qapi-tool td:last-child{display:none}\n#qapi-tool td.qa-n{white-space:normal}\n#qapi-tool .qa-card .qa-v{font-size:21px}\n}\n#qapi-tool .qa-cta{margin:22px 0 0;padding:18px;border-radius:12px;background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff}\n#qapi-tool .qa-cta b{display:block;font-size:17px;font-weight:800;margin-bottom:5px;letter-spacing:-.01em}\n#qapi-tool .qa-cta span{display:block;font-size:13.5px;opacity:.92;margin-bottom:13px}\n#qapi-tool .qa-cta a{display:inline-block;background:#fff;color:#4f46e5;font-weight:700;font-size:14px;text-decoration:none;padding:10px 20px;border-radius:8px}\n#qapi-tool .qa-cta a:hover{background:#f5f3ff}\n#qapi-tool .qa-tog{display:inline-flex;border:1px solid var(--qa-line);border-radius:9px;overflow:hidden;margin:0 0 14px}\n#qapi-tool .qa-tog button{font:inherit;font-size:13px;font-weight:600;padding:8px 15px;border:0;background:#fff;color:var(--qa-mut);cursor:pointer}\n#qapi-tool .qa-tog button.qa-on{background:var(--qa-acc);color:#fff}\n#qapi-tool .qa-src{font-size:11.5px;color:var(--qa-mut);margin-top:10px}\n<\/style>\n\n<h2 class=\"qa-h2\">AI API Cost Calculator<\/h2>\n<p>Estimate your monthly spend across every major model, then see which one is cheapest for <em>your<\/em> token mix. Prices are official list rates per 1M tokens, verified September 2026.<\/p>\n\n<div class=\"qa-presets\" id=\"qa-presets\">\n<button type=\"button\" class=\"qa-preset qa-on\" data-in=\"50\" data-out=\"10\" data-cache=\"0\">Chatbot \/ support<\/button>\n<button type=\"button\" class=\"qa-preset\" data-in=\"300\" data-out=\"60\" data-cache=\"60\">RAG assistant<\/button>\n<button type=\"button\" class=\"qa-preset\" data-in=\"800\" data-out=\"150\" data-cache=\"70\">Coding agent<\/button>\n<button type=\"button\" class=\"qa-preset\" data-in=\"5000\" data-out=\"800\" data-cache=\"0\">Bulk \/ batch job<\/button>\n<\/div>\n\n<div class=\"qa-grid\">\n<div class=\"qa-f\"><label for=\"qa-in\">Input tokens \/ month (millions)<\/label><input type=\"number\" id=\"qa-in\" value=\"50\" min=\"0\" step=\"1\"><\/div>\n<div class=\"qa-f\"><label for=\"qa-out\">Output tokens \/ month (millions)<\/label><input type=\"number\" id=\"qa-out\" value=\"10\" min=\"0\" step=\"1\"><\/div>\n<div class=\"qa-f\"><label for=\"qa-cache\">Prompt cache hit rate &mdash; <span id=\"qa-cache-v\">0%<\/span><\/label><input type=\"range\" id=\"qa-cache\" min=\"0\" max=\"90\" value=\"0\" step=\"5\"><\/div>\n<\/div>\n\n<div class=\"qa-sum\">\n<div class=\"qa-card qa-hl\"><div class=\"qa-k\">Cheapest option<\/div><div class=\"qa-v\" id=\"qa-best\">&mdash;<\/div><div class=\"qa-s\" id=\"qa-best-s\">&mdash;<\/div><\/div>\n<div class=\"qa-card\"><div class=\"qa-k\">Your most expensive pick<\/div><div class=\"qa-v\" id=\"qa-worst\">&mdash;<\/div><div class=\"qa-s\" id=\"qa-worst-s\">&mdash;<\/div><\/div>\n<div class=\"qa-card\"><div class=\"qa-k\">Max monthly saving<\/div><div class=\"qa-v\" id=\"qa-save\">&mdash;<\/div><div class=\"qa-s\" id=\"qa-save-s\">&mdash;<\/div><\/div>\n<\/div>\n\n<div class=\"qa-tog\" id=\"qa-tog\">\n<button type=\"button\" class=\"qa-on\" data-scope=\"flagship\">Flagship only<\/button>\n<button type=\"button\" data-scope=\"all\">All models<\/button>\n<\/div>\n\n<h3 class=\"qa-cap\">Monthly cost by model<\/h3>\n<div class=\"qa-scroll\">\n<table id=\"qa-res\">\n<thead><tr><th>Model<\/th><th>Provider<\/th><th style=\"text-align:right\">In $\/1M<\/th><th style=\"text-align:right\">Out $\/1M<\/th><th style=\"text-align:right\">Monthly<\/th><th>Relative<\/th><\/tr><\/thead>\n<tbody><\/tbody>\n<\/table>\n<\/div>\n<p class=\"qa-src\">Billing model: <code>cost = input_M &times; (1 &minus; hit) &times; in_price + input_M &times; hit &times; cached_price + output_M &times; out_price<\/code>. Cache rates apply to input tokens only.<\/p>\n\n<div class=\"qa-cta\">\n<b>Cutting cost is step one. Cutting it without rewriting your code is step two.<\/b>\n<span>QoraAPI exposes every model above through a single OpenAI-compatible endpoint &mdash; swap the base URL, keep your code, and route each request to whichever model is cheapest for that task.<\/span>\n<a href=\"https:\/\/qoraapi.com\" rel=\"noopener\">See how QoraAPI works &rarr;<\/a>\n<\/div>\n\n<p class=\"qa-note\">List prices only. They exclude batch discounts (often 50% off), volume agreements, and regional uplifts. Providers change prices without notice &mdash; always confirm on the vendor&#8217;s own pricing page before you commit a budget.<\/p>\n<\/div>\n\n<script>\n(function(){\nvar M=[\n {n:\"GPT-6 Astra\",p:\"OpenAI\",i:10.00,c:1.00,o:50.00,t:\"flagship\"},\n {n:\"GPT-6 Sol\",p:\"OpenAI\",i:2.00,c:0.20,o:10.00,t:\"flagship\"},\n {n:\"GPT-6 Luna\",p:\"OpenAI\",i:0.10,c:0.01,o:0.50,t:\"flagship\"},\n {n:\"GPT-5.6 Sol\",p:\"OpenAI\",i:4.00,c:0.40,o:20.00,t:\"flagship\"},\n {n:\"GPT-5.6 Cyber\",p:\"OpenAI\",i:12.50,c:1.25,o:75.00,t:\"all\"},\n {n:\"GPT-5.3 Codex\",p:\"OpenAI\",i:1.75,c:0.175,o:14.00,t:\"all\"},\n {n:\"Fable 5.1\",p:\"Anthropic\",i:10.00,c:0.25,o:50.00,t:\"flagship\"},\n {n:\"Opus 5.5\",p:\"Anthropic\",i:4.00,c:0.20,o:20.00,t:\"flagship\"},\n {n:\"Sonnet 5\",p:\"Anthropic\",i:2.00,c:0.20,o:10.00,t:\"flagship\"},\n {n:\"Haiku 4.5\",p:\"Anthropic\",i:1.00,c:0.10,o:5.00,t:\"flagship\"},\n {n:\"Gemini 3.8 Flash\",p:\"Google\",i:0.75,c:0.075,o:3.75,t:\"flagship\"},\n {n:\"Gemini 3.5 Flash\",p:\"Google\",i:1.50,c:0.15,o:9.00,t:\"all\"},\n {n:\"Gemini 3.5 Flash-Lite\",p:\"Google\",i:0.30,c:0.03,o:2.50,t:\"all\"},\n {n:\"Gemini 3.1 Flash-Lite\",p:\"Google\",i:0.25,c:0.025,o:1.50,t:\"all\"},\n {n:\"Gemini 3.1 Pro\",p:\"Google\",i:2.00,c:0.20,o:12.00,t:\"all\"},\n {n:\"Gemini 2.5 Pro\",p:\"Google\",i:1.25,c:0.125,o:10.00,t:\"all\"},\n {n:\"Gemini 2.5 Flash\",p:\"Google\",i:0.30,c:0.03,o:2.50,t:\"all\"},\n {n:\"Gemini 2.5 Flash-Lite\",p:\"Google\",i:0.10,c:0.01,o:0.40,t:\"all\"},\n {n:\"DeepSeek V4.1 Flash (peak)\",p:\"DeepSeek\",i:0.30,c:0.006,o:1.20,t:\"flagship\"},\n {n:\"DeepSeek V4.1 Flash (off-peak)\",p:\"DeepSeek\",i:0.15,c:0.003,o:0.60,t:\"flagship\"},\n {n:\"DeepSeek V4 Pro (peak)\",p:\"DeepSeek\",i:1.32,c:0.044,o:3.96,t:\"all\"},\n {n:\"DeepSeek V4 Pro (off-peak)\",p:\"DeepSeek\",i:0.66,c:0.022,o:1.98,t:\"all\"}\n];\nvar scope=\"flagship\";\nvar $=function(id){return document.getElementById(id)};\nfunction money(v){if(v>=10000)return \"$\"+Math.round(v).toLocaleString(\"en-US\");if(v>=100)return \"$\"+v.toFixed(0);if(v>=10)return \"$\"+v.toFixed(1);return \"$\"+v.toFixed(2)}\nfunction calc(m,iM,oM,hit){return iM*(1-hit)*m.i + iM*hit*m.c + oM*m.o}\nfunction render(){\n var iM=parseFloat($(\"qa-in\").value)||0, oM=parseFloat($(\"qa-out\").value)||0;\n var hit=(parseFloat($(\"qa-cache\").value)||0)\/100;\n $(\"qa-cache-v\").textContent=Math.round(hit*100)+\"%\";\n var rows=M.filter(function(m){return scope===\"all\"||m.t===\"flagship\"})\n   .map(function(m){var c=calc(m,iM,oM,hit);return {m:m,c:c}})\n   .sort(function(a,b){return a.c-b.c});\n var max=rows.length?rows[rows.length-1].c:0, min=rows.length?rows[0].c:0;\n var tb=$(\"qa-res\").getElementsByTagName(\"tbody\")[0]; tb.innerHTML=\"\";\n rows.forEach(function(r,k){\n   var tr=document.createElement(\"tr\");\n   if(k===0)tr.className=\"qa-win\";\n   var pct=max>0?Math.max(2,(r.c\/max)*100):0;\n   var name=document.createTextNode(r.m.n);\n   var td0=document.createElement(\"td\"); td0.className=\"qa-n\"; td0.appendChild(name);\n   if(k===0){var pl=document.createElement(\"span\");pl.className=\"qa-pill qa-pg\";pl.textContent=\"CHEAPEST\";td0.appendChild(pl);}\n   var td1=document.createElement(\"td\"); td1.textContent=r.m.p;\n   var td2=document.createElement(\"td\"); td2.className=\"qa-num\"; td2.textContent=\"$\"+r.m.i.toFixed(2);\n   var td3=document.createElement(\"td\"); td3.className=\"qa-num\"; td3.textContent=\"$\"+r.m.o.toFixed(2);\n   var td4=document.createElement(\"td\"); td4.className=\"qa-num\"; td4.textContent=money(r.c);\n   var td5=document.createElement(\"td\"); var w=document.createElement(\"span\"); w.className=\"qa-barwrap\";\n   var b=document.createElement(\"span\"); b.className=\"qa-bar\"; b.style.width=pct+\"%\";\n   if(k===0)b.style.background=\"#059669\"; w.appendChild(b); td5.appendChild(w);\n   tr.appendChild(td0);tr.appendChild(td1);tr.appendChild(td2);tr.appendChild(td3);tr.appendChild(td4);tr.appendChild(td5);\n   tb.appendChild(tr);\n });\n if(rows.length){\n  $(\"qa-best\").textContent=money(min);\n  $(\"qa-best-s\").textContent=rows[0].m.n;\n  $(\"qa-worst\").textContent=money(max);\n  $(\"qa-worst-s\").textContent=rows[rows.length-1].m.n;\n  var sv=max-min;\n  $(\"qa-save\").textContent=money(sv);\n  $(\"qa-save-s\").textContent=max>0?(\"vs \"+rows[rows.length-1].m.n+\" \\u2014 \"+Math.round(sv\/max*100)+\"% lower\"):\"\\u2014\";\n }\n}\n[\"qa-in\",\"qa-out\",\"qa-cache\"].forEach(function(id){\n var el=$(id); el.addEventListener(\"input\",render); el.addEventListener(\"change\",render);\n});\n$(\"qa-presets\").addEventListener(\"click\",function(e){\n var b=e.target.closest(\".qa-preset\"); if(!b)return;\n var ps=this.getElementsByClassName(\"qa-preset\");\n for(var i=0;i<ps.length;i++)ps[i].classList.remove(\"qa-on\");\n b.classList.add(\"qa-on\");\n $(\"qa-in\").value=b.getAttribute(\"data-in\");\n $(\"qa-out\").value=b.getAttribute(\"data-out\");\n $(\"qa-cache\").value=b.getAttribute(\"data-cache\");\n render();\n});\n$(\"qa-tog\").addEventListener(\"click\",function(e){\n var b=e.target.closest(\"button\"); if(!b)return;\n var bs=this.getElementsByTagName(\"button\");\n for(var i=0;i<bs.length;i++)bs[i].classList.remove(\"qa-on\");\n b.classList.add(\"qa-on\"); scope=b.getAttribute(\"data-scope\"); render();\n});\nrender();\n})();\n<\/script>\n\n\n<h2>How the calculator prices your workload<\/h2>\n\n<p>Token billing is not one rate &mdash; it is three. Input tokens, output tokens and cached input tokens are each billed separately, and output is almost always the most expensive of the three. The calculator applies this formula to every model in the list:<\/p>\n\n<p><code>monthly cost = input(M) &times; (1 &minus; cache hit) &times; input price + input(M) &times; cache hit &times; cached price + output(M) &times; output price<\/code><\/p>\n\n<p>Two details trip people up. First, prompt caching only discounts <em>input<\/em> tokens; your output bill is unaffected no matter how aggressive your caching is. Second, cached reads are roughly 10&times; cheaper than fresh input on most providers, which is why a high cache hit rate compresses cost far more than most teams expect.<\/p>\n\n<p>To use the tool: pick the preset closest to your workload, then override the token counts with numbers from your own billing dashboard. A quick way to get real figures is to pull the last full month of usage from your provider console and divide total input tokens by total requests.<\/p>\n\n<h2>AI API pricing comparison, September 2026<\/h2>\n\n<p>List prices per 1M tokens, standard service tier. The reference table below is the same data the calculator uses, so you can sanity-check any result by hand.<\/p>\n\n<div class=\"qapi-table\">\n<table>\n<thead>\n<tr><th>Model<\/th><th>Provider<\/th><th>Input \/ 1M<\/th><th>Cached input \/ 1M<\/th><th>Output \/ 1M<\/th><\/tr>\n<\/thead>\n<tbody>\n<tr><td>GPT-6 Astra<\/td><td>OpenAI<\/td><td>$10.00<\/td><td>$1.00<\/td><td>$50.00<\/td><\/tr>\n<tr><td>GPT-6 Sol<\/td><td>OpenAI<\/td><td>$2.00<\/td><td>$0.20<\/td><td>$10.00<\/td><\/tr>\n<tr><td>GPT-6 Luna<\/td><td>OpenAI<\/td><td>$0.10<\/td><td>$0.01<\/td><td>$0.50<\/td><\/tr>\n<tr><td>GPT-5.6 Sol<\/td><td>OpenAI<\/td><td>$4.00<\/td><td>$0.40<\/td><td>$20.00<\/td><\/tr>\n<tr><td>GPT-5.6 Cyber<\/td><td>OpenAI<\/td><td>$12.50<\/td><td>$1.25<\/td><td>$75.00<\/td><\/tr>\n<tr><td>GPT-5.3 Codex<\/td><td>OpenAI<\/td><td>$1.75<\/td><td>$0.175<\/td><td>$14.00<\/td><\/tr>\n<tr><td>Fable 5.1<\/td><td>Anthropic<\/td><td>$10.00<\/td><td>$0.25<\/td><td>$50.00<\/td><\/tr>\n<tr><td>Opus 5.5<\/td><td>Anthropic<\/td><td>$4.00<\/td><td>$0.20<\/td><td>$20.00<\/td><\/tr>\n<tr><td>Sonnet 5<\/td><td>Anthropic<\/td><td>$2.00<\/td><td>$0.20<\/td><td>$10.00<\/td><\/tr>\n<tr><td>Haiku 4.5<\/td><td>Anthropic<\/td><td>$1.00<\/td><td>$0.10<\/td><td>$5.00<\/td><\/tr>\n<tr><td>Gemini 3.8 Flash<\/td><td>Google<\/td><td>$0.75<\/td><td>$0.075<\/td><td>$3.75<\/td><\/tr>\n<tr><td>Gemini 3.5 Flash<\/td><td>Google<\/td><td>$1.50<\/td><td>$0.15<\/td><td>$9.00<\/td><\/tr>\n<tr><td>Gemini 3.5 Flash-Lite<\/td><td>Google<\/td><td>$0.30<\/td><td>$0.03<\/td><td>$2.50<\/td><\/tr>\n<tr><td>Gemini 3.1 Flash-Lite<\/td><td>Google<\/td><td>$0.25<\/td><td>$0.025<\/td><td>$1.50<\/td><\/tr>\n<tr><td>Gemini 3.1 Pro<\/td><td>Google<\/td><td>$2.00<\/td><td>$0.20<\/td><td>$12.00<\/td><\/tr>\n<tr><td>Gemini 2.5 Pro<\/td><td>Google<\/td><td>$1.25<\/td><td>$0.125<\/td><td>$10.00<\/td><\/tr>\n<tr><td>Gemini 2.5 Flash<\/td><td>Google<\/td><td>$0.30<\/td><td>$0.03<\/td><td>$2.50<\/td><\/tr>\n<tr><td>Gemini 2.5 Flash-Lite<\/td><td>Google<\/td><td>$0.10<\/td><td>$0.01<\/td><td>$0.40<\/td><\/tr>\n<tr><td>DeepSeek V4.1 Flash (peak)<\/td><td>DeepSeek<\/td><td>$0.30<\/td><td>$0.006<\/td><td>$1.20<\/td><\/tr>\n<tr><td>DeepSeek V4.1 Flash (off-peak)<\/td><td>DeepSeek<\/td><td>$0.15<\/td><td>$0.003<\/td><td>$0.60<\/td><\/tr>\n<tr><td>DeepSeek V4 Pro (peak)<\/td><td>DeepSeek<\/td><td>$1.32<\/td><td>$0.044<\/td><td>$3.96<\/td><\/tr>\n<tr><td>DeepSeek V4 Pro (off-peak)<\/td><td>DeepSeek<\/td><td>$0.66<\/td><td>$0.022<\/td><td>$1.98<\/td><\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n\n<p>Rates verified against each provider's official pricing page in September 2026. Google's Gemini 3 Flash family is on promotional pricing through 31 December 2026 and doubles on 1 January 2027 &mdash; worth remembering before you build a budget on it.<\/p>\n\n<h2>Why the same workload costs 150&times; more on the wrong model<\/h2>\n\n<p>Run a modest production workload &mdash; 50M input tokens and 10M output tokens per month, no caching &mdash; and the spread is brutal:<\/p>\n\n<div class=\"qapi-table\">\n<table>\n<thead><tr><th>Model<\/th><th>Monthly cost<\/th><th>Multiple of cheapest<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>Gemini 2.5 Flash-Lite<\/td><td>$9.00<\/td><td>1&times;<\/td><\/tr>\n<tr><td>GPT-6 Luna<\/td><td>$10.00<\/td><td>1.1&times;<\/td><\/tr>\n<tr><td>DeepSeek V4.1 Flash (off-peak)<\/td><td>$13.50<\/td><td>1.5&times;<\/td><\/tr>\n<tr><td>Gemini 2.5 Pro<\/td><td>$162.50<\/td><td>18&times;<\/td><\/tr>\n<tr><td>Sonnet 5<\/td><td>$200.00<\/td><td>22&times;<\/td><\/tr>\n<tr><td>GPT-6 Astra<\/td><td>$1,000.00<\/td><td>111&times;<\/td><\/tr>\n<tr><td>GPT-5.6 Cyber<\/td><td>$1,375.00<\/td><td>153&times;<\/td><\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n\n<p>The lesson is not \"always use the cheapest model\" &mdash; it is that <strong>model choice should be a per-request decision, not a per-project one<\/strong>. A support bot answering refund policy questions does not need a frontier reasoning model. A code review agent does. Most production systems contain both kinds of traffic and route them identically because routing is hard to wire up.<\/p>\n\n<h2>Five ways to cut your AI API bill<\/h2>\n\n<p>In rough order of how much money they save per hour of engineering effort:<\/p>\n\n<ol>\n<li><strong>Turn on prompt caching.<\/strong> On most providers a cache read costs about a tenth of fresh input. If your system prompt or retrieved context repeats across calls, a 60&ndash;80% hit rate is realistic and often halves the input line of your bill. The calculator's cache slider shows the effect directly.<\/li>\n<li><strong>Route by task difficulty.<\/strong> Send classification, extraction and formatting work to a small model and reserve the frontier model for reasoning. This single change is usually the largest line-item saving available. See <a href=\"https:\/\/qoraapi.com\/blog\/choose-right-ai-model-routing\/\">how to choose the right AI model for routing<\/a>.<\/li>\n<li><strong>Cap output tokens.<\/strong> Output is priced 3&ndash;6&times; higher than input almost everywhere. A runaway agent loop that emits 20K tokens of scratchpad per turn is the most common cause of a surprise invoice.<\/li>\n<li><strong>Use batch tiers for non-interactive work.<\/strong> Batch endpoints are typically 50% off list and cost you only latency. Embedding jobs, nightly summarisation and evaluation runs belong there.<\/li>\n<li><strong>Put a budget guardrail in front of production.<\/strong> Alerts on daily spend catch a misconfigured retry loop before it costs four figures overnight. See <a href=\"https:\/\/qoraapi.com\/blog\/ai-cost-guardrails-budgets\/\">AI cost guardrails and budgets<\/a>.<\/li>\n<\/ol>\n\n<p>If you want the full breakdown of how token billing works across providers, <a href=\"https:\/\/qoraapi.com\/blog\/ai-api-pricing-explained\/\">AI API pricing explained<\/a> covers caching semantics, tier pricing and the long-context cliffs that quietly double your rate. For a broader reduction playbook, <a href=\"https:\/\/qoraapi.com\/blog\/reduce-ai-api-costs\/\">how to reduce AI API costs<\/a> walks through the changes that pay off first.<\/p>\n\n<p>If you want the full picture rather than a single workload &mdash; six production workloads priced against all 22 models, plus the long-context thresholds that silently double a bill &mdash; see the <a href=\"https:\/\/qoraapi.com\/blog\/ai-api-cost-index-2026\/\">2026 AI API Cost Index<\/a>. It is the analysis behind this calculator, and the raw dataset is downloadable.<\/p>\n\n<h2>Where a gateway changes the arithmetic<\/h2>\n\n<p>Every technique above assumes you can change which model a request goes to. If your code calls four providers through four SDKs, that change means four code paths, four sets of credentials and four retry strategies &mdash; which is why most teams never get around to it.<\/p>\n\n<p>An AI gateway collapses that into one. You keep a single OpenAI-compatible client, swap the base URL, and the routing, failover and per-key budget decisions move into configuration instead of application code. That is what lets you actually act on what this calculator tells you. Related reading: <a href=\"https:\/\/qoraapi.com\/blog\/ai-api-gateway-guide\/\">what an AI API gateway does<\/a>, <a href=\"https:\/\/qoraapi.com\/blog\/ai-gateway-vs-api-gateway\/\">AI gateway vs API gateway<\/a>, and <a href=\"https:\/\/qoraapi.com\/blog\/switch-ai-providers-unified-gateway\/\">switching providers without rewriting your app<\/a>.<\/p>\n\n<h2>Frequently asked questions<\/h2>\n\n<h3>Are these prices the final price I will pay?<\/h3>\n<p>No. They are list prices for the standard service tier. Batch processing is usually 50% cheaper, priority or fast tiers cost more, long-context requests above a model's threshold can double the rate, and enterprise agreements change the numbers again. Treat the calculator as a comparison tool, not a quote.<\/p>\n\n<h3>Why does cached input cost so much less?<\/h3>\n<p>Because the provider skips recomputing the attention state for the cached prefix. The saving is real and substantial &mdash; roughly 10&times; on most providers &mdash; but it only applies to the part of your prompt that is byte-identical between calls, and cache entries expire (commonly after 5 minutes, with longer TTLs available at extra cost).<\/p>\n\n<h3>Is the cheapest model good enough for my use case?<\/h3>\n<p>For classification, extraction, summarisation and formatting, usually yes. For multi-step reasoning, code generation and anything where a wrong answer is expensive, usually no. The right test is to run your own evaluation set against two or three candidates rather than trusting a leaderboard.<\/p>\n\n<h3>How often do these prices change?<\/h3>\n<p>More often than you would like. Providers cut prices, launch promotional tiers and retire models on their own schedule &mdash; Gemini's Flash pricing doubles on 1 January 2027, for example. Re-check the official pricing pages before committing to an annual budget.<\/p>\n\n<div class=\"qapi-cta\">\n<strong>One endpoint. Every model above. No rewrite.<\/strong>\n<p>QoraAPI is an OpenAI-compatible AI gateway. Point your existing client at it, keep your code, and route each request to whichever model is cheapest for that task &mdash; with failover across providers when one degrades.<\/p>\n<p><a href=\"https:\/\/qoraapi.com\">Explore QoraAPI &rarr;<\/a><\/p>\n<\/div>\n<script type=\"application\/ld+json\">{\"@context\":\"https:\/\/schema.org\",\"@type\":\"WebApplication\",\"@id\":\"https:\/\/qoraapi.com\/blog\/ai-api-cost-calculator\/#webapp\",\"name\":\"AI API Cost Calculator\",\"url\":\"https:\/\/qoraapi.com\/blog\/ai-api-cost-calculator\/\",\"description\":\"A free browser-based calculator that prices 22 frontier AI models against your own input tokens, output tokens and cache hit rate, and compares six preset production workloads side by side.\",\"applicationCategory\":\"BusinessApplication\",\"operatingSystem\":\"Any (browser-based)\",\"browserRequirements\":\"Requires JavaScript\",\"isAccessibleForFree\":true,\"offers\":{\"@type\":\"Offer\",\"price\":\"0\",\"priceCurrency\":\"USD\"},\"creator\":{\"@type\":\"Organization\",\"name\":\"Qora API\",\"url\":\"https:\/\/qoraapi.com\/\"},\"featureList\":[\"22 models from OpenAI, Anthropic, Google and DeepSeek\",\"Live cost arithmetic including cached input pricing\",\"Four preset production workloads\",\"Cache hit rate sensitivity slider\",\"Long-context cliff detection\"]}<\/script>\n<script type=\"application\/ld+json\">{\"@context\":\"https:\/\/schema.org\",\"@type\":\"FAQPage\",\"@id\":\"https:\/\/qoraapi.com\/blog\/ai-api-cost-calculator\/#faq\",\"mainEntity\":[{\"@type\":\"Question\",\"name\":\"Are these prices the final price I will pay?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"No. They are list prices for the standard service tier. Batch processing is usually 50% cheaper, priority or fast tiers cost more, long-context requests above a model's threshold can double the rate, and enterprise agreements change the numbers again. Treat the calculator as a comparison tool, not a quote.\"}},{\"@type\":\"Question\",\"name\":\"Why does cached input cost so much less?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Because the provider skips recomputing the attention state for the cached prefix. The saving is real and substantial - roughly 10x on most providers - but it only applies to the part of your prompt that is byte-identical between calls, and cache entries expire (commonly after 5 minutes, with longer TTLs available at extra cost).\"}},{\"@type\":\"Question\",\"name\":\"Is the cheapest model good enough for my use case?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"For classification, extraction, summarisation and formatting, usually yes. For multi-step reasoning, code generation and anything where a wrong answer is expensive, usually no. The right test is to run your own evaluation set against two or three candidates rather than trusting a leaderboard.\"}},{\"@type\":\"Question\",\"name\":\"How often do these prices change?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"More often than you would like. Providers cut prices, launch promotional tiers and retire models on their own schedule - Gemini's Flash pricing doubles on 1 January 2027, for example. Re-check the official pricing pages before committing to an annual budget.\"}}]}<\/script>\n\n\n\n<div class=\"wp-block-group alignfull has-background has-text-color has-global-padding is-layout-constrained wp-container-core-group-is-layout-cee23037 wp-block-group-is-layout-constrained\" style=\"background-color:#39434F;color:#FFFFFF;padding-top:var(--wp--preset--spacing--60);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--60);padding-left:var(--wp--preset--spacing--40)\">\n\t\n\t<figure class=\"wp-block-image aligncenter size-full is-resized has-background qora-cta-logo\" style=\"border-radius:12px;background-color:#FFFFFF;padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--40)\"><a href=\"https:\/\/qoraapi.com\/\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"292\" src=\"https:\/\/qoraapi.com\/blog\/wp-content\/uploads\/2026\/09\/qora-api-logo.png\" alt=\"Qora API \u2014 AI API Gateway for Developers\" class=\"wp-image-149\" style=\"width:260px\" srcset=\"https:\/\/qoraapi.com\/blog\/wp-content\/uploads\/2026\/09\/qora-api-logo.png 900w, https:\/\/qoraapi.com\/blog\/wp-content\/uploads\/2026\/09\/qora-api-logo-300x97.png 300w, https:\/\/qoraapi.com\/blog\/wp-content\/uploads\/2026\/09\/qora-api-logo-768x249.png 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/a><\/figure>\n\t\n\n\t\n\t<h2 class=\"wp-block-heading has-text-align-center has-text-color has-x-large-font-size\" style=\"color:#FFFFFF;font-weight:700;line-height:1.25\">Build AI features with one clear API<\/h2>\n\t\n\n\t\n\t<p class=\"has-text-align-center has-text-color wp-block-paragraph\" style=\"color:#C7D1DA;line-height:1.6\">Qora API gives you a single, focused gateway to connect your apps, scripts and automations to AI. Start with one request.<\/p>\n\t\n\n\t\n\t<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-35f06ea7 wp-block-buttons-is-layout-flex\">\n\t\t\n\t\t<div class=\"wp-block-button\"><a class=\"wp-block-button__link has-text-color has-background wp-element-button\" href=\"https:\/\/qoraapi.com\/\" target=\"_blank\" rel=\"noopener\" style=\"border-radius:999px;color:#FFFFFF;background-color:#00B5B3;font-weight:600\">Start building &rarr;<\/a><\/div>\n\t\t\n\n\t\t\n\t\t<div class=\"wp-block-button is-style-outline is-style-outline--1\"><a class=\"wp-block-button__link has-text-color has-border-color wp-element-button\" href=\"https:\/\/qoraapi.com\/pricing\" target=\"_blank\" rel=\"noopener\" style=\"border-radius:999px;border-color:#FFFFFF;border-width:1px;color:#FFFFFF;font-weight:600\">See the model square<\/a><\/div>\n\t\t\n\t<\/div>\n\t\n\n\t\n\t<p class=\"has-text-align-center has-text-color has-small-font-size wp-block-paragraph\" style=\"color:#8FA0AE;line-height:1.5\">qoraapi.com &middot; AI API gateway for developers<\/p>\n\t\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>Every team building on AI APIs eventually asks the same question: what will this actually cost next month? The answer is not a single number, because the same workload can cost 150&times; more depending on which model you point it at. This calculator does the arithmetic for you. Enter your monthly token volume, set your [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-330","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/pages\/330","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/comments?post=330"}],"version-history":[{"count":7,"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/pages\/330\/revisions"}],"predecessor-version":[{"id":367,"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/pages\/330\/revisions\/367"}],"wp:attachment":[{"href":"https:\/\/qoraapi.com\/blog\/wp-json\/wp\/v2\/media?parent=330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}