DeepSeek API

Official API for DeepSeek-V4.1 Flash and V4 Pro models.

By Deep exploration

What is DeepSeek API?

DeepSeek API is the official developer platform for DeepSeek's models, offering chat and reasoning models through OpenAI-compatible and Anthropic-compatible endpoints. The current lineup is deepseek-flash (DeepSeek-V4.1-Flash, 1M-token context) and deepseek-v4-pro, both supporting thinking and non-thinking modes, JSON output, tool calls and vision (Flash). Billing is pay-as-you-go per token, with off-peak rates at half of peak rates.

Developers building on DeepSeek models with a low-cost API.

What you can do

  • Very low cost — Flash input from $0.15 per 1M tokens off-peak; no subscription required
  • 1M context — Both current models support a 1,000,000-token context window
  • OpenAI-compatible — Drop-in replacement for OpenAI-format clients and SDKs
  • Thinking modes — Switchable thinking and non-thinking modes on the same models

Where it fits

Useful for

  • Low-cost model API
  • Built-in search and file tools
  • DeepSeek model access

Before you choose

  • No free tier on the API platform; peak-hour rates are double off-peak rates.

Capabilities

Text chat

A playground lets you chat with models; the product itself is an API, not a chatbot.

File upload & analysis

File inputs are supported by some models and endpoints.

Image understanding & editing

Vision models read images through the API.

Voice & audio

No voice endpoints.

Web search

Web search is available through a dedicated endpoint.

Code generation & execution

Code execution or code models are available through the API.

Reasoning & deep research

Reasoning models are available through the API.

Autonomous agent

Agent frameworks and tool-calling are supported through the API.

API access

Core product: a developer API with usage-based pricing.

Pricing & plans

Prices checked 11/25/2026

Pay as you go

$0.15–$3.96 per 1M tokens month
  • No subscription; billed per token by model, cache hit/miss and peak/off-peak hours
Plan details ↗

API pricing

per 1M tokens

Model / serviceInputOutputCache readCache write
deepseek-flash$0.30 peak / $0.15 off-peak$1.20 peak / $0.60 off-peak——
deepseek-v4-pro$1.32 peak / $0.66 off-peak$3.96 peak / $1.98 off-peak——

Usage-based billing only; no subscription tiers. USD prices from official docs; CNY approximate at ~¥7.2/$. Official DeepSeek API docs, 2026-11-24. Off-peak rates are half of peak rates; peak hours are 01:00-04:00 and 06:00-10:00 UTC on weekdays. USD figures are official; CNY figures are approximate conversions at ~¥7.2 per $1.

Official pricing ↗

Questions and answers

How much does the DeepSeek API cost?

Pay-as-you-go per token. deepseek-flash: input $0.15 off-peak / $0.30 peak per 1M tokens (cache hit $0.003 / $0.006), output $0.60 / $1.20. deepseek-v4-pro: input $0.66 / $1.32, output $1.98 / $3.96 per 1M tokens. CNY equivalents are about ¥1.08–¥2.16 input and ¥4.32–¥8.64 output for Flash (approx. at ¥7.2/$).

Is it compatible with OpenAI clients?

Yes. The base URL api.deepseek.com works with OpenAI-format SDKs, and an Anthropic-format endpoint is also available.

What is the context length?

Both current models support a 1M-token context window, with up to 384K output tokens on Flash.

Explore similar tools

Scikit Learn

AI Dev Platforms

The most popular open-source machine learning library, complete with classic algorithms and unified APIs, covering everything from classification regression to clustering and dimensionality reduction, with abundant docum…

FreeWindows · macOS · Linux
13

OpenRouter

AI Dev Platforms

A single key calls hundreds of models, real-time price and availability comparison, supports automatic failover and cost-based routing, unified billing, suitable for multi-model access and backup solutions, and some smal…

Free / FreemiumWeb · API
13

Hugging Face

AI Dev Platforms

Open-source model and dataset hub with inference APIs.

Free / FreemiumWeb · iOS · Android
13

TensorFlow

AI Dev Platforms

Google's open-source machine learning framework has a complete ecosystem, offering mature toolchains from model training and industrial deployment to mobile and browser inference, suitable for teams that prioritize imple…

FreeWeb · Windows · macOS
12
Comments Be the First to Comment

Please log in to comment

    No comments yet