The cheapest LLM API in August 2026 is Groq's Llama 3.1 8B at $0.05 per million input tokens - but the cheapest capable model at production quality is DeepSeek V4 Flash at $0.22/$0.66 per million tokens off-peak after the August 16 repricing, with packet.ai Token Factory serving Llama 3.3 70B at $0.59/M as the lowest rate for that model class.
Key takeaways
Two things happened to LLM API pricing in the six weeks before this post. On July 30, 2026, OpenAI cut GPT-5.6 Luna by 80%, dropping it to $0.20 per million input tokens inside a current flagship family. On August 16, DeepSeek moved V4 Flash from a flat rate to peak/off-peak billing, effectively raising costs during business hours by 50 to 200% depending on the line item. Budgets written in July are wrong in August. This cheapest llm api comparison covers every major provider as of August 24, 2026 with rates verified against official pricing pages and cross-checked against independent tracking services. For the self-hosting math behind these numbers, see the LLM inference cost breakdown.
Every major LLM API bills the same way: per token, split into input and output, quoted per million tokens (MTok). A token is roughly 0.75 words in English, so 1 million tokens is approximately 750,000 words - about 1,500 pages of text. Input tokens cover everything you send: your prompt, system instructions, conversation history, and any documents in context. Output tokens cover what the model generates back.
Output tokens cost 3 to 6x more than input tokens at every major provider - and that multiplier matters more than the headline input rate for most workloads. GPT-5.6 Sol charges 6x its input rate for output. Claude Sonnet 5 charges 5x. DeepSeek V4 Flash charges 3x off-peak. A workload that sends 2,000-token prompts and receives 500-token responses has 80% of its token volume on the cheap side. A chatbot that generates 2,000-token responses to 200-token questions has the opposite problem: the output multiplier dominates the bill.
Three discounts change effective cost without changing the model. Batch APIs at OpenAI, Anthropic, and Google cut every rate 50% for async workloads with up to 24-hour turnaround. Prompt caching drops repeated input prefixes - system prompts, document chunks sent across many requests - to 0.1x the base input price at Anthropic and a similar rate at DeepSeek. Context caching at Google Gemini cuts 80-90% off standard rates for cached content. Stack batch and caching on Anthropic and you pay roughly 25% of on-demand for cached, async workloads.
DeepSeek is the most-searched LLM API provider in August 2026, with search volume up 662% year-over-year on "deepseek api pricing" - and for good reason. V4 Flash was the cheapest capable LLM API on the market at $0.14/$0.28 for most of the year. That changed on August 16, 2026.
On August 16, 2026 at 16:00 UTC, DeepSeek activated peak/off-peak billing across all V4 models. The old flat rate of $0.14/$0.28 for V4 Flash is gone from DeepSeek's own API. Off-peak rates (outside 01:00-04:00 and 06:00-10:00 UTC) are $0.22 input / $0.66 output per million tokens. During peak windows, rates jump to $0.44 input / $1.32 output. For teams running workloads timed to US business hours, the effective rate is the peak rate - not the off-peak headline figure. For a detailed breakdown of what changed and how to route around peak pricing, see the DeepSeek V4 Flash pricing guide.
Source: DeepSeek API documentation, accessed August 21, 2026 via morphllm.com. Third-party providers including Together AI still serve DeepSeek V4 Flash 0731 at the pre-August 16 flat rate of $0.14/$0.28 per million tokens. If flat-rate billing matters for your budget predictability, those third-party hosts are currently the cheapest access route for V4 Flash.
DeepSeek V4 Flash cache hits cost $0.007 per million input tokens off-peak - roughly 97% below the on-demand input rate. For RAG pipelines that send the same system prompt or document context across hundreds of requests, caching is the single largest cost lever available on the DeepSeek API.
All rates below are on-demand per million tokens, verified August 24, 2026. Batch API and caching discounts are noted separately - apply them to on-demand figures to get your real effective rate.
All rates are on-demand per million tokens. Batch API and caching discounts apply on top. Sources: DeepSeek API docs (Aug 21, 2026), morphllm.com, IntuitionLabs, official provider pricing pages. Verify before committing.
packet.ai Token Factory Llama 3.3 70B at $0.59/M is 43% below Together AI's $1.04/M for the same model, with no cold starts, no idle billing, and an OpenAI-compatible API. For teams running GPU workloads on packet.ai already, Token Factory tokens and GPU-hour credits share the same billing account.
Token Factory is packet.ai's managed inference API: OpenAI-compatible endpoint, pay-per-token, no GPU management. It runs on packet.ai's GPU infrastructure, which means the margin structure is different from third-party resellers. Llama 3.3 70B at $0.59/M input and $0.59/M output is the same rate for both directions - no output premium - because the GPU cost at packet.ai's H200 and B200 rates makes that math work.
The current model catalog includes Llama 3.1 8B at $0.06/M, Llama 3.3 70B at $0.59/M, DeepSeek models, Qwen, and Kimi K3 at $1.50/$7.50 per million tokens - 50% below Together AI's list price for Kimi K3. The free tier gives 1 million tokens per day during development with no credit card required. For teams scaling past the free tier, there is no minimum commitment and no contract.
The crossover where self-hosting on packet.ai GPUs beats the Token Factory API is roughly 12 million output tokens per month per model, as the LLM inference cost breakdown shows in detail. Below that threshold, Token Factory is cheaper than the GPU rental math.
Best for: Teams that need OpenAI-compatible inference on open models without managing vLLM, TGI, or SGLang infrastructure. Particularly cost-effective for Llama 3.3 70B and Kimi K3 versus third-party hosts. Explore Token Factory pricing and available models.
The right cheapest LLM API depends entirely on which quality tier your workload needs. A classification pipeline running 100 million tokens per day on Llama 3.1 8B at $0.05/M pays $5/day. The same workload on Claude Opus 5 at $5/M input pays $500/day - 100x more for quality overkill. Most production systems route by task: cheap small models for classification and extraction, mid-tier for summarisation and drafting, frontier only for the subset of queries that require it.
The most cost-effective production architecture is not picking one model - it is routing. Send classification and entity extraction to Llama 3.1 8B at $0.06/M. Send summarisation and drafting to Llama 3.3 70B at $0.59/M. Reserve DeepSeek V4 Flash or GPT-5.6 Luna for complex generation. Reserve Opus 5 or Kimi K3 for the 5-10% of queries that need frontier reasoning. Morph's model router, OpenRouter, and LiteLLM all support this pattern without code changes per model.
For most prototyping workloads, the cheapest LLM API is free. Three providers offer genuinely usable free tiers in August 2026. Groq's free tier runs all supported models (Llama, Qwen, Kimi K2) at 30 requests per minute and 14,400 requests per day with no credit card required - fast enough for development and benchmarking on smaller workloads. Google AI Studio provides free Gemini access with generous rate limits for individuals. packet.ai Token Factory provides 1 million tokens per day free during development.
The practical constraint on free tiers is rate limits, not cost. Groq's 30 RPM ceiling means 1,800 requests per hour - adequate for prototyping a chatbot or running evaluation sweeps, insufficient for production inference above a few hundred concurrent users. When free tier rate limits become the constraint, the decision is whether to pay $0.05/M on Groq's paid tier or move to a provider with higher throughput guarantees at a similar price point.
OpenRouter is worth knowing for prototyping: it routes each request to the cheapest stable provider automatically, at provider list price with no markup, and provides a single API key that works across all connected providers. It is not a production architecture - latency variability and provider routing changes are real - but for evaluation and cost benchmarking across providers, it eliminates the multi-account setup problem.
Self-hosting DeepSeek V3 or Llama 4 on packet.ai GPUs becomes cheaper than the managed API above a specific token volume threshold. The math is straightforward: an 8-GPU H200 node on packet.ai at $2.49/hr costs approximately $1,800/month running continuously. That node serves the full 671B DeepSeek V3 open-weight model at FP8 quantization. The break-even against DeepSeek V4 Flash at $0.22/M input and $0.66/M output off-peak is roughly 2-3 billion tokens per month at typical prompt/completion ratios - a threshold most teams do not hit.
For smaller open-weight models (7B to 70B), the math shifts. A single H100 PCIe on packet.ai at $2.50/hr serves Llama 3.3 70B at approximately 3,000 tokens per second with vLLM and PagedAttention enabled. At 85% utilisation, that node generates roughly 220 million tokens per day. Against packet.ai Token Factory's $0.59/M rate, the crossover is approximately 12 million output tokens per month - reachable for a moderately busy production chatbot. Below that, Token Factory is cheaper. Above it, your own GPU is cheaper.
For teams evaluating the GPU rental side of this decision, packet.ai cluster options include single H100 PCIe at $2.50/hr through to 1,024-GPU B200 InfiniBand clusters. The B200 SXM at $3.75/hr delivers roughly 3x the H200 throughput on large models per MLPerf reporting, which changes the self-hosting math further for teams at scale.
Last reviewed: August 24, 2026. Pricing verified against DeepSeek API documentation (August 21, 2026 via morphllm.com), IntuitionLabs LLM pricing comparison (August 19, 2026), Spheron Network LLM pricing comparison, and official provider pricing pages. LLM API pricing changes frequently - verify on provider pricing pages before committing to a budget. For managed GPU inference on open models, see packet.ai Token Factory. For self-hosted inference infrastructure, browse packet.ai cluster options.
Same models. Same API. Fraction of the cost. Start free — no credit card required.
Start Building →