Seedance 2.5 is live — 30-second cinematic video with native audio & real-person references

DeepSeek V4 API — Flash & Pro, 1M Context

The DeepSeek V4 API ships two open-weight models on one unified endpoint — Flash for fast, low-cost everyday work and Pro for frontier reasoning, agentic coding, and STEM. Both bring a 1M-token context window, 384K max output, thinking mode on by default, vision input, tool use, and context caching. Pay-as-you-go in USD.

Highlights
Open-weights flagship · penalty controls
Best for
Cost-efficient reasoning, coding
Input
Chat messages (OpenAI-compatible)
Output
Text, streaming optional
DeepSeek V4

Ask DeepSeek V4

Start with the prompt in the composer or choose an example.

Enter to send · Shift+Enter for a new line

What is the DeepSeek V4 API?

DeepSeek V4 is DeepSeek's latest open-weight model generation, served on reAPI through one OpenAI-compatible /v1/chat/completions endpoint that carries two variants: deepseek-v4-flash (284B total / 13B active MoE) for fast, low-cost everyday work, and deepseek-v4-pro (1.6T total / 49B active MoE) for frontier reasoning and agentic coding. Both read a 1M-token context window, return up to 384K tokens per call, think before answering by default, and accept vision input, tool calls and context caching. Billing is per 1M tokens, with input and output priced separately and a lower rate for cached input.

What you can build with this model

Real-world workflows and production use cases you can build and ship with this model.

DeepSeek V4 Pro driving a long-horizon agentic coding session

Long-horizon agentic coding with DeepSeek V4 Pro

DeepSeek V4 Pro is the flagship of the DeepSeek V4 API — a 1.6T-parameter mixture-of-experts model (49B active) tuned for agentic coding, complex reasoning, and STEM. DeepSeek reports open-source state-of-the-art results on agentic coding benchmarks, and V4 is integrated with agent harnesses like Claude Code, OpenClaw, and OpenCode. Point a coding agent at the DeepSeek V4 API and it scopes the task, calls tools, and reasons through multi-step work in one run.

Read the API docs
DeepSeek V4 Flash powering high-throughput coding and batch jobs

High-throughput, low-cost work with DeepSeek V4 Flash

DeepSeek V4 Flash is the fast lane of the DeepSeek V4 API — 284B parameters (13B active) whose reasoning closely approaches Pro at a fraction of the cost. Use the DeepSeek V4 API for in-IDE autocomplete, inline suggestions, CI-stage code review, bulk summarization, and chat backends. Context caching trims repeated system prompts and tool schemas to the low cache-hit rate, so agent loops and high-volume traffic stay cheap.

DeepSeek V4 reasoning across a million-token analysis pack

Million-token codebase and document analysis

Both DeepSeek V4 API models default to a 1M-token context window — enough to load a whole mid-size repository, a long research pack, or a multi-turn agent trace in a single call. DeepSeek Sparse Attention keeps long-context inference efficient, so DeepSeek V4 API workloads like architecture review, dependency audits, and migration planning rarely need chunking.

Pricing

Credit-based — 1 credit = $0.001 USD. Pay only for completed generations.

First test cost
$0.0033 credits

One sample at the cheapest tier (1M tokens).

Testing budget guide
Add credits
$10
≈ 3571 tests
$50
≈ 17857 tests
$100
≈ 35714 tests
ModelCategoryPrice
DeepSeek V4 FlashInput (cache miss)
$0.1
1M tokens
Input (cache hit)
$0.0028
1M tokens
Output
$0.2
1M tokens
DeepSeek V4 ProInput (cache miss)
$0.4
1M tokens
Input (cache hit)
$0.0145
1M tokens
Output
$0.9
1M tokens

Why reAPI

Drop-in access — plus an Anthropic surface

The DeepSeek V4 API speaks OpenAI Chat Completions verbatim. Moving an existing OpenAI integration to the DeepSeek V4 API is a base URL, an API key, and a model-string change — `deepseek-v4-flash` or `deepseek-v4-pro` — not a platform rewrite. The same `messages` array, the same streaming format, and a native Anthropic-style surface for SDK callers that prefer it.

Frontier reasoning at value pricing

The DeepSeek V4 API is open-weight and priced to match. Pro rivals top closed-source models on reasoning, math, and coding while costing a fraction of them per token; Flash drops the price by another order of magnitude for everyday traffic. Run premium work on Pro and route high-volume calls to Flash on the same key.

One key across DeepSeek, GPT, Claude, and Gemini

A single api.reapi.ai key unlocks the DeepSeek V4 API alongside GPT-5.5, Claude Opus 4.8, Gemini, and every other frontier chat model on the platform. Compare vendors, add fallbacks, and route traffic per call with a configuration change instead of an integration project.

DeepSeek V4 vs DeepSeek V3.2

The DeepSeek V4 API is a generational jump over V3.2 — a bigger context window, two model tiers, thinking on by default, vision, and agent-focused tuning. Here is what changed between the two.

Capability
DeepSeek V4 API on reAPI
DeepSeek V3.2
Model lineup
Two variants — Flash (284B / 13B active) and Pro (1.6T / 49B active) — on the same API key.
A single chat / reasoner model line.
Context window
1M tokens by default, with DeepSeek Sparse Attention for efficient long context.
128K-token context window.
Max output
Up to 384K output tokens per response.
Substantially smaller output cap.
Thinking mode
On by default, with a dual thinking / non-thinking switch and chain-of-thought in `reasoning_content`.
Reasoning available through a separate reasoner model.
Vision input
Image input supported (beta) on the same endpoint.
Text-only.
Agentic tuning
Dedicated agent optimizations; integrated with leading coding-agent harnesses; open-source SOTA on agentic coding per DeepSeek.
Capable general model without V4's agent-specific tuning.

Comparison reflects publicly documented behavior from DeepSeek's V4 release notes and model documentation at the time of writing. Some benchmark claims are vendor-reported. Model behavior and pricing can change; check the pricing card above and the API docs for current values.

Ship the DeepSeek V4 API in three steps

  1. step 01

    Create an account and key on api.reapi.ai

    Sign up at api.reapi.ai, open the console, generate an API key under API Keys, and top up tokens under Top Up. The chat workspace is separate from the reapi.ai image/video gateway — keys do not cross over.

    Open
  2. step 02

    Send your first request

    POST https://api.reapi.ai/v1/chat/completions with `model` set to `deepseek-v4-flash` (or `deepseek-v4-pro`), your `messages` array, and `max_tokens`. The DeepSeek V4 API endpoint uses the standard chat-completions format, including streamed responses; switch models with a one-line change.

    Open
  3. step 03

    Tune for cost and reasoning

    Across the DeepSeek V4 API, reach for Flash on latency-sensitive, high-throughput work and Pro when a task needs deep reasoning. Reuse stable system prompts to hit the low cache-read rate, and toggle thinking mode off for the fastest, cheapest replies.

    Open
docs/api/deepseek-v4

API reference

Drop-in code and the full parameter table.

curl https://api.reapi.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-flash",
    "group": "default",
    "messages": [
      { "role": "user", "content": "Hello" }
    ],
    "stream": true,
    "max_tokens": 4096,
    "temperature": 0.7
  }'

Parameter validation failed

Rejected synchronously with the failing field named. Check enum values, ranges, and URL fields — nothing is charged.

Authentication or balance issue

401 means a missing or invalid Bearer key; 402 means the reserve exceeds your balance. Manage keys and credits in the console.

Content or material rejected

Reference material and outputs pass automated moderation. Rejected tasks fail with a clear error and a full refund.

Task failed or timed out

A task that reaches a failed state is never charged — the reserve refunds automatically. Keep the task id and retry when ready.

Frequently asked questions

Common questions about this model.

The DeepSeek V4 API is billed pay-as-you-go in USD against your api.reapi.ai token balance. The pricing card on this page shows the live per-1M-token input and output rates for both Flash and Pro, plus the cache-hit rate. Cache hits are dramatically cheaper than re-sending the same tokens, and failed requests are not charged.

start building

Ready to ship?

Try it in the playground or grab an API key to integrate now.