Cheapest AI API
Eight low-cost AI APIs compared with live August 2026 prices, free tiers, production limits, and the monthly cost that changes the decision.
- DDeepSeek
Google Gemini
- DDeepInfra
- GGroq
- MMistral
- SSiliconFlow
- OOpenRouter
OpenAI
- GGemma

DeepInfra has the lowest sticker price in this comparison: Mistral Nemo costs $0.019 per million input tokens and $0.03 per million output tokens. But DeepSeek V4 Flash is the stronger cheap production default at $0.14/$0.28 with JSON, tool calling, and a 1M-token context window, while Gemini 2.5 Flash-Lite wins for a free prototype. The cheapest useful API is the lowest rung that clears your workload's quality, privacy, and latency floor.
Cheapest AI API: the verdict at a glance
DeepSeek V4 Flash is the best cheap AI API for most production text workloads. Its standard rate is low enough that 10 million input tokens plus 2 million output tokens cost $1.96, and the same model supports JSON output, tool calls, a Responses API, and a 1M-token context window. That combination matters more than winning the final fraction of a dollar.
There are three different winners because "cheapest" describes three different jobs:
- DeepInfra is cheapest on raw token price. Mistral Nemo costs $0.019 per million input tokens and $0.03 per million output tokens.
- Google Gemini is cheapest for a prototype. Gemini 2.5 Flash-Lite has a free tier, then costs $0.10 input and $0.40 output per million tokens on the paid Standard tier.
- DeepSeek is cheapest for a capable production default. V4 Flash costs $0.14 input and $0.28 output per million cache-miss tokens, with the API features most application backends need.
Every price below was verified against the provider's live pricing or documentation page on August 10, 2026. Prices are per 1 million input/output tokens unless the cell says otherwise.
The table is not a quality ranking. A 3B model at $0.10/$0.10 and a current production model at $0.14/$0.28 are different products even when both accept a chat-completions request. Use sticker price to choose candidates, then use your own acceptance test to choose the winner.
What 20,000 AI requests cost
At small and medium volumes, every provider here is cheap enough that one failed workflow decision matters more than the token bill. The useful comparison is still a normalized workload because it exposes output-heavy pricing and fees that a single input rate hides.
Assume a product makes 20,000 calls a month. Each call contains 500 input tokens and returns 100 output tokens. That is 10 million input tokens plus 2 million output tokens:
Monthly cost = 10 × input price + 2 × output price.

The spread looks large in percentage terms and tiny in absolute dollars. DeepSeek costs $1.71 more than DeepInfra Mistral Nemo for this workload. OpenAI Luna costs $2.44 more than DeepSeek. If the cheaper model breaks a schema, misses a customer request, or creates a manual review queue, the saved dollars disappear quickly.
That is the quality floor: the minimum model behavior your task can accept without compensating work. A classification endpoint with five allowed labels has a low floor. A customer-facing support answer grounded in account data has a much higher one. An agent allowed to update records has a higher floor again because the cost of a bad action is not another API call.
Output pricing deserves special attention. A summarizer may read a long document and return a short result, so input dominates. A coding agent, sales-email generator, or conversational assistant can produce far more output. OpenAI Luna's $1.20 output rate is six times its $0.20 input rate; Mistral Small 4's $0.60 output rate is four times its $0.15 input rate. Flat input/output pricing on tiny models looks attractive in output-heavy work, but only if those models finish the task.
1. DeepSeek: the best cheap production default
DeepSeek is the strongest first candidate when a production app needs low token cost without dropping JSON, tools, or long context. V4 Flash 0731 costs $0.14 per million cache-miss input tokens and $0.28 per million output tokens. The API publishes a 1M-token context length, a 384K maximum output, JSON output, tool calls, the Responses API, and an Anthropic-compatible route. That is a broader production surface than most models near the bottom of the price ladder.

The wall is budget stability. DeepSeek's own pricing page says an overall price increase is planned in the near future and that the increase is expected to be significant. A startup can benefit from today's $1.96 normalized cost, but a procurement team should not write that number into an annual forecast without a buffer or a second route.
Best for: Production extraction, structured generation, economical agents, and long-context jobs
Standout: 1M context plus JSON, tool calls, Responses API, and Anthropic API support
Pricing: $0.14 input, $0.0028 cache-hit input, and $0.28 output per 1M tokens for V4 Flash
Free trial: No standing free tier listed on the pricing page
- $1.96 for the normalized 10M-input, 2M-output workload
- 1M-token context and up to 384K output
- JSON output and tool calls at the budget tier
- Published concurrency limit of 2,500 for V4 Flash
- The vendor has already warned that pricing will rise significantly
- A standing free tier is not published
- A low-cost external route still needs privacy, reliability, and regional review for the buyer's use case
Where DeepSeek earns first place
DeepSeek wins when a cheap model must do more than label text. Consider a B2B SaaS product that extracts renewal date, contract value, notice period, and named risks from uploaded agreements. The output can be checked against a schema, but the model still needs enough context to read a long document and enough instruction following to return all required fields. V4 Flash offers the right combination of cost and API surface for the first evaluation.
The cache-hit rate is unusually low at $0.0028 per million input tokens. That matters when the same stable instructions or reference prefix recur. It does not make every input token cost $0.0028; only cache hits receive that rate. Budget cache misses at $0.14 until usage data proves the hit ratio.
A one-week DeepSeek evaluation
Choose one bounded task
Start with extraction, classification, summarization, or a read-only agent action. Define the fields, allowed outputs, and failure conditions before sending traffic.
Build a 100-request evaluation set
Use representative, sanitized requests from the workload. Include short, long, ambiguous, malformed, and edge-case inputs so the cheapest route cannot win by seeing only easy examples.
Require machine-checkable output
Use JSON output where the job has a schema. Record valid-schema rate, accepted-answer rate, latency, input tokens, output tokens, and cache hits for every call.
Keep the current model as fallback
Send failed validation, low-confidence cases, and any action with material consequence to the existing trusted route. The first rollout should be reversible.
Set a price-change alert
DeepSeek has disclosed that prices will rise. Recalculate the normalized workload when the vendor posts the new rate, rather than letting a temporary price become an architectural assumption.
Pick DeepSeek if V4 Flash passes the task and the organization can tolerate pricing movement. Skip it when a fixed annual unit price, a specific processing region, or an established vendor relationship outweighs the token difference.
2. Google Gemini: the best free AI API
Google Gemini is the best free route for a prototype that uses sanitized data. Gemini 2.5 Flash-Lite provides free input and output tokens on the Free tier. When the app moves to Paid, Standard pricing is $0.10 per million text, image, or video input tokens and $0.40 per million output tokens; Batch and Flex halve those rates to $0.05/$0.20.

The free tier has a privacy consequence that belongs in the decision, not the footnotes. Google's pricing page says Free-tier content is used to improve its products. Paid-tier content is not. Free is a sensible route for synthetic prompts, public documents, and a developer's test set; it is not the default for customer records, confidential documents, or unreleased code.
Best for: Free prototypes, multimodal inputs, batch processing, and cost-sensitive document workflows
Standout: Free input/output route plus paid text, image, video, and audio input
Pricing: Free tier; Paid Standard $0.10 text/image/video input and $0.40 output; Batch/Flex $0.05/$0.20
Free trial: Yes, a Free tier with limited model access
- Free input and output tokens on the Free tier
- $1.80 for the normalized workload on Paid Standard
- $0.90 for the same asynchronous workload on Batch or Flex
- Paid tier includes context caching and does not use content to improve Google products
- Free-tier content is used to improve Google products
- Free access is limited by model and quota
- Audio input costs $0.30 per million tokens on Standard, three times text/image/video input
The free-to-paid handoff
A founder validating a document-tagging feature can use the Free tier with public or generated documents, verify the response shape, and learn the token profile before adding billing. Once customer documents enter the flow, moving to Paid is not merely about volume. It changes the content-use term and provides higher production limits, context caching, and Batch access.
For the normalized workload, Paid Standard costs $1.80. Batch or Flex costs $0.90. That makes Gemini cheaper than DeepSeek for asynchronous work on sticker price, although the correct choice still depends on which model clears the task. If results do not need to return immediately, the 50% reduction should be evaluated before changing provider.
Gemini also accepts image and video input at the same $0.10 Standard input rate as text for 2.5 Flash-Lite. That makes it a stronger candidate than text-only small models when a workflow reads receipts, screenshots, or product imagery. The pricing page describes Flash-Lite as Google's smallest and most cost-effective at-scale model, which is the right starting tier before moving to a larger Gemini model.
Pick Gemini when the project needs a free start, multimodal input, or half-price asynchronous processing. Skip the Free tier for sensitive data, and skip Flash-Lite when the acceptance test shows that a larger model is required.
3. DeepInfra: the cheapest raw token price
DeepInfra is the raw-price winner at $0.019 input and $0.03 output per million tokens for Mistral Nemo Instruct. The normalized 20,000-request workload costs $0.25. DeepInfra also lists Meta Llama 3.1 8B at $0.02/$0.04 and DeepSeek V4 Flash at $0.09/$0.18, so a builder can climb the same host's model ladder without opening another billing account.

The wall is the model behind the price. Mistral Nemo and Llama 3.1 8B are cheap because they are small, older open models. A rigid labeling task may need nothing more. A customer-facing workflow should not inherit their low price until its own evaluation shows that the output is acceptable.
Best for: High-volume low-risk classification, tagging, lightweight extraction, and model price experiments
Standout: The lowest published text-generation token rate in this comparison
Pricing: Mistral Nemo $0.019 input/$0.03 output; Llama 3.1 8B $0.02/$0.04
Free trial: No; DeepInfra says a card or prepayment is required
- $0.25 for the normalized workload on Mistral Nemo
- Large catalog spanning text, embeddings, image, audio, and video models
- Standard, Priority, and lower-cost Flex scheduling
- Automatic scaling with a published 200-concurrent-request account limit
- The lowest rate buys a small model, not a universal production default
- Card or prepayment is required
- Flex can be slower and occasionally unavailable
Use DeepInfra when the answer space is narrow
A local-services marketplace that labels inbound messages as quote, reschedule, cancel, billing, or other has a narrow output space. It can reject anything outside five values and send ambiguous cases to a fallback. That is the kind of job where a $0.019/$0.03 model deserves an evaluation.
A support assistant answering account-specific questions is different. It must retrieve the right record, follow policy, preserve nuance, and avoid a confident wrong answer. Saving $1.71 against DeepSeek on the normalized workload fails to justify moving that job to Mistral Nemo without a stronger acceptance result.
DeepInfra's service tiers create another lever. Standard is the 1× base rate. Priority is 1.5× for faster scheduling during peak demand. Flex is 0.8× in exchange for slower responses and occasional unavailability. Use Flex for backfills, offline enrichment, or a retryable nightly queue. Do not put an interactive customer response on it merely to shave 20% off a bill that is already measured in cents.
Pick DeepInfra when a narrow task and a strong validator make small-model savings repeatable. Skip the cheapest row for open-ended writing, complex reasoning, and actions that can change customer or business data.
4. Groq: cheap when latency matters
Groq is the low-cost pick for interactive work that must feel immediate. Its production Llama 3.1 8B Instant route is listed at about 560 tokens per second, $0.05 per million input tokens, and $0.08 per million output tokens. The normalized workload costs $0.66, only $0.41 more than DeepInfra's raw-price winner.

The tradeoff is model depth and catalog stability. The cheapest route is an 8B model. Groq labels a separate set as production-ready and warns that preview models may be discontinued at short notice, so a price on a preview row is not a production commitment.
Best for: Low-latency classification, autocomplete, conversational UI, and fast first-pass routing
Standout: About 560 output tokens per second on the cheapest production model
Pricing: Llama 3.1 8B Instant $0.05 input/$0.08 output; GPT OSS 20B $0.075/$0.30
Free trial: Public trial terms are not specified on the documentation pages checked
- $0.66 for the normalized Llama 3.1 8B workload
- About 560 tokens per second on Llama 3.1 8B
- OpenAI-compatible base URL and familiar API shape
- Production and preview models are clearly separated
- The lowest-cost production option is only an 8B model
- Account-specific rate limits must be checked in the dashboard
- Preview availability can change at short notice
Latency is part of the product cost
A voice or live-chat product pays for delay in abandoned turns and awkward interaction, even when the API invoice remains low. Groq is credible when the model is good enough and speed is the constraint. A short intent router that decides which workflow handles the message is a cleaner fit than a policy-heavy support answer.
The model page lists a 131,072-token context window for Llama 3.1 8B, but context capacity is not context quality. A model accepting a long prompt does not guarantee that it uses every relevant detail correctly. Keep the first Groq workload short, bounded, and machine-checkable.
Groq's GPT OSS 20B route offers a step up in model size at about 1,000 tokens per second and $0.075/$0.30. Its normalized cost is $1.35, still below DeepSeek's $1.96, but the choice should be settled by the same evaluation set. The lower number does not establish better instructions, tools, or business fit.
Pick Groq when response time is visible to the user and a small production model passes the task. Skip it when the workload needs premium reasoning or depends on a preview model with no stable production status.
5. Mistral: the cheapest direct small-model lab
Mistral is the cleanest direct-vendor ladder for small models. Ministral 3B starts at $0.10 input and $0.10 output per million tokens, the 8B model is $0.15/$0.15, and the 14B model is $0.20/$0.20. Mistral Small 4 costs $0.15/$0.60 and adds a broader text, agentic, and multimodal product surface.

The cheap 3B row is not the default recommendation for open-ended customer work. Use it where a tiny model has an advantage, such as classification, moderation pre-routing, or a constrained field transform. Mistral Small 4 is the more credible general application candidate and costs $2.70 for the normalized workload.
Best for: Direct access to small models, direct-vendor preference, batch transforms, and cached repeated prompts
Standout: Flat $0.10/$0.10 entry price plus 50% Batch and 90% cached-input discounts
Pricing: Ministral 3B $0.10/$0.10; Mistral Small 4 $0.15/$0.60
Free trial: Main text models have no general free production tier listed; a few Labs or moderation endpoints are free
- Simple direct-vendor pricing across 3B, 8B, 14B, and Small tiers
- 50% batch discount for high-volume asynchronous work
- 90% cached-input discount for repeated stable prefixes
- Mistral Small 4 supports text, agentic, and multimodal use
- The $0.10/$0.10 headline belongs to a 3B model
- Mistral Small 4 output is four times its input price
- No broad free production tier is listed for the main text models
When the Mistral ladder pays
Suppose an ecommerce platform generates nightly catalog tags from titles, attributes, and descriptions. The result is asynchronous, each item follows a stable schema, and a human can inspect sampled errors before the next catalog push. That workflow can begin on Ministral 3B or 8B, use Batch for 50% off, and keep the stable taxonomy instructions behind a cached prefix.
The economics change for a chat assistant. On the normalized workload, Ministral 3B costs $1.20, while Mistral Small 4 costs $2.70. The $1.50 difference buys a larger, more broadly positioned model. If Small 4 reduces fallback and review, it can be the cheaper system even though its token line is higher.
Pick Mistral when a direct model lab or small-model ladder matters. Skip the 3B headline rate when the task is open-ended and the evaluation has not proved it can stay above the quality floor.
6. SiliconFlow: the low-cost multi-model newcomer
SiliconFlow is the cheapest multi-model host in this shortlist once you want more than an 8B route. Its GPT OSS 20B price is $0.04 per million input tokens and $0.18 per million output tokens with a 131K context window. That produces a $0.76 bill for the normalized workload, and new accounts receive $1 in credits.

The important distinction is the model name. GPT OSS 20B is an open-weight 20B model, not direct access to OpenAI's GPT-5.6 family. SiliconFlow also lists DeepSeek V4 Flash at $0.13 input, $0.028 cached input, and $0.28 output, so the catalog can provide a stronger step-up route without abandoning the account.
Best for: Cost-sensitive builders who want several open models behind one provider account
Standout: GPT OSS 20B at $0.04/$0.18 with $1 in starting credits
Pricing: GPT OSS 20B $0.04 input/$0.18 output; DeepSeek V4 Flash $0.13/$0.28
Free trial: $1 in free credits and no minimum commitment
- $0.76 for the normalized GPT OSS 20B workload
- $1 in credits covers more than that normalized test workload at list price
- No minimum commitment on the public pricing page
- Low-cost routes across DeepSeek, Qwen, MiniMax, GPT OSS, and other open models
- The lowest prices belong to open-weight models, not proprietary frontier APIs
- Model choice still transfers quality evaluation to the buyer
- A newer multi-model host may need extra procurement and reliability review
The $1 evaluation budget
SiliconFlow's starting credit is unusually concrete. The normalized GPT OSS 20B workload costs $0.76, so the $1 credit can cover one full price-normalized run before retries or other models. That does not mean a free production month. It means a builder can measure output shape, latency, and token accounting without precommitting to a larger balance.
For a back-office summarization queue, start with GPT OSS 20B and send failed or low-confidence cases to DeepSeek V4 Flash on the same platform. The model rates make that ladder legible: $0.04/$0.18 for the cheaper route, then $0.13/$0.28 for DeepSeek. The application still needs to log which model answered because a blended bill without model-level acceptance data cannot reveal whether the cheaper tier is helping.
Pick SiliconFlow when one low-cost host and a broad open-model catalog simplify evaluation. Skip it when a buyer requires a direct contract with the model developer or already has a gateway that provides the same models at an acceptable total cost.
7. OpenRouter: the cheapest way to keep switching
OpenRouter is the best budget gateway when model switching is worth a small billing fee. It passes through provider inference prices without a markup, exposes free model variants, and places many providers behind one API key. DeepSeek V4 Flash Latest is listed at $0.08 input and $0.252 output per million tokens, which makes the normalized model spend $1.304 before credit-purchase fees.

The wall is the way credits are funded. OpenRouter charges 5.5% with a $0.80 minimum when credits are purchased. The minimum stops binding at about $14.55, because $0.80 divided by 5.5% is $14.5455. A $10 credit purchase therefore costs an $0.80 fee, or 8%, rather than 5.5%.
Best for: Comparing models, keeping fallback routes, and changing providers without rewriting the application
Standout: Provider prices passed through without inference markup
Pricing: Free variants at $0; paid models vary; DeepSeek V4 Flash Latest $0.08/$0.252 before the credit fee
Free trial: Small new-user allowance plus free variants with low daily limits
- One API key across many providers and models
- No markup on the underlying inference rate
- Free variants for evaluation
- First 1M BYOK requests each month are free
- Credit purchases cost 5.5% with a $0.80 minimum
- Free variants allow only 50 requests per day before a $10 lifetime credit purchase, then 1,000 per day
- Paid credits expire after one year if unused
- Gateway and upstream-provider failures both belong in the reliability plan
When the gateway fee pays back
A builder trying DeepSeek, Gemini, and an open model can spend more engineering time on separate auth, billing, retry behavior, and response formats than on inference. OpenRouter makes that switch a routing configuration. The fee is reasonable when that convenience keeps a fallback ready or lets a team replace a weak route quickly.
Tiny top-ups distort the economics. At $10, the $0.80 minimum is an 8% fee. At $100, 5.5% is $5.50 and the percentage behaves as advertised. A small prototype should either accept the minimum as a convenience charge or use a provider's direct free tier. Do not compare OpenRouter's model rate to a direct rate and forget the credit fee.
The BYOK route has a different rule. The first 1M requests per month using your own provider keys are free, then OpenRouter charges 5% of what that model/provider path would have cost on OpenRouter. BYOK can preserve direct provider limits while centralizing routing, but it does not remove the need to monitor two billing and failure surfaces.
Pick OpenRouter when one integration and rapid switching are worth the fee. Skip it when the product uses one stable provider, the direct API already meets uptime needs, and the extra gateway adds no operational value.
8. OpenAI: the cheapest mainstream migration path
OpenAI is not the token-price winner, but GPT-5.6 Luna can be the lowest-risk cheap route for a product already built around OpenAI. Luna costs $0.20 per million short-context input tokens, $0.02 cached input, and $1.20 output on Standard. Batch and Flex halve the input/output rates to $0.10/$0.60, making the normalized workload $2.20 instead of $4.40.

Migration has a cost even when it never appears on an API invoice. Existing schemas, prompts, moderation rules, tools, tracing, fallback behavior, and workload evaluations can make a $2.44 monthly token difference trivial. A product whose current OpenAI route passes its checks should first evaluate Luna, caching, and Batch/Flex before replacing the provider.
Best for: Existing OpenAI products, mainstream developer tooling, cached stable prompts, and asynchronous batch jobs
Standout: GPT-5.6 Luna combines a current low-cost OpenAI model with 50% Batch/Flex rates
Pricing: Standard $0.20 input/$0.02 cached/$1.20 output; Batch/Flex $0.10/$0.01/$0.60
Free trial: No standing free API tier listed
- $2.20 normalized cost on Batch or Flex
- Cached input costs one tenth of standard input
- Existing OpenAI applications can evaluate a cheaper model without a provider migration
- Clear separate rates for Standard, Batch, Flex, and long-context work
- Standard output costs six times input
- Standard normalized cost is $4.40, the highest ranked route here
- Eligible regional processing carries a 10% uplift
- Long-context Luna uses higher $0.40 input and $1.80 output rates
Optimize inside OpenAI before migrating
The GPT-5.6 routing review goes deeper on when Luna, Terra, and Sol fit. For this cost decision, the first move is simpler: put short, repeatable work on Luna; cache stable prefixes; send non-urgent work through Batch or Flex; preserve the stronger current model as fallback.
For 10 million input and 2 million output tokens, Luna Standard costs $4.40. Batch or Flex costs $2.20. DeepSeek V4 Flash costs $1.96. The difference between optimized OpenAI and direct DeepSeek is $0.24 for the normalized workload. That is too small to justify a provider migration by itself.
Long-context and regional settings can change the result. Luna's long-context Standard prices are $0.40 input and $1.80 output, and eligible regional processing adds 10%. Use the rate that matches the request and processing choice rather than applying the short-context headline to every token.
Pick OpenAI when the product already works there, a direct mainstream relationship matters, or Batch/Flex closes most of the price gap. Skip Standard for retryable offline jobs that qualify for the half-price paths.
Who should pick what
Choose the route by consequence first, then price the cheapest model that survives it. That one rule prevents most false savings.

For a free sanitized prototype, pick Gemini 2.5 Flash-Lite. It gives the cleanest zero-dollar start and a straightforward move to $0.10/$0.40 Paid Standard. Keep customer and confidential data out of Free because its content-use term differs from Paid.
For low-risk live production, start with DeepSeek V4 Flash. JSON, tool calls, 1M context, and a $1.96 normalized cost make it the best overall candidate. Keep a price-change buffer and fallback because the vendor has disclosed a coming increase.
For a narrow high-volume labeler, evaluate DeepInfra first. The $0.25 normalized cost is meaningful only where allowed outputs are constrained and failures are cheap to detect. Move up immediately when the task becomes open-ended.
For visible latency, evaluate Groq. The 560-token-per-second Llama 3.1 8B route can make an interface feel responsive at $0.05/$0.08. Use it as a fast lane with a deeper fallback rather than as an automatic replacement for every model.
For offline queues, compare Gemini Batch/Flex, Mistral Batch, and OpenAI Batch/Flex. Each documents a 50% reduction. The best provider is the one whose model passes the queue's acceptance check, not the one with the lowest undiscounted Standard line.
For easy switching, pick OpenRouter. Its fee can be cheaper than maintaining multiple integrations, especially when fallback and model churn are part of the product. For one stable provider, direct billing is simpler.
For an existing OpenAI application, try Luna before migrating. Batch/Flex brings the normalized cost to $2.20, only $0.24 above DeepSeek. Existing evaluations and operations can easily be worth more than that gap.
The decision flips when the cheaper route falls below the workload's acceptance threshold. Keep the lower-priced model while schema validity, accepted answers, latency, privacy terms, and recovery behavior meet the requirement. Move up a rung when one of those breaks. Do not keep adding prompt patches to save cents.
A builder exposing an API-driven experience to customers also has to own auth, billing, review, and failure handling. The v0 API build guide shows why the underlying model or agent is only one layer of the product.
How these APIs were picked
The ranking rewards the cheapest dependable buying decision, not the lowest isolated input number. Each provider was priced and analyzed against its live official pages on August 10, 2026. The APIs were not subscribed to or presented as if they had been exercised in production.
The decision uses these criteria:
- Useful entry price: input and output rates for a named, currently listed model
- Quality floor: whether the model tier is plausible for a constrained task or a broader production workflow
- Operational surface: JSON, tools, context, batch, caching, rate limits, and fallback implications
- Privacy and contract consequence: how free data is handled, whether a price is stable, and whether a separate gateway fee applies
- Switching cost: the work required to migrate prompts, schemas, evaluation sets, monitoring, and billing
Eight providers made the cut because each owns a distinct buyer decision. A provider was excluded when its cheapest production text route sat well above this cost band, its price could not be normalized per token, or its role duplicated another option without a clearer benefit. Specialized image, video, speech, and embedding APIs were also excluded because their units are not comparable to text input/output tokens.
The cost math is original analysis using one explicit workload. It is not a benchmark. Your accepted-output cost can only come from your own representative requests, validators, and review process.
The ones to avoid
OpenRouter free variants as a production dependency
Avoid making an OpenRouter free variant the only route behind live customer traffic. The account gets 50 free-model requests per day until it has purchased at least $10 in credits, then 1,000 per day. That is an evaluation allowance, not a dependable capacity plan.
Gemini Free with customer or confidential data
Avoid sending sensitive content through Gemini Free. Google says Free-tier content is used to improve its products, while Paid-tier content is not. The normalized Paid Standard bill is $1.80, so the privacy boundary is not a sensible place to save that amount.
DeepInfra Mistral Nemo for unbounded customer-facing work
Avoid promoting the $0.019/$0.03 route straight into open-ended support, legal interpretation, or autonomous actions. The rate belongs to a small model. Use it for a constrained, validated job and keep a stronger fallback until the acceptance data earns broader scope.
DeepSeek without a price-change fallback
Avoid treating $0.14/$0.28 as a fixed annual rate. DeepSeek says a significant increase is coming. The model can still be the best current default, but the budget and architecture need a second route.
OpenAI Standard for retryable offline jobs
Avoid paying Luna's $0.20/$1.20 Standard rate for work that can wait. Batch and Flex are $0.10/$0.60, cutting the normalized workload from $4.40 to $2.20 without changing provider.
The Monday move
Next week, move one bounded task class, not the whole application. A 100-request evaluation is enough to expose obvious schema, latency, and routing failures before production traffic is involved; it is not a substitute for continued monitoring.
Pull 100 representative requests
Choose a single task and sample normal, difficult, ambiguous, and malformed inputs. Remove personal, confidential, and customer data before using any free tier.
Run three routes
Compare the current provider, DeepSeek V4 Flash, and Gemini 2.5 Flash-Lite. Add DeepInfra or Groq only when raw price or latency is the explicit objective.
Score four outcomes
Record valid-schema rate, accepted-answer rate, end-to-end latency, and exact input/output token cost. Keep human review time as a separate operational measure.
Route one winning class
Send only the bounded task that passed to the cheaper provider. Preserve the old route for failed validation, ambiguous inputs, and higher-consequence actions.
Reprice on every vendor change
Save the formula and workload assumptions. Recalculate when DeepSeek raises prices, a model is deprecated, or free-tier and gateway limits change.
That move turns a list of rates into a reversible budget decision. It also produces the one number a public price table cannot: your cost per accepted result.
Frequently asked questions
Which AI has the cheapest API?
DeepInfra has the lowest raw text-generation price in this comparison: Mistral Nemo at $0.019 per million input tokens and $0.03 per million output tokens. DeepSeek V4 Flash is the better cheap production default when the workload needs JSON, tools, and long context.
Is there any free API for AI?
Yes. Google Gemini provides free input and output tokens on its Free tier, and OpenRouter offers free model variants. Gemini Free may use content to improve Google products, while OpenRouter free variants are limited to 50 requests per day or 1,000 per day after at least $10 in lifetime credit purchases.
How much does an AI API cost?
For 20,000 monthly calls totaling 10M input and 2M output tokens, the ranked routes run from $0.25 on DeepInfra Mistral Nemo to $4.40 on OpenAI GPT-5.6 Luna Standard. Batch, Flex, caching, gateway fees, retries, and the model that clears the quality floor change the final bill.
How much does the ChatGPT API cost?
ChatGPT subscriptions and OpenAI API billing are separate. The budget OpenAI model compared here is GPT-5.6 Luna at $0.20 input and $1.20 output per million short-context Standard tokens, or $0.10/$0.60 through Batch or Flex.
Download the AI business workflow audit checklist to turn this cost ladder into a one-week provider evaluation.
Aug 10, 2026







