Home β€Ί APIs β€Ί DeepSeek

DeepSeek API β€” pricing, free tier & how to get a key

DeepSeek's API is one of the cheapest ways to run a capable large-language model in production. It powers DeepSeek-V3 (fast chat) and DeepSeek-R1 (step-by-step reasoning), is OpenAI-compatible, and undercuts most US providers on price. Here's what it costs and how to get your key.

DeepSeek API pricing (reference, June 2026)

ModelInput $/1MOutput $/1MBest for
DeepSeek-V3 (chat) cheapest$0.27$1.10General tasks, high volume
DeepSeek-R1 (reasoner)$0.55$2.19Hard reasoning, math, code
V3 β€” cached input$0.07β€”Repeated context (big discount)
⚠️ Reference prices, June 2026 β€” DeepSeek updates pricing and runs off-peak discounts. Confirm on api-docs.deepseek.com before budgeting. Prices are per 1M tokens; output is billed separately and costs more. Cached-input (repeated context) is billed at a large discount.

β†’ Estimate your bill on the AI API cost calculator (DeepSeek-V3 is included) or model a whole app with the AI app cost estimator.

Is there a free tier?

DeepSeek has no permanent free tier, but pricing is so low that a small top-up lasts a long time, and new accounts sometimes get a modest starting credit. If you specifically need a free quota with no card, Google Gemini is the better fit; if you just want the lowest pay-as-you-go cost, DeepSeek-V3 is hard to beat.

How to get a DeepSeek API key (step by step)

1. Go to platform.deepseek.com and create an account.
2. Open API keys and click Create new API key; copy it once (you can't view it again).
3. Add a small credit top-up under Billing β€” usage is deducted from your balance.
4. Point your code at the DeepSeek base URL. It's OpenAI-compatible, so existing OpenAI SDKs work by swapping the base URL and key.

Test it with a simple request:

# quick test (replace $DEEPSEEK_API_KEY)
curl https://api.deepseek.com/chat/completions \
-H "Authorization: Bearer $DEEPSEEK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-chat","messages":[{"role":"user","content":"hi"}]}'

Estimate your cost

Use the AI API Cost Calculator to plug in your token counts and request volume β€” it ranks DeepSeek against GPT-4o, Claude and Gemini from cheapest to most expensive for your exact workload.

Cheaper alternatives

DeepSeek is already at the cheap end. The closest rivals are Gemini 2.0 Flash ($0.10/$0.40) and GPT-4o mini ($0.15/$0.60) for simple high-volume tasks. For reasoning on a budget, DeepSeek-R1 competes with much pricier models like o3.

FAQ

Is the DeepSeek API cheap?

Yes β€” among the cheapest capable APIs. DeepSeek-V3 is ~$0.27/$1.10 per 1M tokens, with off-peak and cached-input discounts that cut costs further.

How do I get a DeepSeek API key?

Sign up at platform.deepseek.com, create a key in the API keys section, copy it once, and add a small credit balance. The API is OpenAI-compatible.

DeepSeek-V3 vs R1 β€” which should I use?

V3 for most chat and generation tasks; R1 (the reasoner) for hard math, logic and code where step-by-step thinking helps β€” it costs more, especially on output.

Can I use OpenAI libraries with DeepSeek?

Yes. DeepSeek's API is OpenAI-compatible β€” change the base URL to api.deepseek.com and use your DeepSeek key.

Not affiliated with DeepSeek. Prices are reference estimates β€” always verify on the official pricing page.