THE SHORT ANSWER
The cheapest AI API depends on the model and your input-to-output ratio. In the selected published rates below, Tokely’s Claude Haiku 5.5 route has the lowest cost for an uncached workload of 1 million input tokens and 250,000 output tokens. This is a limited price comparison, not a claim to identify the cheapest API on the entire market or models with equivalent quality.
Prices checked October 15, 2026. USD, standard text inference, no cache hits. Taxes, platform fees, tools, retries and special context tiers are excluded.
Which low-cost routes are worth comparing?
Tokely Claude Haiku 5.5: $0.042353 per million input tokens and $0.211764 per million output tokens. The comparison workload costs $0.095294. Tokely pricing.
Tokely GPT-5 Nano: $0.035 input and $0.28 output. The same workload costs $0.105. Tokely pricing.
Tokely Gemini 2.5 Flash-Lite: $0.07 input and $0.28 output. Workload cost: $0.14. Tokely pricing.
Google’s direct Gemini 2.5 Flash-Lite API: $0.10 input and $0.40 output for standard text pricing. Workload cost: $0.20. Google pricing.
Z.AI GLM-5.3-Flash: $0.15 input and $0.50 output. Workload cost: $0.275. Z.AI pricing.
These prices are selected examples, not a performance ordering. Check the model’s supported context and endpoint before applying a rate to a production request. Tokely’s published rates describe its normal route; another selected supplier may change the charge.
Why does the token mix change the winner?
A request-heavy extraction service can be dominated by input, while drafting and coding can produce substantial output. For each candidate, calculate input rate × input volume plus output rate × output volume.
Using the listed Tokely rates, GPT-5 Nano has cheaper uncached input than Haiku 5.5 but more expensive output. For 1 million input tokens, their token-only costs cross at approximately 107,758 output tokens. Below that output volume, Nano is cheaper; above it, Haiku is cheaper, subject to the quoted conditions.
That arithmetic says nothing about which model produces a correct answer for your task.
Should you compare free models too?
Yes, if their quotas and terms suit your use case. Keep free endpoints in a separate comparison because limited capacity is part of the offer. See free AI API limits.
How do you turn a cheap price into a useful decision?
Filter by capability first. Then estimate the bill, evaluate accepted outputs and include retries. A route that saves fractions of a cent but adds manual correction can be more expensive at the product level.
Enter your own token mix in the Tokely calculator, then check the model catalog for the endpoints and capabilities your application requires.