---
title: "Cheapest LLM API in 2026: Verified Per-1M Rates & Cache Math | Inference.net"
description: "Compare the cheapest LLM API models per 1M fresh, cached, and output tokens on Inference.net with 40-turn coding-agent and extraction cost math."
url: "https://inference.net/guides/cheapest-llm-api/"
---

Guide Published December 06, 2026 7 min read

# Cheapest LLM API in 2026: Verified Per-1M Rates & Cache Math

Compare the cheapest LLM API models per 1M fresh, cached, and output tokens on Inference.net with 40-turn coding-agent and extraction cost math.

[**Inference.net**](https://inference.net/company/)

## Model Your Exact Token Bill

Plug your input tokens, output tokens, and prompt-cache hit rate into the interactive calculator with live catalog rates and 0% markup.

## What is the cheapest LLM API in 2026?

On Inference.net, the cheapest LLM API endpoints start at **`$0.027` per 1M input tokens** for small classification models (`llama-3.2-1b-instruct`) and **`$0.03` input / `$0.15` output per 1M tokens** for dedicated HTML-to-JSON extraction (`inference-net/schematron-v2-turbo`). For 1M-context coding agents with tool calling and vision, [`deepseek-v4.1-flash-1017`](https://inference.net/models/deepseek-v4-1-flash-1017/) costs **`$0.08` fresh input**, **`$0.007` cached input reads**, and **`$0.635` output per 1M tokens** with 0% markup pay-as-you-go billing and default [Zero Data Retention](https://inference.net/zero-data-retention/).

Headline input pricing alone rarely picks the cheapest API for production traffic. In multi-turn coding agents, 80% to 90% of input tokens are repeated context, so **cached read rates** and **output token rates** decide the real monthly invoice.

## Live verified per-1M-token pricing (2026-12-06)

Every model ID, context limit, and per-1M-token rate below was verified directly from `GET https://api.inference.net/v1/models` on **2026-12-06** (the API returns per-token prices; multiply by `1,000,000` for per-1M rates):

| Model ID | Context | Max output | Fresh input ($/1M) | Cached read ($/1M) | Output ($/1M) | Tool calling | Best workload |
| --- | --- | --- | --- | --- | --- | --- | --- |
| [`llama-3.2-1b-instruct`](https://inference.net/models/llama-3-2-1b-instruct/) | 60,000 | 60,000 | `$0.027` | N/A | `$0.201` | No | Simple tagging and routing |
| [`inference-net/schematron-v2-turbo`](https://inference.net/models/schematron-v2-turbo/) | 128,000 | 8,192 | `$0.03` | `$0.03` | `$0.15` | No | High-volume HTML and JSON extraction |
| [`gemma-3-4b-it`](https://inference.net/models/gemma-3-4b-it/) | 131,072 | 8,192 | `$0.05` | N/A | `$0.10` | No | Lightweight text and image classification |
| [`inference-net/schematron-v2-small`](https://inference.net/models/schematron-v2-small/) | 128,000 | 4,096 | `$0.05` | `$0.05` | `$0.23` | No | Complex schema-strict extraction |
| [`deepseek-v4.1-flash-1017`](https://inference.net/models/deepseek-v4-1-flash-1017/) | 1,040,000 | 393,216 | `$0.08` | `$0.007` | `$0.635` | Yes | Coding agents, RAG, and vision |
| [`glm-5.3`](https://inference.net/models/glm-5-3/) | 1,048,576 | 943,718 | `$0.084` | `$0.079` | `$3.00` | Yes | Deep reasoning and long-output synthesis |
| [`minimax-m3.1-flash`](https://inference.net/models/minimax-m3-1-flash/) | 1,000,000 | 524,288 | `$0.10` | `$0.005` | `$0.50` | Yes | Ultra-low-cost coding loops and chat |
| [`glm-5.3-flash`](https://inference.net/models/glm-5-3-flash/) | 1,048,576 | 262,144 | `$0.10` | `$0.03` | `$0.35` | Yes | Output-heavy text, image, and video |
| [`nemotron-3-super`](https://inference.net/models/nemotron-3-super/) | 262,144 | 262,144 | `$0.102` | N/A | `$0.48` | Yes | General tool-calling pipelines |
| [`moonshotai/kimi-k3`](https://inference.net/models/kimi-k3/) | 1,048,576 | 1,048,576 | `$0.245` | `$0.224` | `$15.00` | Yes | Input-heavy synthesis with 1M output ceiling |
| [`deepseek-v4.1-flash-1017-cyber`](https://inference.net/models/deepseek-v4-1-flash-1017-cyber/) | 1,040,000 | 393,216 | `$0.30` | `$0.007` | `$1.00` | Yes | Authorized AppSec and pentesting (Privileged Access) |
| [`moonshotai/kimi-k3.1-pro`](https://inference.net/models/kimi-k3-1-pro/) | 1,048,576 | 1,048,576 | `$1.80` | `$0.198` | `$9.00` | Yes | Frontier open-weight agentic architecture |

_All models above accept OpenAI `/v1/chat/completions`, `/v1/responses`, and native Anthropic `/v1/messages` with one API key. Browse the full [model catalog](https://inference.net/models/) or inspect [DeepSeek API pricing](https://inference.net/guides/deepseek-api-pricing/) for every DeepSeek snapshot._

## Why cheapest input price does not equal cheapest monthly bill

Three pricing traps invert the rankings once real traffic hits production:

1. **Cached read discounts dominate multi-turn agents.** `deepseek-v4.1-flash-1017` discounts cached reads by 91.3% (`$0.08` down to `$0.007/1M`), and `minimax-m3.1-flash` discounts cached reads by 95.0% (`$0.10` down to `$0.005/1M`). A model with cheap uncached input and minimal caching discount can cost more by turn five.
2. **Output token pricing carries the bill when caching works.** Once 85% of input tokens hit cache, output tokens often represent 50% to 75% of total spend. For example, `glm-5.3` has a very low `$0.084/1M` fresh input rate, but its `$3.00/1M` output rate makes it 4.6x pricier per coding-agent session than `deepseek-v4.1-flash-1017`.
3. **Output-heavy vs. input-heavy ratios flip model pairs.** `moonshotai/kimi-k3` (`$0.245` fresh input, `$15.00` output) is cheaper than `moonshotai/kimi-k3.1-pro` (`$1.80` fresh input, `$0.198` cached, `$9.00` output) on single-turn, input-heavy summarization. On long multi-turn coding sessions with 85% cache hits, `moonshotai/kimi-k3.1-pro` actually costs less per session because its cached read and output rates are lower.

## Workload 1: 40-turn coding-agent session math

This calculation uses the exact shape of our [Coding Agent preset](https://inference.net/tools/llm-pricing-calculator/?preset=coding-agent): **40 turns per session**, **14,000 average input tokens per turn** (`560K` total input: `84K` fresh + `476K` cached at an **85% cache hit rate**), and **900 average output tokens per turn** (`36K` total output). The rightmost column scales that workload to **750,000 requests/month** (18,750 sessions: `1,575M` fresh input, `8,925M` cached reads, and `675M` output tokens).

| Model ID | Fresh input (84K) | Cached read (476K) | Output (36K) | Cost per 40-turn session | Monthly (750K reqs) |
| --- | --- | --- | --- | --- | --- |
| `minimax-m3.1-flash` | `$0.0084` | `$0.0024` | `$0.0180` | **`$0.0288`** | **`$539.63`** |
| `deepseek-v4.1-flash-1017` | `$0.0067` | `$0.0033` | `$0.0229` | **`$0.0329`** | **`$617.10`** |
| `glm-5.3-flash` | `$0.0084` | `$0.0143` | `$0.0126` | **`$0.0353`** | **`$661.50`** |
| `deepseek-v4.1-flash-1017-cyber` | `$0.0252` | `$0.0033` | `$0.0360` | **`$0.0645`** | **`$1,209.98`** |
| `glm-5.3` | `$0.0071` | `$0.0376` | `$0.1080` | **`$0.1527`** | **`$2,862.38`** |
| `moonshotai/kimi-k3.1-pro` | `$0.1512` | `$0.0942` | `$0.3240` | **`$0.5694`** | **`$10,677.15`** |
| `moonshotai/kimi-k3` | `$0.0206` | `$0.1066` | `$0.5400` | **`$0.6672`** | **`$12,510.08`** |
| `claude-sonnet-4-6` (reference) | `$0.2520` | `$0.1428` | `$0.5400` | **`$0.9348`** | **`$17,527.50`** |

Key takeaways from the coding-agent math:

- **Under four cents per 40-turn session:** `minimax-m3.1-flash` (`$0.0288`), `deepseek-v4.1-flash-1017` (`$0.0329`), and `glm-5.3-flash` (`$0.0353`) run 26x to 32x cheaper than `claude-sonnet-4-6` (`$0.9348`).
- **Caching cuts DeepSeek session cost in half:** Without prompt caching, that same 40-turn session on `deepseek-v4.1-flash-1017` rises from `$0.0329` to `$0.0677` (2.06x higher). On `deepseek-v4.1-flash-1017-cyber`, caching cuts session cost by 3.16x (`$0.0645` vs `$0.2040`).
- **Interactive modeling:** Adjust turn count, cache hit rate, and monthly request volume in the [LLM Pricing Calculator (Coding Agent preset)](https://inference.net/tools/llm-pricing-calculator/?preset=coding-agent) or isolate prefix-cache savings in the [Prompt Cache Calculator](https://inference.net/tools/prompt-cache-calculator/).

## Workload 2: High-volume HTML and JSON extraction math

Structured extraction pipelines process many short documents with a repeated system prompt and JSON schema. Here is the cost for **100,000 documents** with **3,500 input tokens per document** (60% shared prompt/schema = `140M` fresh input + `210M` cached reads) and **350 output tokens per document** (`35M` output):

| Model ID | Fresh input (140M) | Cached read (210M) | Output (35M) | Total for 100K docs | Cost per 1,000 docs |
| --- | --- | --- | --- | --- | --- |
| `inference-net/schematron-v2-turbo` | `$4.20` | `$6.30` | `$5.25` | **`$15.75`** | **`$0.16`** |
| `inference-net/schematron-v2-small` | `$7.00` | `$10.50` | `$8.05` | **`$25.55`** | **`$0.26`** |
| `glm-5.3-flash` | `$14.00` | `$6.30` | `$12.25` | **`$32.55`** | **`$0.33`** |
| `minimax-m3.1-flash` | `$14.00` | `$1.05` | `$17.50` | **`$32.55`** | **`$0.33`** |
| `deepseek-v4.1-flash-1017` | `$11.20` | `$1.47` | `$22.23` | **`$34.90`** | **`$0.35`** |

Even though `inference-net/schematron-v2-turbo` bills cached and fresh input at the same `$0.03/1M` rate, its ultra-low base input and `$0.15/1M` output rate make it the cheapest option by more than 2x for pure text/HTML-to-JSON extraction. Switch to `glm-5.3-flash` or `deepseek-v4.1-flash-1017` when extraction also requires image inputs or tool calling (see [Schematron docs](https://inference.net/docs/api/models/schematron/) and [Structured outputs](https://inference.net/docs/api/structured-outputs/)).

## How to keep effective API costs low in production

1. **Match prompt caching rules to each model family:**
  - **`deepseek-v4.1-flash-1017` and `deepseek-v4.1-flash-1017-cyber`:** Automatic prefix caching. Omit `prompt_cache_key` and keep everything before the changing user turn byte-identical.
    - **`glm-5.3` and `glm-5.3-flash`:** Pass a stable `prompt_cache_key` per conversation or shared system prefix alongside byte-identical leading messages.
    - **`moonshotai/kimi-k3` and `moonshotai/kimi-k3.1-pro`:** Automatic implicit prefix caching on stable leading prefixes.
2. **Disable reasoning on deterministic ETL tasks:** `deepseek-v4.1-flash-1017` thinks by default, and thinking tokens bill at the output rate. For classification or JSON extraction where reasoning adds cost without accuracy gain, pass `"reasoning_effort": "none"` (see [Reasoning docs](https://inference.net/docs/api/reasoning/)).
3. **Route by task tier on one API key:** Send scraping and JSON parsing to `inference-net/schematron-v2-turbo`, daily coding loops to `deepseek-v4.1-flash-1017`, and complex architectural refactors to `glm-5.3` or `moonshotai/kimi-k3.1-pro`.
4. **Use direct serverless providers to avoid aggregator fees:** Calling direct GPU hosts avoids marketplace credit fees and keeps prefix-cache stickiness high across turns (see [Inference.net vs OpenRouter](https://inference.net/compare/inference-net-vs-openrouter/) and [Provider comparisons](https://inference.net/compare/)).

## Copy-paste Python example with live cost accounting

Create an API key in [API keys](https://inference.net/dashboard/api-keys/) (or [register here](https://inference.net/register/?model=deepseek-v4.1-flash-1017)) and run this script to measure cached tokens and exact request cost:

python

```python
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.inference.net/v1",  # or https://us.api.inference.net/v1
    api_key=os.environ["INFERENCE_API_KEY"],
)

MODEL = "deepseek-v4.1-flash-1017"
RATES_PER_1M = {"input": 0.08, "cached": 0.007, "output": 0.635}

stream = client.chat.completions.create(
    model=MODEL,
    stream=True,
    stream_options={"include_usage": True},
    messages=[
        {"role": "system", "content": "You are a concise systems engineer."},
        {"role": "user", "content": "Write a Go token-bucket rate limiter in 30 lines."},
    ],
)

for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
    if chunk.usage:
        prompt_tokens = chunk.usage.prompt_tokens
        cached_tokens = getattr(chunk.usage.prompt_tokens_details, "cached_tokens", 0) or 0
        fresh_tokens = max(0, prompt_tokens - cached_tokens)
        output_tokens = chunk.usage.completion_tokens
        cost_usd = (
            fresh_tokens * RATES_PER_1M["input"]
            + cached_tokens * RATES_PER_1M["cached"]
            + output_tokens * RATES_PER_1M["output"]
        ) / 1_000_000
        print(f"\n[cost] fresh={fresh_tokens} cached={cached_tokens} out={output_tokens} usd=${cost_usd:.6f}")
```

## Related pricing calculators, comparisons, and guides

- **Interactive tools:** [LLM Pricing Calculator (Coding Agent preset)](https://inference.net/tools/llm-pricing-calculator/?preset=coding-agent) · [Prompt Cache Calculator](https://inference.net/tools/prompt-cache-calculator/) · [Live Benchmarks](https://inference.net/benchmarks/)
- **Provider and model comparisons:** [All Comparisons](https://inference.net/compare/) · [Inference.net vs OpenRouter](https://inference.net/compare/inference-net-vs-openrouter/) · [Inference.net vs DeepInfra](https://inference.net/compare/inference-net-vs-deepinfra/) · [Inference.net vs Together AI](https://inference.net/compare/inference-net-vs-together-ai/) · [Inference.net vs Fireworks AI](https://inference.net/compare/inference-net-vs-fireworks-ai/)
- **Next guides:** [Best Open-Source LLMs in 2026](https://inference.net/guides/best-open-source-llms/) · [DeepSeek API Pricing](https://inference.net/guides/deepseek-api-pricing/) · [OpenRouter Alternatives](https://inference.net/guides/openrouter-alternatives/)

### Start calling DeepSeek V4.1 Flash at $0.08/1M input

Create a free Inference.net API key to run DeepSeek V4.1 Flash, Schematron V2 Turbo, GLM 5.3, and Kimi K3 with 0% markup pay-as-you-go billing and default Zero Data Retention.

[Create API key](https://inference.net/register/?model=deepseek-v4.1-flash-1017)

Estimate Your Inference Bill

## Calculate your monthly LLM API & prompt-cache spend

Compare live input, cached-read, and output token pricing across every open-weight and frontier model on Inference.net with 0% markup.

[Open pricing calculator](https://inference.net/tools/llm-pricing-calculator/) [Explore model catalog](https://inference.net/models/)

## Related reading & models

[Back to all guides](https://inference.net/guides/)

[Guide December 05, 2026 **DeepSeek API Pricing: Live Rates, Caching Math, and Models** Live DeepSeek API pricing per 1M tokens for V4.1 Flash, V4 Pro, Cyber, and V3.2 on Inference.net, with prompt caching math and copy-paste code snippets. Read more](https://inference.net/guides/deepseek-api-pricing/) [Guide December 06, 2026 **GLM-5 Pricing: GLM-5.3, Flash & GLM-5.2 API Rates** Live GLM-5.3, GLM-5.3 Flash, and GLM-5.2 API pricing per 1M tokens on Inference.net, with prompt_cache_key rules, 40-turn session math, and SDK setup. Read more](https://inference.net/guides/glm-5-pricing/) [Guide December 06, 2026 **Kimi K3 Pricing: K3.1 Pro, K3, Fast & K2.6 API Rates** Live Kimi K3 and Kimi K3.1 Pro API pricing per 1M tokens on Inference.net, with 1M-context specs, 40-turn prompt-cache math, and SDK quickstarts. Read more](https://inference.net/guides/kimi-k3-pricing/) [Article February 21, 2026 **LLM API Pricing Comparison 2026: Live Rates** Compare 2026 LLM API pricing across DeepSeek V4.1 Flash ($0.103/$0.60), Kimi K3.1 Pro, GLM-5.3, GPT, and Claude, plus $0.007/1M prompt cache savings. Read more](https://inference.net/content/llm-api-pricing-comparison/)

[**Explore serverless models** Compare open-weight and frontier models, context windows, and per-token pricing.](https://inference.net/models/) [**Inference Pass plans** Predictable monthly access for coding agents and high-volume OpenAI-compatible API workloads.](https://inference.net/subscription/)
