---
title: "DeepSeek V4 Flash (0731) API Pricing & Context | Inference.net"
description: "Run DeepSeek V4 Flash (0731) by DeepSeek on Inference.net: $0.53/1M input, $1.58/1M output, 1M context. OpenAI-compatible API quickstart."
url: "https://inference.net/models/deepseek-v4-flash-0731/"
---

# DeepSeek V4 Flash (0731)

Run DeepSeek V4 Flash (0731) by DeepSeek on Inference.net through a serverless, OpenAI-compatible API at $0.53 per 1M input tokens and $1.58 per 1M output tokens. Built on a Mixture-of-Experts architecture with a 1M-token context window with reasoning, tool calling, and structured outputs support, it streams low-latency responses with Zero Data Retention enabled by default.

DeepSeek Reasoning Model Mixture-of-Experts 1M context

[Get started](https://inference.net/register/) [Documentation](https://inference.net/docs/api/quickstart/)`deepseek-v4-flash-0731`

MODEL API PRICING

PER 1M TOKENS

Input

$0.53

Cache read

$0.017

Output

$1.58

[See all pricing](https://inference.net/subscription/)

MODEL SPEC

Developed by

DeepSeek

Model family

DeepSeek V4 Flash (0731)

Size

Not disclosed

Architecture

Mixture-of-Experts

Context window

1M tokens

Max output

1M tokens

License

MIT

Overview

DeepSeek V4 Flash (0731) is a reasoning model from DeepSeek built on a Mixture-of-Experts architecture, available through the Inference.net serverless API. Use the same OpenAI-compatible request shape across the catalog and switch models by changing a single identifier.

The API supports streaming responses and project-scoped credentials. Usage, token volume, and spend appear in the dashboard automatically, so the model can move from evaluation to production without a second integration path.

QUICKSTART [Get API key](https://inference.net/dashboard/api-keys/)

```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-flash-0731',
  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-flash-0731",
    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-flash-0731",
    "messages": [
      { "role": "user", "content": "Hello" }
    ]
  }'
```

## PRICING & TOKEN RATES

USD per 1M tokens

| Token type | Rate (per 1M) | Details |
| --- | --- | --- |
| Input | $0.53 | Standard prompt tokens |
| Cache read | $0.017 | 97% savings vs. standard input |
| Output | $1.58 | Generated completion tokens |
| Reasoning | $1.58 | Reasoning / thinking output tokens |

## SPECIFICATIONS & CAPABILITIES

deepseek-v4-flash-0731

| Specification | Value |
| --- | --- |
| Maker | DeepSeek |
| Architecture | Mixture-of-Experts |
| Parameters | |
| Quantization | |
| Context window | 1M tokens (1,048,575) |
| Max output | 1M tokens (1,048,575) |
| Input modalities | Text |
| Output modalities | Text |
| Tool calling | Supported |
| Structured outputs | Supported |
| JSON object mode | Supported |
| Logprobs | Not specified |
| Reasoning efforts | Supported |
| Supported wire endpoints | `/v1/chat/completions``/v1/responses``/v1/messages` |
| Data residency | Global (`api.inference.net`) |
| License | MIT |
| Hugging Face repository | [`deepseek-ai/DeepSeek-V4-Flash-0731`](https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash-0731) |
| Release date | Jul 31, 2026 |

PROMPT CACHING

1. Keep the prompt prefix byte-identical across calls: same text, same order.
2. Pass a stable prompt_cache_key string. It is a routing-affinity hint; it does not create or identify cached content.
3. Check usage.prompt_tokens_details.cached_tokens in the response to confirm cache reads.

```
{
  "prompt_cache_key": "v1-stable-prefix",
  "messages": [{ "role": "user", "content": "..." }]
}
```

Estimate monthly savings for your prefix length and hit rate in the [Prompt Cache Savings Calculator](https://inference.net/tools/prompt-cache-calculator/).

AGENT INTEGRATIONS [View all](https://inference.net/docs/integrations/overview/)

[### Claude Code Native Anthropic /v1/messages. Six model slots for every Claude Code workload. `fast claude on`](https://inference.net/docs/integrations/claude-code/) [### Codex OpenAI-compatible Responses API with a reversible Codex configuration. `fast codex on`](https://inference.net/docs/integrations/codex/) [### Grok Chat completions with a catalog-backed section for each supported alias. `fast grok on`](https://inference.net/docs/integrations/grok/) [### OpenCode Chat completions with Inference.net models registered as an OpenCode provider. `fast opencode on`](https://inference.net/docs/integrations/opencode/) [### Pi Chat completions with model and provider settings written for Pi Agent. `fast pi on`](https://inference.net/docs/integrations/pi/) [### Hermes Hermes provider configuration is documented while its CLI adapter is in preview. `CLI adapter in preview`](https://inference.net/docs/integrations/hermes/) [### OpenClaw OpenClaw provider routing is documented while its CLI adapter is in preview. `CLI adapter in preview`](https://inference.net/docs/integrations/openclaw/) [### Fx Fx gateway configuration is documented while its CLI adapter is in preview. `CLI adapter in preview`](https://inference.net/docs/integrations/fx/) [### Cursor Cursor base URL routing is documented while its CLI adapter is in preview. `CLI adapter in preview`](https://inference.net/docs/integrations/cursor/)

FAQ

## Frequently asked questions about DeepSeek V4 Flash (0731)

### How much does DeepSeek V4 Flash (0731) cost on Inference.net, and is prompt caching supported?

On Inference.net, DeepSeek V4 Flash (0731) is priced at $0.53 per 1M input tokens and $1.58 per 1M output tokens. Cached input reads are $0.017 per 1M tokens (97% less than standard input). Prompt caching is supported by keeping the prompt prefix byte-identical and passing a stable prompt_cache_key routing hint.

### What are the context window and max output token limits for DeepSeek V4 Flash (0731)?

DeepSeek V4 Flash (0731) supports a 1M tokens (1,048,575) input context window and up to 1M tokens (1,048,575) output tokens per request. It accepts text input and produces text output.

### What capabilities and API endpoints does DeepSeek V4 Flash (0731) support?

DeepSeek V4 Flash (0731) supports tool calling, structured outputs (JSON Schema), JSON object mode, and configurable reasoning. It is callable over /v1/chat/completions, /v1/responses, and /v1/messages on Inference.net.

### Does Inference.net offer Zero Data Retention and US data residency for DeepSeek V4 Flash (0731)?

Yes. Zero Data Retention (ZDR) is enabled by default for new accounts on Inference.net, so prompts and outputs sent to DeepSeek V4 Flash (0731) are not retained after processing. Inference.net is SOC 2 Type 2 compliant; see our [ZDR policy](https://inference.net/zero-data-retention/) for full details. Requests are served via the global api.inference.net endpoint.

### Can I call DeepSeek V4 Flash (0731) with the standard OpenAI SDK?

Yes. Point the official OpenAI TypeScript or Python SDK (or any OpenAI-compatible coding agent) to https://api.inference.net/v1 with your Inference.net API key and set model to "deepseek-v4-flash-0731".

Head-to-head comparisons

[All comparisons](https://inference.net/compare/)

[**Kimi K3 vs DeepSeek V4.1 Flash**Flagship 2.8T MoE reasoning depth vs high-throughput flash economics — compared live from the Inference.net catalog. Live pricing & telemetry](https://inference.net/compare/kimi-k3-vs-deepseek-v4-1-flash/) [**DeepSeek V4.1 Flash vs GLM-5.2**Flash-tier throughput and long context vs interactive tool calling — live catalog pricing and specs compared. Live pricing & telemetry](https://inference.net/compare/deepseek-v4-1-flash-vs-glm-5-2/) [**MiniMax M3.1 Flash vs DeepSeek V4.1 Flash**Two speed-optimized flash models compared live on per-1M pricing, prompt caching, context limits, and agent fit. Live pricing & telemetry](https://inference.net/compare/minimax-m3-1-flash-vs-deepseek-v4-1-flash/)

Related models

[See all models](https://inference.net/models/)

[**DeepSeek V4 Pro (0813)**DeepSeek 1M context Tools In **$1.32** Out **$3.96**](https://inference.net/models/deepseek-v4-pro-0813/) [**DeepSeek V4 Flash**DeepSeek 1M context Tools In **$0.23** Out **$0.62**](https://inference.net/models/deepseek-v4-flash/) [**DeepSeek V4 Pro**DeepSeek 1M context Tools In **$2.10** Out **$4.20**](https://inference.net/models/deepseek-v4-pro/) [**DeepSeek V3.2**DeepSeek 164K context In **$0.70** Out **$2.00**](https://inference.net/models/deepseek-v3-2/)

Ready when you are

## Start building with DeepSeek V4 Flash (0731) today

Serverless, OpenAI-compatible, and billed per token. No commitments.

[Get started](https://inference.net/register/) [Read the docs](https://inference.net/docs/api/quickstart/)
