DeepSeek API
Run live DeepSeek models through one serverless Inference.net API with OpenAI /v1/chat/completions and native Anthropic /v1/messages support. Compare live per-token pricing, cached-read discounts, and context windows across DeepSeek V4.1 Flash, DeepSeek V4 Pro, and DeepSeek V3.2, with default Zero Data Retention on eligible Inference.net-hosted routes (externally routed models follow upstream provider retention terms).
- Serverless per-token billing with automatic prompt caching on supported routes
- Zero Data Retention (ZDR) by default on eligible Inference.net-hosted routes (SOC 2 Type II)
- OpenAI /v1/chat/completions and native Anthropic /v1/messages support
- US-hosted endpoints (us.api.inference.net) for supported DeepSeek routes
All live DeepSeek models on Inference.net
Every rate, context limit, and capability below is pulled directly from the live public catalog. Select any model for full specs, live latency benchmarks, and prompt-caching guidance.
| Model | Context | Max output | Input / 1M | Cached / 1M | Output / 1M | Capabilities | Start |
|---|---|---|---|---|---|---|---|
DeepSeek V4.1 Flash 1017 deepseek-v4.1-flash-1017 | 1M | 393K | $0.08 | $0.007 | $0.635 | Vision, Tools, Reasoning | Use API |
DeepSeek V4.1 Flash deepseek-v4.1-flash | 1M | 393K | $0.103 | $0.007 | $0.60 | Vision, Tools, Reasoning | Use API |
DeepSeek V4 Pro deepseek-v4-pro | 1M | 384K | $2.10 | $0.004 | $4.20 | Tools | Use API |
DeepSeek V4 Pro (0813) deepseek-v4-pro-0813 | 1M | 131K | $1.32 | $0.044 | $3.96 | Tools | Use API |
DeepSeek V4 Flash deepseek-v4-flash | 1M | 384K | $0.23 | $0.003 | $0.62 | Tools | Use API |
DeepSeek V4 Flash (0731) deepseek-v4-flash-0731 | 1M | 1M | $0.53 | $0.017 | $1.58 | Tools, Reasoning | Use API |
DeepSeek V3.2 deepseek-v3.2 | 164K | 66K | $0.70 | $0.35 | $2.00 | Text | Use API |
DeepSeek V4.1 Flash 1017 Cyber deepseek-v4.1-flash-1017-cyber | 1M | 393K | $0.30 | $0.007 | $1.00 | Vision, Tools, Reasoning | Use API |
Call DeepSeek over OpenAI or Anthropic SDKs
Use the top live model ID (deepseek-v4.1-flash-1017) with the standard OpenAI SDK, curl, or Claude Code over native /v1/messages.
import OpenAI from 'openai'
const client = new OpenAI({
baseURL: 'https://api.inference.net/v1',
apiKey: process.env.INFERENCE_API_KEY,
})
const completion = await client.chat.completions.create({
model: 'deepseek-v4.1-flash-1017',
messages: [{ role: 'user', content: 'Hello' }],
})import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.inference.net/v1",
api_key=os.environ["INFERENCE_API_KEY"],
)
completion = client.chat.completions.create(
model="deepseek-v4.1-flash-1017",
messages=[{"role": "user", "content": "Hello"}],
)curl https://api.inference.net/v1/chat/completions \
-H "Authorization: Bearer $INFERENCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4.1-flash-1017",
"messages": [
{ "role": "user", "content": "Hello" }
]
}'Point Claude Code or any Anthropic SDK client at Inference.net with zero proxy setup and full prompt-cache support.
export ANTHROPIC_BASE_URL="https://api.inference.net"
export ANTHROPIC_AUTH_TOKEN="$INFERENCE_API_KEY"
export ANTHROPIC_MODEL='deepseek-v4.1-flash-1017[1m]'
export ANTHROPIC_DEFAULT_OPUS_MODEL='deepseek-v4.1-flash-1017[1m]'
export ANTHROPIC_DEFAULT_SONNET_MODEL='deepseek-v4.1-flash-1017[1m]'
export ANTHROPIC_DEFAULT_HAIKU_MODEL='deepseek-v4.1-flash-1017[1m]'
export CLAUDE_CODE_SUBAGENT_MODEL='deepseek-v4.1-flash-1017[1m]'
claudeBenchmark, compare, and model DeepSeek costs
Verify unit economics across prompt-cache hit rates, compare providers, and explore engineering guides for DeepSeek.
Explore other open-weight model families
Switch across DeepSeek, Kimi, GLM, and the full catalog with one API key and one OpenAI-compatible client.
Frequently asked questions.
Quick answers to help you get started
Inference.net currently serves 8 live DeepSeek models with transparent pay-as-you-go per-token billing. Input rates start at $0.08 per 1M input tokens ($0.635 per 1M output tokens) on DeepSeek V4.1 Flash 1017. Every rate in the comparison table above pulls directly from the live public catalog.
Yes. On supported DeepSeek routes such as DeepSeek V4.1 Flash and DeepSeek V4 Pro, keeping repeated system instructions, tool schemas, and repository context byte-identical across turns unlocks automatic prefix caching (caching is unavailable on DeepSeek V3.2). On DeepSeek V4.1 Flash 1017, cached input reads are $0.007 per 1M tokens (91% less than standard input). Estimate multi-turn savings with the Prompt Cache Calculator.
Yes. Point the official OpenAI TypeScript or Python SDK to https://api.inference.net/v1 with your INFERENCE_API_KEY and set model to "deepseek-v4.1-flash-1017". You can also call supported DeepSeek models over the native Anthropic /v1/messages endpoint for Anthropic SDK apps and Claude Code.
Yes, on eligible Inference.net-hosted routes. Zero Data Retention (ZDR) is enabled by default for new accounts under SOC 2 Type II controls, so prompts and completions on Inference.net-hosted models are not stored after processing or used to train models. Externally routed catalog models (such as DeepSeek V4 Pro and DeepSeek V3.2) are excluded from our ZDR policy and follow their upstream provider's data-handling and retention terms. Review our ZDR policy for full details. Supported US-hosted DeepSeek routes also expose a dedicated US-pinned endpoint at https://us.api.inference.net/v1.
Live DeepSeek models on Inference.net scale up to a 1M-token context window (1,048,576 tokens) and up to 384K output tokens on DeepSeek V4 Pro. Context limits and caching vary by checkpoint, so check each model row above for exact specs and multimodal capabilities.
Start calling DeepSeek in minutes
Create a project API key with Zero Data Retention enabled by default on eligible Inference.net-hosted routes and route requests to deepseek-v4.1-flash-1017 with pay-as-you-go billing.