Cost-effective AI models: LLM API pricing comparison

Cost-effective here means the list price per million input and output tokens, weighed against context length, open weights, and what you need the model to do — not a single “best” score.

This table uses each vendor’s published API rates. DeepSeek peak prices for deepseek-flash are $0.30 input and $1.20 output per 1M tokens (cache-hit input $0.006); off-peak is half.

Smaller open models on inference hosts can list lower per-token prices than frontier APIs; DeepSeek’s case is strong capability per dollar, 1M context on Flash, and off-peak discounts — not the lowest token price in the market.

Checked on 26 Oct 2026 against DeepSeek Models & Pricing.

Official sources

What “cost-effective” means here

We compare published list prices per million tokens (input, output, and cache-hit input when the vendor publishes it) against context length and whether weights are open. This is an unofficial directory; verify numbers on the linked pricing pages before you budget.

API price comparison table

USD unless noted as CNY (¥). Rows without a cache column value mean the provider did not list a cache-hit input price on the cited page.

ModelIn / MOut / MCache in / MContextOpen weightsSource

DeepSeek-V4.1-Flash (API: deepseek-flash)

DeepSeek

Peak cache-miss input; off-peak is half.

$0.30$1.20$0.0061MYesDeepSeek Models & Pricing

Checked 19 Oct 2026

DeepSeek-V4-Pro-0813 (API: deepseek-v4-pro)

DeepSeek

Peak cache-miss input; off-peak is half.

$1.32$3.96$0.0441MYesDeepSeek Models & Pricing

Checked 19 Oct 2026

gpt-4.1-mini

OpenAI

Standard tier.

$0.40$1.60$0.101MNoOpenAI API pricing

Checked 19 Oct 2026

o3

OpenAI

Standard tier.

$2.00$8.00$0.50200KNoOpenAI o3 model page

Checked 19 Oct 2026

Claude Sonnet 5.5

Anthropic

$2.00$10.0$0.101MNoAnthropic API pricing

Checked 19 Oct 2026

Claude Haiku 5.5 (prompts up to 100K tokens)

Anthropic

Higher input/output rates apply above 100K prompt tokens.

$0.10$0.50$0.0101MNoAnthropic API pricing

Checked 19 Oct 2026

gemini-3.8-flash

Google

Paid tier, standard; listed through 31 Dec 2026 on the pricing page.

$0.75$3.75$0.0751MNoGemini API pricing

Checked 19 Oct 2026

qwen3.8-flash (Singapore, international)

Alibaba Cloud (Qwen)

Context cache billed separately; see Alibaba Context Cache doc.

$0.15$0.47—1MYesModel Studio billing

Checked 19 Oct 2026

Mistral Small 4

Mistral

$0.15$0.60$0.0151MYesMistral API pricing

Checked 19 Oct 2026

Codestral

Mistral

$0.30$0.90$0.030256KNoMistral API pricing

Checked 19 Oct 2026

GLM-5.3

Zhipu (BigModel)

¥8.00¥28.0¥2.001MNoZhipu API pricing

Checked 19 Oct 2026

kimi-k3

Moonshot (Kimi)

¥20.0¥100.0¥2.001MNoKimi API pricing

Checked 19 Oct 2026

kimi-k2.7-code

Moonshot (Kimi)

¥6.50¥27.0¥1.30256KNoKimi API pricing

Checked 19 Oct 2026

openai/gpt-oss-20b

Groq

$0.075$0.30—131KYesGroq supported models

Checked 19 Oct 2026

Meta-Llama-3.1-8B-Instruct-Turbo

DeepInfra

Hosted open weights; per DeepInfra list price.

$0.020$0.040—128KYesDeepInfra pricing

Checked 19 Oct 2026

By use case (list price only)

Coding and agents

Models tagged for coding on this page include DeepSeek-V4.1-Flash (API: deepseek-flash); gpt-4.1-mini; Claude Sonnet 5.5; Claude Haiku 5.5 (prompts up to 100K tokens); gemini-3.8-flash; Mistral Small 4; Codestral; kimi-k2.7-code; openai/gpt-oss-20b; Meta-Llama-3.1-8B-Instruct-Turbo. Lower output $/M on the table can reduce spend for high-volume codegen, but tool-use quality is not priced in tokens — run your own evals.

One-million-token context

Rows with 1M context include DeepSeek-V4.1-Flash (API: deepseek-flash); DeepSeek-V4-Pro-0813 (API: deepseek-v4-pro); Claude Sonnet 5.5; gemini-3.8-flash; qwen3.8-flash (Singapore, international); GLM-5.3; kimi-k3. Long-context requests bill for all input tokens; a cheap $/M rate still adds up over hundreds of thousands of tokens.

Reasoning-heavy workloads

Reasoning-oriented list prices on this page include DeepSeek-V4-Pro-0813 (API: deepseek-v4-pro); o3; Claude Sonnet 5.5; GLM-5.3; kimi-k3. Thinking or chain-of-thought output can exceed simple chat token counts; check each vendor’s billing notes for thinking tokens.

Worked example (USD rows)

Assume 1,000 API calls, each with 2,000 input tokens and 500 output tokens, using cache-miss input rates from the table (no caching).

ModelEst. total (USD)
DeepSeek-V4.1-Flash (API: deepseek-flash)$1.20
DeepSeek-V4-Pro-0813 (API: deepseek-v4-pro)$4.62
gpt-4.1-mini$1.60
o3$8.00
Claude Sonnet 5.5$9.00
Claude Haiku 5.5 (prompts up to 100K tokens)$0.45

Formula per request: (2000/1,000,000 × input $/M) + (500/1,000,000 × output $/M). CNY-priced APIs are omitted from this USD example.

Where DeepSeek fits

DeepSeek is not always the lowest per-token API on the market — hosted small open models such as Meta-Llama-3.1-8B-Instruct-Turbo on DeepInfra publish lower list rates in our table. DeepSeek's documented advantages are comparatively low peak prices for a frontier-class Flash line, 50% off-peak billing, and deepseek-flash with 1M context on the official pricing page. We do not claim DeepSeek is the "cheapest" or "best" overall without your own benchmarks.

FAQ

It is the balance of list price per million tokens (input, output, and cache hits where published), context window, and whether the model fits your task.

This unofficial guide does not score quality. Compare official prices first, then run your own evals for coding, long context, or reasoning workloads.

Not always. Hosted small open-weight models can publish lower per-token rates than frontier APIs.

List prices vary by provider; coding-oriented rows in our table include DeepSeek Flash, Mistral Codestral, OpenAI gpt-4.1-mini, and Kimi K2.7 Code.

Whenever you ship or at least monthly — vendors change list prices on their pricing pages.