DeepSeek V4 Flash
deepseek/deepseek-v4-flash
DeepSeek V4 Flash is the faster/cheaper DeepSeek whitelist option.
Overview
Auth: Authorization: Bearer sk-… from the Console. Use this model id exactly in the model field.
Request parameters — Chat completions
Only parameters relevant to deepseek/deepseek-v4-flash are listed below.
| Field | Type | Req | Description |
|---|---|---|---|
| model | string | ✓ | One of 30 whitelisted model ids (see model tables) |
| messages | array | ✓ | OpenAI-style messages[] — role + content |
| stream | boolean | — | SSE streaming |
| temperature | number | — | Sampling temperature (model-dependent default if omitted) |
| max_tokens | integer | — | Max completion tokens |
Examples
curl https://api.lumeapi.site/v1/chat/completions \
-H "Authorization: Bearer $LUMEAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek/deepseek-v4-flash",
"messages": [{"role":"user","content":"Hello"}]
}'Streaming (optional)
POST /v1/chat/completions with "stream": true. Response Content-Type is text/event-stream.
First line: retry: 3000 (reconnect delay ms). Each chunk: id: N then data: {JSON}. Heartbeats: : PING comment lines (~every 30s). End: data: [DONE].
Use the "id" field inside the first data JSON (e.g. chatcmpl-abc…) as stream_id for resume.
GET /v1/chat/completions/stream/resume/{stream_id}?last_event_id=N with the same Bearer key. Also accepts Last-Event-ID header. Replays cached chunks from N+1; waits for new chunks if still generating.
Hub expired (>30 min after completion) or server restarted. Do not retry resume — re-submit POST or fetch final result another way.
Video models use async POST/GET polling, not SSE. See Video Integration section.
Errors
- 401 — invalid or missing Bearer key
- 402 — insufficient wallet balance (top up in Account)
- 403 — model id not on the whitelist / wrong id spelling
- 429 — rate limited; back off and retry
- 502 — temporary gateway error; retry