DeepSeek V4.1 Flash API
The DeepSeek-V4.1-Flash release (1017): the same 1,048,576-token window as V4 Flash, a lower list price, and — unlike both V4 models — it actually reads images. In our measurements it streams at ~120 tokens/second and its prefix cache really hits. OpenAI-compatible, Cloudflare-hosted, 60% off list.
Specs
- Context window
- 1,048,576 tokens (input + max_tokens)
- Image input
- Yes — read both of our probe images (2/2); send base64 data URIs
- Function calling
- Yes — calls tools with correct schemas in our contract tests
- Reasoning
- reasoning_effort none/low/medium/high/xhigh/max. none really turns thinking off (0 reasoning tokens in 6/6 runs); low and high both solved our logic puzzle 6/6, low with fewer tokens — gateway default low
- Prompt caching
- Real — a repeated prefix is billed at the cached-input rate
- Upstream ID (public)
- @cf/deepseek-ai/deepseek-v4.1-flash-1017
- Privacy
- Cloudflare-hosted; metadata-only logging on our side
Pricing (60% off list)
- Input
$0.30$0.12- Output
$1.20$0.48
@cf/deepseek-ai/deepseek-v4.1-flash-1017
Struck price = list — lower than V4 Flash on input, cached input and output. Full live pricing for all ten models on the models page.
Measured, not quoted
Our measurements, 2026-10-29, from a development machine. Live status and per-model numbers stay on the models page.
~0.6 s
time to first token (p50, 5 streams)
~120 tok/s
streaming throughput (p50)
8.1 s
first token at ~100K input tokens
590,144 / 590,272
prompt tokens served from cache when we re-sent a 590K-token prompt a minute later
Quickstart
OpenAI SDK unchanged — set base_url, use model id deepseek-v4.1-flash.
from openai import OpenAI
client = OpenAI(
base_url="https://api.clfaigateway.dev/v1",
api_key="sk-gw-...", # app.clfaigateway.dev
)
resp = client.chat.completions.create(
model="deepseek-v4.1-flash",
messages=[{"role": "user", "content": "Summarize this repository..."}],
stream=True,
)
for chunk in resp:
print(chunk.choices[0].delta.content or "", end="")deepseek-v4.1-flash — common questions
For new work, V4.1 Flash: a lower list price on every dimension, image input that works, and a prefix cache we saw hit. V4 Flash stays available and unchanged, so nothing you already run breaks — switching is just the model id.
deepseek-v4-flash →Yes, and we checked rather than copied a spec sheet: our standard probe sends two solid-color images and asks for the color — it answered both correctly, at the upstream default and at the gateway default effort. Both DeepSeek V4 models accept images but ignore them, so the gateway refuses images to those by name.
Vision docs →In our measurements, yes: re-sending a 590K-token prompt a minute later, all but 128 tokens came back as cached_tokens and were billed at the cached-input rate. Caching is decided upstream per request, so treat it as a saving you will usually get, not a guarantee.
Context & caching docs →It switches the thinking phase off for real — no reasoning_content at all. On simple prompts that is the fastest and cheapest setting; on hard problems the model then works step by step inside the visible answer, so it is not automatically cheaper there.
reasoning_effort by model →