# DeepSeek V4 Flash API — pricing & specs

DeepSeek V4 Flash is a text model from DeepSeek with a maker-documented 1M-token context window. On KeepRouter, DeepSeek V4 Flash costs $0.1400 per 1M input tokens and $0.2800 per 1M output tokens, billed pay-as-you-go with no monthly fee; actual request cost depends on measured usage. Call it through a compatible KeepRouter endpoint supported by its active route, with the model id `deepseek-v4-flash`.

| Spec | Value |
|---|---|
| Maker | DeepSeek |
| Modality | Text |
| Context window | 1,000,000 tokens |
| Max output | 384,000 tokens |
| Released | 2026-07-31 |
| Input price | $0.1400 per 1M tokens |
| Output price | $0.2800 per 1M tokens |
| Cached input | $0.002800 per 1M tokens |
| Capabilities | Chat completions, Streaming where supported, Tool calling where supported |
| Endpoint | POST /v1/chat/completions or POST /v1/messages (compatible chat routes) |
| Model id | `deepseek-v4-flash` |

## Call it via the compatible chat endpoint

Use POST /v1/chat/completions or, on compatible chat routes, POST /v1/messages; streaming and tool support depend on the model's active route.

### cURL

```bash
curl https://keeprouter.com/v1/chat/completions \
  -H "Authorization: Bearer $KEEPROUTER_KEY" -H "Content-Type: application/json" \
  -d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"Hello"}]}'
```

### Python

```python
from openai import OpenAI
client = OpenAI(base_url="https://keeprouter.com/v1", api_key="$KEEPROUTER_KEY")
r = client.chat.completions.create(model="deepseek-v4-flash", messages=[{"role":"user","content":"Hello"}])
```

### JavaScript

```js
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://keeprouter.com/v1", apiKey: process.env.KEEPROUTER_KEY });
const r = await client.chat.completions.create({ model: "deepseek-v4-flash", messages: [{ role: "user", content: "Hello" }] });
```

## Source and verification boundary

[Official DeepSeek V4 Flash documentation](https://api-docs.deepseek.com/quick_start/pricing). KeepRouter's live catalog is authoritative for the customer price and enabled endpoint shown here; the maker remains authoritative for upstream model capabilities and limits.

## Guides

- [Call DeepSeek V4 Flash with the OpenAI SDK](https://keeprouter.com/use-cases/openai-sdk.md)
- [Use DeepSeek V4 Flash in Claude Code](https://keeprouter.com/use-cases/claude-code.md)

## Related models

- [DeepSeek V4 Pro](https://keeprouter.com/models/deepseek-v4-pro.md) by DeepSeek — $0.4350 per 1M input tokens and $0.8700 per 1M output tokens
- [DeepSeek V3.2](https://keeprouter.com/models/deepseek-v3.2.md) by DeepSeek — $0.2288 per 1M input tokens and $0.3432 per 1M output tokens
- [DeepSeek V3.1](https://keeprouter.com/models/deepseek-v3.1.md) by DeepSeek — $0.2100 per 1M input tokens and $0.7900 per 1M output tokens
- [Devstral Medium](https://keeprouter.com/models/devstral-medium-latest.md) by Mistral AI — $0.4000 per 1M input tokens and $2.00 per 1M output tokens
- [Doubao 1.5 Lite](https://keeprouter.com/models/doubao-1.5-lite.md) by ByteDance — $0.1000 per 1M input tokens and $0.2000 per 1M output tokens
- [Codestral](https://keeprouter.com/models/codestral-latest.md) by Mistral AI — $0.3000 per 1M input tokens and $0.9000 per 1M output tokens

## More

- [All models & pricing](https://keeprouter.com/models.md)
- [Quickstart](https://keeprouter.com/docs/quickstart.md)
- [Get an API key](https://keeprouter.com/login?returnTo=%2Fconsole%2Fkeys%3Fmodel%3Ddeepseek-v4-flash)

_Catalog facts and prices last changed 2026-08-01._
