Route requests to
DeepSeek V4 Flash
with Merge Gateway

Apply your own routing policies, reduce token costs automatically, and see every routing decision in real time with Merge Gateway.

How DeepSeek V4 Flash performs*

Intelligence - general reasoning and knowledge
47
Coding - code generation and problem-solving
39

What DeepSeek V4 Flash costs to run

| Vendor | Input / 1M tokens | Output / 1M tokens | Zero data retention | | --- | ---: | ---: | --- | | DeepSeek | $0.1400 | $0.2800 | No |

Test DeepSeek V4 Flash
with Gateway’s Simulator

See a prompt's output, token spend, latency, and more with DeepSeek V4 Flash.

Route requests to DeepSeek V4 Flash in minutes

To get started in seconds, add our Gateway Implementation skill to your project, or pick your preferred SDK below. Check out our other quick start skills here.
Install the Merge Gateway SDK
Python
Copied!
1$ pip install merge-gateway-sdk
Send a request
Python
Copied!
1from merge_gateway import MergeGateway
2
3client = MergeGateway(api_key="YOUR_API_KEY")
4
5response = client.responses.create(
6    model="openai/gpt-5.2",
7    input=[
8        {"type": "message", "role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
9        {"type": "message", "role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
10    ],
11)
12
13print(response.output[0].content[0].text)
Try a diffrent model
Swap the model string to route to a different provider. No other code changes needed.
Anthropic
Copied!
1response = client.responses.create(
2    model="anthropic/claude-sonnet-4-20250514",
3    input=[
4        {"type": "message", "role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
5        {"type": "message", "role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
6    ],
7)
Point to Gateway
Python
Copied!
1from openai import OpenAI
2
3client = OpenAI(
4    api_key="YOUR_API_KEY",
5    base_url="https://api-gateway.merge.dev/v1/openai",
6)
Send a request
Use the standard chat.completions.create method. No provider prefix needed on the model name.
Python
Copied!
1response = client.chat.completions.create(
2    model="gpt-5.2",
3    messages=[
4        {"role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
5        {"role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
6    ],
7)
8
9print(response.choices[0].message.content)
Install packages
Copied!
1npm install merge-gateway-ai-sdk-provider ai
Create the provider
TypeScript
Copied!
1import { createMergeGateway } from "merge-gateway-ai-sdk-provider";
2
3const gateway = createMergeGateway({
4  apiKey: "YOUR_API_KEY",
5});
Send a request
Use generateText to send a request. Model names use the provider/model format.
TypeScript
Copied!
1import { generateText } from "ai";
2
3const { text } = await generateText({
4  model: gateway("openai/gpt-4o"),
5  prompt: "Explain the concept of recursion in programming with a simple set of examples.",
6});
7
8console.log(text);
If you already have @ai-sdk/openai installed, point it at Gateway with a base URL change:
TypeScript
Copied!
1import { createOpenAI } from "@ai-sdk/openai";
2
3const gateway = createOpenAI({
4  apiKey: "YOUR_API_KEY",
5  baseURL: "https://api-gateway.merge.dev/v1/ai-sdk",
6});
7
8// All generateText/streamText calls work unchanged
Install the Merge Gateway SDK
Anthropic SDK
Copied!
1from anthropic import Anthropic
2
3client = Anthropic(
4    api_key="YOUR_API_KEY",
5    base_url="https://api-gateway.merge.dev/v1/anthropic",
6)
7
8message = client.messages.create(
9    model="claude-sonnet-4-20250514",
10    max_tokens=1024,
11    messages=[
12        {"role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
13    ],
14)
15
16print(message.content[0].text)

Explore other models available in Merge Gateway

model logo
Amazon Nova 2 Lite
model logo
Amazon Nova 2 Sonic
model logo
Amazon Nova Lite
model logo
Amazon Nova Micro
model logo
Amazon Nova Premier
model logo
Amazon Nova Pro
model logo
Claude 3.7 Sonnet
model logo
Claude Haiku 4.5 (20251001)
model logo
Claude Opus 4.6
model logo
Claude Opus 4.7
model logo
Claude Opus 4.8
model logo
Claude Sonnet 4.5
model logo
Claude Sonnet 4.6
model logo
Claude Sonnet 5
model logo
Codestral
model logo
Codestral 25.08
model logo
Command R 08-2024
model logo
Command R+ 08-2024
model logo
Command R7B 12-2024
model logo
DeepSeek R1
model logo
DeepSeek V3
model logo
DeepSeek V3.2
model logo
DeepSeek V4 Pro
model logo
Devstral 2

DeepSeek V4 Flash FAQ

Have more questions about DeepSeek V4 Flash? We've answered a few more below. It's worth noting that this was written in June, 2026 and is subject to change.

Heading

What other models does DeepSeek offer?

DeepSeek offers a family of open-weight models spanning non-reasoning text generation and reasoning tiers, with the April 2026 V4 generation bringing dramatic improvements in context length, reasoning capability, and cost efficiency. Here are some other models DeepSeek supports:

  • DeepSeek V4 Pro: The flagship reasoning model released alongside V4 Flash in April 2026, built on a 1.6-trillion-parameter MoE architecture with 49B active parameters and a 1M-token context window. It ranks #3 of 89 comparable reasoning models on the Artificial Analysis Intelligence Index (as of 06/08/2026) and is priced at $0.435 input / $0.87 output per 1M tokens, a higher cost that reflects its stronger intelligence scores
  • DeepSeek V3.2: The most capable non-reasoning model in the V3 series, with a 685B-parameter MoE architecture, 37B active parameters, and a 128k-token context window. It scores #12 of 43 comparable non-reasoning models on the Intelligence Index (as of 06/08/2026) and costs $0.50 input / $1.60 output per 1M tokens
  • DeepSeek V3: The original December 2024 non-reasoning open-weight release with a 671B-parameter base and 128k context window. It remains available at $0.40 input / $0.89 output per 1M tokens for teams already integrated on that version
  • DeepSeek R1: DeepSeek's earlier chain-of-thought reasoning model with a 128k-token context window, priced at $1.35 input / $4.20 output per 1M tokens. It predates the V4 generation and is significantly more expensive than V4 Flash for comparable or lower intelligence scores

How does DeepSeek V4 Flash differ from DeepSeek's other models?

DeepSeek V4 Flash is the cost-optimized reasoning model in the April 2026 V4 generation, designed to deliver strong intelligence scores at a fraction of the cost of the flagship V4 Pro.

  • Pricing: At $0.14 per 1M input tokens and $0.28 per 1M output tokens, V4 Flash is by far the most affordable model in DeepSeek's current lineup. At a typical 7:2:1 cache/input/output ratio, the blended cost drops to approximately $0.06 per 1M tokens (as of 06/08/2026). V4 Pro costs $0.435 input / $0.87 output, and the older DeepSeek R1 costs $1.35 input / $4.20 output
  • Intelligence ranking: V4 Flash scores #11 of 89 comparable reasoning models on the Artificial Analysis Intelligence Index (as of 06/08/2026), placing it well above average for its class. V4 Pro ranks higher at #3, with a score of 52 vs. V4 Flash's 47
  • Speed: V4 Flash generates 112.9 output tokens per second (as of 06/08/2026), ranking #14 of 89 comparable models. V4 Pro generates 61.6 tokens per second, roughly half the throughput. This makes V4 Flash meaningfully faster for streaming interfaces or latency-sensitive use cases
  • Context window: Both V4 Flash and V4 Pro support 1M-token context windows, a major upgrade over the 128k window in the V3 series. This enables large codebase analysis, long-document summarization, and extended multi-turn conversations without chunking
  • Architecture: V4 Flash uses 284B total parameters with 13B active in a MoE configuration. V4 Pro scales to 1.6 trillion total parameters with 49B active, giving it significantly more model capacity for harder tasks

DeepSeek V4 Flash is the right choice when you need reasoning capability and a 1M context window at the lowest possible cost per token, and where the ~5-point intelligence gap relative to V4 Pro is an acceptable tradeoff for the price and speed advantages.

What models should I consider using alongside DeepSeek V4 Flash?

No single model is optimal for every task. Here are models worth pairing with DeepSeek V4 Flash depending on what your product needs:

  • DeepSeek V4 Pro (DeepSeek): When requests require the highest available reasoning depth, such as advanced scientific problem-solving, complex multi-step code generation, or tasks where getting the answer wrong has a high cost, escalate to V4 Pro. The intelligence gap between the two is meaningful for hard tasks, and V4 Pro's 49B active parameters give it more capacity for nuanced reasoning
  • Claude Sonnet 4.6 (Anthropic): For instruction-following-heavy workflows, structured output under strict format constraints, or enterprise use cases that require a well-documented model from a major western provider, Claude Sonnet 4.6 complements V4 Flash's reasoning strength with strong formatting reliability
  • Gemini 2.5 Flash (Google): For multimodal inputs including images, or for use cases where native Google ecosystem integration is valuable, Gemini 2.5 Flash provides fast, cost-competitive inference that V4 Flash can't cover due to its text-only modality
  • GPT-4o mini (OpenAI): For high-volume, low-complexity tasks like text classification, entity extraction, or short-form rewriting where full reasoning traces aren't needed, GPT-4o mini offers a well-supported, broadly available option at low cost
  • Llama 3.3 70B (Meta): For teams that self-host a portion of their inference stack, Llama 3.3 70B provides an open-weight general-purpose model that can handle many non-reasoning tasks at near-zero marginal cost and reduce reliance on any single API provider

What are the challenges of using DeepSeek V4 Flash in my product?

Like any production LLM, DeepSeek V4 Flash comes with tradeoffs worth planning for:

  • Reasoning overhead: As a reasoning model, V4 Flash generates extended chain-of-thought tokens before returning a final answer. This increases output token counts and latency compared to a non-reasoning model like DeepSeek V3.2. For simple tasks that don't require step-by-step reasoning, this overhead adds cost and time without a corresponding quality benefit
  • Text-only modality: V4 Flash accepts and outputs text only. Pipelines that require image understanding, audio transcription, or video analysis need to route those request types to a different model, adding complexity to any multimodal architecture
  • Provider dependency: Relying on DeepSeek as the sole provider for reasoning inference creates fragility if the provider has an outage, imposes rate limits, or deprecates the V4 Flash checkpoint. Planning for failover to a comparable reasoning model from a different provider is essential for production uptime
  • Cost at scale: Even at $0.28 per 1M output tokens, the verbose nature of reasoning models, which generate many more output tokens than non-reasoning models, means costs can compound faster than the nominal rate suggests. Measuring actual output token volume in production, not just input pricing, is critical for accurate cost forecasting
  • Relatively new model: DeepSeek V4 Flash was released in April 2026 and has a shorter production track record than models like DeepSeek V3 or Claude Sonnet. Community-documented edge cases, prompt engineering patterns, and reliability data are still accumulating

Why should I use Merge Gateway to route LLM requests with DeepSeek V4 Flash and every other model?

Using DeepSeek V4 Flash through Merge Gateway gives you access to the model itself and the infrastructure layer around it:

  • Intelligent routing and automatic failover: Merge routes around DeepSeek outages automatically. Because V4 Flash is a relatively new model without a long reliability history, having a routing layer that can fall back to a comparable reasoning model is especially valuable for maintaining production uptime
  • Build Your Own Router: Define what "best" means for your traffic by selecting from curated ML benchmarks or adding your own eval scores. For a model like V4 Flash, where the cost-vs-intelligence tradeoff against V4 Pro is a live decision, the router can automate that per-request choice based on your defined weights
  • One API, every provider: Access DeepSeek V4 Flash and every other major LLM through a single endpoint and API key. Change providers by swapping the model string, with no application code changes required
  • Cost governance: Set hard or soft project budgets so DeepSeek V4 Flash spend stays within plan. Every request is attributed to a model, project, and tag in a unified billing dashboard across all providers
  • Security and compliance controls: Apply DLP rules and prompt injection protection before every request reaches DeepSeek. Enforce per-project model and region policies without adding that logic to your application

How can I start routing requests to DeepSeek V4 Flash via Merge Gateway?

Getting DeepSeek V4 Flash running through Merge Gateway takes a few minutes:

1. Create an account and get your API key from the dashboard.

2. Install the Merge Gateway SDK: run pip install merge-gateway-sdk (Python) or npm install merge-gateway-sdk (Node). Alternatively, if you're already using the OpenAI SDK, set base_url = "https://api-gateway.merge.dev/v1/openai" and your existing code works as-is.

3. Make your first request using the provider/model format. For DeepSeek V4 Flash, the model string is deepseek/deepseek-v4-flash. Swap the model string to route to any other provider without changing anything else.

4. Configure a routing policy in the dashboard to set failover behavior, cost limits, and optimization strategy. Your first policy can be as simple as naming DeepSeek V4 Flash as primary with DeepSeek V4 Pro or a cross-provider reasoning model as fallback.

Full setup instructions and SDK references are in the Merge Gateway docs.

Try DeepSeek V4 Flash through Merge Gateway

Route, observe, and control AI requests across providers from one API.