كم ستبلغ تكلفة استخدام واجهة برمجة تطبيقات OpenAI أو Anthropic أو Google أو DeepSeek شهريًّا فعليًّا؟ أدخل بيانات الاستخدام الخاصة بك وقارن جميع النماذج جنبًا إلى جنب — ويتم سحب الأسعار مباشرةً من قاعدة بياناتنا الخاصة قاعدة بيانات نماذج الذكاء الاصطناعي.
| النموذج | المطوّر | الدولار لكل مليون رمز مُدخل | الدولار لكل مليون رمز مُخرج | التكلفة التقديرية الشهرية |
|---|
التقدير = (عدد الرموز المُدخلة بالملايين × سعر الرمز المُدخل) + (عدد الرموز المُخرَجة بالملايين × سعر الرمز المُخرج). وتتفاوت الفواتير الفعلية باختلاف عوامل مثل التخزين المؤقت (Caching)، وخصومات الدفع الجماعي (Batch Discounts)، والرسوم الإضافية على السياقات الطويلة (Long-context Surcharges). أما النماذج المفتوحة المصدر التي تستضيفها بنفسك فهي غير مدرجة هنا (حيث تتمثل تكلفتها في أجهزتك وتكاليف الكهرباء، وليس في تكلفة كل رمز على حدة).
أرخص نموذج ليس بالضرورة الأنسب دائمًا — لذا تحقَّق من صفحة كل نموذج لمعرفة حجم نافذة السياق (Context Window) والأداء في الاختبارات المرجعية (Benchmarks) والقدرات قبل التحويل إليه. ولا تنسَ أن النماذج المفتوحة المصدر التي تستضيفها بنفسك لا تترتَّب عليها أي تكلفة مقابل كل رمز.
How much does an LLM API cost, and how do you calculate it?
AI API pricing is charged by the token, billed separately for input (your prompt plus any context you send) and output (the model’s reply), and quoted per million tokens. To estimate a bill you multiply your input tokens by the input price, add your output tokens multiplied by the output price, then scale by how many requests you run per month. In 2026 input pricing runs roughly $0.10–$5 per million tokens and output roughly $0.30–$30 per million, with output almost always costing more than input — typically 2–5× (a median of about 4×).
- The formula: monthly cost ≈ (requests/month × avg input tokens × input price ÷ 1,000,000) + (requests/month × avg output tokens × output price ÷ 1,000,000).
- Token-to-word rule: about 1.3 tokens per English word, so 1,000 tokens ≈ 750 words and 1 million tokens ≈ 750,000 words.
- Price spread: budget/”lite” models sit near $0.10–$0.15 per million input tokens; frontier flagship models reach roughly $5 input and $25–$30 output.
- Open-weight models self-hosted have no per-token fee — you pay for the GPU, power and hosting instead.
الأسئلة الشائعة
How do I calculate the monthly cost of an AI API?
Take your average input tokens and output tokens per request, multiply each by that model’s per-million price (input price and output price are separate), add them together for a per-request cost, then multiply by your monthly request volume. For example, 100,000 requests a month at 1,000 input and 500 output tokens each is 100M input and 50M output tokens; at $1/M input and $4/M output that is $100 + $200 = $300 a month.
Why do output tokens cost more than input tokens?
Input tokens are processed in a single parallel pass, whereas each output token requires its own full forward pass through the model, so it is far more compute-intensive to generate text than to read it. That is why output is usually priced 2–5× higher than input, with a typical ratio around 4×. When you estimate a bill, weight output tokens accordingly rather than assuming input and output cost the same.
What does “cost per 1M tokens” actually mean?
Providers quote prices per one million tokens rather than per request because token counts vary so much between calls. A token is roughly ¾ of an English word, so one million tokens is about 750,000 words — the length of a long book. To get your real cost, divide the quoted per-million price by 1,000,000 and multiply by the exact number of tokens you send and receive.
What is the cheapest LLM API in 2026?
The lowest-cost options are the “flash”, “lite” and open-model APIs, which land around $0.10–$0.15 per million input tokens and roughly $0.30–$0.60 per million output — often 30–50× cheaper than frontier flagship models at ~$5 input / $25–$30 output. The best value is usually the cheapest model that still clears your quality bar, so match the model to the task rather than defaulting to the most expensive one. Because prices shift most quarters, use the live figures in the calculator above before committing to volume.
Do open-source or open-weight models have a per-token API cost?
No — if you self-host an open-weight model (such as Llama, Qwen, DeepSeek or Mistral variants) there is no per-token API charge at all; you pay only for the GPU or server, electricity and maintenance. That flips the economics: self-hosting is a fixed hourly cost regardless of usage, so it only beats per-token API pricing at high, steady volume. At low or bursty volume a hosted API is almost always cheaper, since you pay for exactly the tokens you use.
How much VRAM do I need to self-host a model instead of paying per token?
At 4-bit quantisation a model needs roughly 0.5–0.6 GB of VRAM per billion parameters, plus extra for the KV cache that grows with context length. So an 8B model needs about 5–6 GB and fits a consumer GPU, a 70B model needs about 40–48 GB (a data-centre card or two 24 GB cards), and adding 15–20% headroom for KV cache and overhead is a safe rule of thumb. Longer context windows and larger batch sizes raise the KV-cache requirement, so size for your real prompt lengths, not just the weights.
How can I reduce my AI API bill?
The biggest levers are sending fewer tokens and choosing a cheaper model tier for easy tasks. Prompt caching can cut the cost of repeated system prompts or context by up to ~90%, and batch/asynchronous endpoints commonly give around a 50% discount for non-urgent work. Trimming long context, capping max output length, and routing simple requests to a lite model while reserving flagship models for hard ones typically cut a bill by a large multiple.
More free tools from Convly
Blended API cost per 1M tokens — what AI models really cost
$0.02
$0.02
$0.03
$0.06
$0.07
$0.07
$0.09
$0.10
$0.13
$0.15
$6.00
$10.00
$10.00
$11.25
$11.25
$20.00
Blended cost = (3 × input + output) ÷ 4 · 10 cheapest + 6 priciest of 36 tracked, log scale · full spread 909× · Green = best value, orange = highest. Updated Aug 03, 2026.
📋 Embed this chart on your site (free, with attribution)
Get the numbers before everyone else
One email a week: which AI models changed price, what the new benchmarks actually measured, and which GPU is worth buying. No hype, no filler.
Free. Unsubscribe in one click. We never sell or share your address.

