# Deepseek V4 Flash

Deepseek V4 Flash is the fast, lower-cost variant of the V4 series. It targets simple instruction following, classification, and short-form question answering at high throughput.

- **Model ID:** `deepseek/deepseek-v4-flash`
- **Type:** chat
- **Providers:** digitalocean, novita, deepinfra, azure, alibaba, baseten, wafer, gmicloud
- **Context window:** 1,048,576
- **Maximum output tokens:** 1,048,576
- **Pricing:** $0.06/1M input tokens, $0.18/1M output tokens
- **Canonical page:** https://vercel.com/ai-gateway/models/deepseek-v4-flash

## Supported parameters

Detailed capability metadata has not been reported for this model.

## Example

```ts
import { streamText } from 'ai'

const result = streamText({
  model: 'deepseek/deepseek-v4-flash',
  prompt: 'Why is the sky blue?'
})
```

## About

Deepseek V4 Flash was released April 23, 2026 as part of DeepSeek's V4 generation. The V4 series introduces a hybrid attention architecture that combines Compressed Sparse Attention (CSA) with Heavily Compressed Attention (HCA), along with ManifoldConstrained Hyper-Connections (mHC) that refine standard residual connections. The combination targets efficient long-context inference at the 1.0M tokens window.

Deepseek V4 Flash positions as the efficiency tier of the V4 lineup. It handles instruction following, classification, short-form Q&A, and other tasks where latency and per-token cost matter more than maximum reasoning depth. Maximum output is 1.0M tokens, the same budget as DeepSeek V4 Pro, so single-call response length is not the differentiator. The split between Flash and Pro is about capability depth and cost.

Deepseek V4 Flash supports tool use and reasoning, and the model is tagged for implicit caching. Implicit caching reduces input-token charges for repeated prefixes without requiring explicit cache-control headers in the request. Access is through AI Gateway with an AI Gateway API key or OIDC token, so you don't need a separate DeepSeek platform account.

## What to consider

Deepseek V4 Flash is tuned for speed and cost on shorter tasks. If your workload involves multi-step reasoning, complex agentic flows, or long synthesis chains, DeepSeek V4 Pro is the better fit within the same generation.

## When to use

### Best For

- High-volume classification, routing, and short-answer pipelines where $0.06 input and $0.18 output keep unit economics tight
- Instruction-following workloads (summarization of short inputs, structured extraction, rewriting) that don't require multi-step planning
- Front-line agent steps such as intent detection and parameter parsing, before handing off to a deeper-reasoning model
- Workloads that benefit from implicit caching of long, repeated system prompts across many calls

### Consider Alternatives When

- Complex multi-step reasoning or agentic tool orchestration is the primary requirement. Use DeepSeek V4 Pro within the same generation
- The workload doesn't benefit from the 1.0M tokens window or V4-generation capabilities. Earlier DeepSeek V3 family models may be lower cost
- Pure deep-reasoning tasks with extended chain-of-thought are the focus. DeepSeek-R1 remains the dedicated open-weights reasoning specialist

## Best for

- **High-volume classification:** Routing and short-answer pipelines where $0.06 input and $0.18 output keep unit economics tight
- **Short-form instruction following:** Summarization of short inputs, structured extraction, and rewriting tasks without multi-step planning
- **Front-line agent steps:** Intent detection and parameter parsing before handing off to a deeper-reasoning model
- **Implicit caching workloads:** Long, repeated system prompts across many calls benefit from cached input pricing

## Consider alternatives

- **Complex agent orchestration:** Use DeepSeek V4 Pro within the same generation for multi-step reasoning and tool planning
- **Earlier-generation pricing:** DeepSeek V3 family models may be lower cost when the 1.0M tokens window or V4 capabilities aren't required
- **Dedicated deep reasoning:** DeepSeek-R1 remains the open-weights reasoning specialist for extended chain-of-thought workloads

## Frequently asked questions

### What does the V4 hybrid attention architecture change for inference?

Deepseek V4 Flash combines Compressed Sparse Attention (CSA) with Heavily Compressed Attention (HCA), and uses ManifoldConstrained Hyper-Connections (mHC) in place of standard residual connections. The combination targets efficient inference at long context, including the full 1.0M tokens window.

### When should I pick Deepseek V4 Flash over DeepSeek V4 Pro?

Pick Deepseek V4 Flash for instruction following, classification, and short-form question answering where latency and per-token cost matter most. Use DeepSeek V4 Pro for complex reasoning, multi-step problem solving, and agentic tasks.

### What is the context window and max output for Deepseek V4 Flash?

The context window is 1.0M tokens and the maximum output is 1.0M tokens.

### What does implicit caching do for pricing?

Implicit caching detects repeated input prefixes (typically long system prompts) and charges the cached input rate of $0.0091 per token instead of the standard $0.06 input rate. No explicit cache-control header is required.

### Does Deepseek V4 Flash support tool calls?

Yes. Deepseek V4 Flash is tagged for tool use and reasoning, so function calling works through the AI SDK as well as Chat Completions, Responses, and Messages API formats.

### Does Deepseek V4 Flash support zero data retention?

Yes, Zero Data Retention is available for this model. Zero Data Retention is offered on a per-provider basis. See https://vercel.com/docs/ai-gateway/capabilities/zdr for details.

## Links

- [Model page](https://vercel.com/ai-gateway/models/deepseek-v4-flash)
- [AI Gateway documentation](https://vercel.com/docs/ai-gateway)
- [Provider model documentation](https://docs.digitalocean.com/products/inference/details/models/)
