---
title: "DeepSeek API: V4.1 Flash, V4 Pro & Pricing | Inference.net"
description: "Run DeepSeek V4.1 Flash, V4 Pro, and V3.2 on one serverless API. Live pricing, caching on supported routes, hosted ZDR, and OpenAI or Anthropic SDKs."
url: "https://inference.net/models/deepseek/"
---

DEEPSEEK API

# 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

[Get DeepSeek API key](https://inference.net/register/?model=deepseek-v4-1-flash-1017) [Estimate monthly cost](https://inference.net/tools/llm-pricing-calculator/) [Full model catalog](https://inference.net/models/)

LIVE CATALOG & PRICING

## 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](https://inference.net/models/deepseek-v4-1-flash-1017/) `deepseek-v4.1-flash-1017` | 1M | 393K | $0.08 | $0.007 | $0.635 | Vision, Tools, Reasoning | [Use API](https://inference.net/register/?model=deepseek-v4-1-flash-1017) |
| [DeepSeek V4.1 Flash](https://inference.net/models/deepseek-v4-1-flash/) `deepseek-v4.1-flash` | 1M | 393K | $0.103 | $0.007 | $0.60 | Vision, Tools, Reasoning | [Use API](https://inference.net/register/?model=deepseek-v4-1-flash) |
| [DeepSeek V4 Pro](https://inference.net/models/deepseek-v4-pro/) `deepseek-v4-pro` | 1M | 384K | $2.10 | $0.004 | $4.20 | Tools | [Use API](https://inference.net/register/?model=deepseek-v4-pro) |
| [DeepSeek V4 Pro (0813)](https://inference.net/models/deepseek-v4-pro-0813/) `deepseek-v4-pro-0813` | 1M | 131K | $1.32 | $0.044 | $3.96 | Tools | [Use API](https://inference.net/register/?model=deepseek-v4-pro-0813) |
| [DeepSeek V4 Flash](https://inference.net/models/deepseek-v4-flash/) `deepseek-v4-flash` | 1M | 384K | $0.23 | $0.003 | $0.62 | Tools | [Use API](https://inference.net/register/?model=deepseek-v4-flash) |
| [DeepSeek V4 Flash (0731)](https://inference.net/models/deepseek-v4-flash-0731/) `deepseek-v4-flash-0731` | 1M | 1M | $0.53 | $0.017 | $1.58 | Tools, Reasoning | [Use API](https://inference.net/register/?model=deepseek-v4-flash-0731) |
| [DeepSeek V3.2](https://inference.net/models/deepseek-v3-2/) `deepseek-v3.2` | 164K | 66K | $0.70 | $0.35 | $2.00 | Text | [Use API](https://inference.net/register/?model=deepseek-v3-2) |
| [DeepSeek V4.1 Flash 1017 Cyber](https://inference.net/models/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](https://inference.net/register/?model=deepseek-v4-1-flash-1017-cyber) |

QUICKSTART

## 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`.

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

```typescript
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' }],
})
```

```python
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
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" }
    ]
  }'
```

CLAUDE CODE & ANTHROPIC /V1/MESSAGES

Point Claude Code or any Anthropic SDK client at Inference.net with zero proxy setup and full prompt-cache support.

```bash
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]'
claude
```

[Claude Code setup guide](https://inference.net/docs/integrations/claude-code/) [Anthropic SDK docs](https://inference.net/docs/api/anthropic-sdk/)

COMPARISONS, GUIDES & TOOLS

## Benchmark, compare, and model DeepSeek costs

Verify unit economics across prompt-cache hit rates, compare providers, and explore engineering guides for DeepSeek.

[COMPARISON Inference.net vs DeepSeek API Compare US residency, default ZDR, prompt caching, and multi-model access against api.deepseek.com. Read comparison](https://inference.net/compare/inference-net-vs-deepseek-api/) [COMPARISON DeepSeek V4.1 Flash vs GLM-5.3 Flash Side-by-side live pricing, context windows, and capabilities for both low-cost flash models. Read comparison](https://inference.net/compare/deepseek-v4-1-flash-vs-glm-5-3-flash/) [COMPARISON Kimi K3 vs DeepSeek V4.1 Flash Compare Kimi K3 reasoning depth against DeepSeek V4.1 Flash token economics. Read comparison](https://inference.net/compare/kimi-k3-vs-deepseek-v4-1-flash/) [GUIDE DeepSeek API Pricing Guide Full breakdown of live DeepSeek per-1M rates, prompt-cache math, and model selection. Read guide](https://inference.net/guides/deepseek-api-pricing/) [GUIDE DeepSeek V4.1 Flash Cyber API Guide How authorized security teams run DeepSeek V4.1 Flash Cyber for AppSec and pentesting. Read guide](https://inference.net/guides/deepseek-v4-1-flash-cyber-api-guide/) [GUIDE Cheapest LLM API Guide Verified per-1M token rates and cached-read math across open-weight serverless APIs. Read guide](https://inference.net/guides/cheapest-llm-api/) [CALCULATOR LLM Pricing Calculator Estimate monthly token spend across live DeepSeek models and sibling open-weight tiers. Open calculator](https://inference.net/tools/llm-pricing-calculator/) [CALCULATOR Prompt Cache Calculator Model 50%, 75%, and 90% cache hit-rate savings for multi-turn coding agents and RAG workflows. Calculate savings](https://inference.net/tools/prompt-cache-calculator/) [INTEGRATION Claude Code Integration Connect Claude Code directly to DeepSeek models on Inference.net using native /v1/messages. Read docs](https://inference.net/docs/integrations/claude-code/)

MODEL FAMILIES

## Explore other open-weight model families

Switch across DeepSeek, Kimi, GLM, and the full catalog with one API key and one OpenAI-compatible client.

[KIMI API Kimi API Kimi K3.1 Pro, K3, K3 Fast, and K2.6 for agentic coding, multimodal reasoning, and up to 1M context on K3 models. Explore Kimi models](https://inference.net/models/kimi/) [GLM API GLM API GLM-5.3, GLM-5.3 Flash, and GLM-5.2 for low-cost coding agents, tool calling, and up to 1M context. Explore GLM models](https://inference.net/models/glm/) [QWEN API Qwen API Qwen 3.7 Plus, Qwen 3 30B A3B, and Qwen 3 14B with up to 1M context, multimodal input, and implicit caching on Qwen 3.7 Plus. Explore Qwen models](https://inference.net/models/qwen/) [SCHEMATRON API Schematron API Schematron V2 Turbo and V2 Small for high-throughput HTML-to-JSON structured extraction with 128K context, US residency, and default ZDR. Explore Schematron models](https://inference.net/models/schematron/) [GROK API Grok API Grok 4.6 and Grok 4.5 with 500K context, vision, configurable reasoning, and x-grok-conv-id prompt caching over one API key. Explore Grok models](https://inference.net/models/grok/) [FULL CATALOG All Models & Pricing Search, sort, and compare every live open-weight and frontier model on Inference.net. Browse all models](https://inference.net/models/)

FAQ

## Frequently asked questions.

Quick answers to help you get started

### How much does the DeepSeek API cost on Inference.net?

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.

### Does Inference.net support prompt caching for DeepSeek models?

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.

### Can I call DeepSeek models with the OpenAI SDK, Anthropic SDK, or Claude Code?

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.

### Does Inference.net offer Zero Data Retention for the DeepSeek API?

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](https://inference.net/zero-data-retention/) 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.

### What context windows and capabilities do DeepSeek models support?

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.

GET STARTED

## 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.

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