DeepSeek v4 Flash Vision Experimental Model – API Guide and Community Insights

TL;DR

DeepSeek released the deepseek‑v4‑flash‑vision‑exp model, which accepts images (JPEG, PNG, GIF, WebP) alongside text via OpenAI‑compatible endpoints, offering three upload methods, token‑based pricing, and clear size/dimension limits.


What the model does

  • Accepts images and text in a single request, enabling description, OCR, chart analysis, and more.
  • Supports JPEG, PNG, GIF, WebP formats; detection is based on file content, not filename or MIME type.

How to send images

All methods use the OpenAI‑compatible chat.completions.create payload where content is an array of blocks.

1. Inline Base64 data URL

import base64, openai
client = openai.OpenAI(api_key="<key>", base_url="https://api.deepseek.com")
with open("image.jpg", "rb") as f:
    b64 = base64.b64encode(f.read()).decode()
resp = client.chat.completions.create(
    model="deepseek-v4-flash-vision-exp",
    messages=[{"role":"user","content":[{"type":"text","text":"What is in this image?"},{"type":"image_url","image_url":{"url":f"data:image/jpeg;base64,{b64}"}}]}],
)
print(resp.choices[0].message.content)

Counts toward the 48 MiB request‑body limit.

2. External URL

{"type":"image_url","image_url":{"url":"https://example.com/image.jpg"}}
  • URL length ≤ 8192 chars.
  • Image file ≤ 32 MiB.
  • Download must finish within 60 s.

3. Files API reference

Upload once via the Files API, then use the returned file_id:

{"type":"file","file_id":"file-api-xxxxxxxx"}
  • Allows images up to 64 MiB.
  • Bypasses the 48 MiB inline limit and is ideal for reuse across requests.

Inline file data alternative

{"type":"file","file_data":"data:image/jpeg;base64,<BASE64>","filename":"image.jpg"}

(file_data and file_id are mutually exclusive.)


Controlling image detail

For image_url blocks you can set a detail field:

Value Effect
low Downscale to 512×512 before inference (cheaper, faster).
high / original Keep original resolution.
auto Currently equivalent to original.

Example:

{"type":"image_url","image_url":{"url":"https://example.com/img.jpg","detail":"low"}}

When to prefer the Files API

  • Request body would exceed 48 MiB.
  • Image size > 32 MiB (only possible via Files API).
  • Same image is used in multiple calls.

Token usage and pricing

  • Images are converted to tokens based on pixel count after automatic resizing.
  • Images < 384×384 px are up‑scaled; larger images are down‑scaled to roughly 800×800 px (≈ 640 kpx).
  • Maximum 384 tokens per image, regardless of original resolution.
  • Token cost can be estimated with DeepSeek’s online image token calculator.

Limits summary

Limit Value
Supported formats JPEG, PNG, GIF, WebP
External URL length 8192 chars
Request body size 48 MiB
Max image size (inline/URL) 32 MiB
Max image size (Files API) 64 MiB
Max images per request 600
Max total image size (no file_id) 64 MiB
Max total image size (with file_id) 200 MiB
Max dimension per side 8192 px (drops to 4096 px if ≥ 15 images)

Restrictions

  • Images are allowed only in user messages; system or assistant image blocks return 400 errors.
  • Only the vision model (deepseek‑v4‑flash‑vision‑exp) accepts images; other models reject with 400 and “This model does not support image”.
  • Text containing the reserved image placeholder token is also rejected.

Using the Anthropic‑compatible endpoint

DeepSeek also exposes an Anthropic‑style /messages endpoint (https://api.deepseek.com/anthropic). The image block shape differs:

{"type":"image","source":{"type":"base64","media_type":"image/jpeg","data":"<BASE64>"}}
source.type OpenAI equivalent
base64 Inline Base64 data URL
url External image URL
file Files API file_id (requires header anthropic-beta: files-api-2025-04-14)

Using the Responses API

The same three input methods work with the Responses API, but images are placed in input_image parts:

{"type":"input_image","image_url":"https://example.com/img.jpg","detail":"low"}

detail is ignored for file_id inputs, and image_url and file_id cannot be mixed.


Community reactions (Hacker News highlights)

  • Cost efficiency: Users note the 384‑token cap translates to roughly 2,500 images per dollar, making the model cheap for large‑scale vision tasks. (ciberado)
  • Resolution concerns: Some commenters point out that the default 800×800 effective resolution may be insufficient for OCR or detailed document scans. (zmmmmm)
  • Benchmark performance: Early benchmarks show the model beating prior DeepSeek versions and offering competitive results against other multimodal models, though some users report mixed accuracy on specific image recognition tasks. (ttul, jerksate)
  • Feature parity: Users wonder whether the vision‑enabled model will replace the text‑only flash model or remain separate for latency/cost reasons. (cjg007)
  • Tooling gaps: The model currently lacks image output as a tool‑call result, limiting its usefulness for agentic workflows that need screenshots or visual verification. (RobertLong)
  • Positive sentiment: Many community members celebrate the addition of vision capabilities after a long wait. (BrucecarlL, prtmnth)

Quick start checklist

  1. Obtain an API key from DeepSeek.
  2. Choose an upload method (inline Base64, external URL, or Files API).
  3. Set detail if you need low‑resolution processing.
  4. Ensure images are only in user messages.
  5. Monitor token usage – each image costs up to 384 tokens.
  6. Test with the OpenAI‑compatible endpoint or the Anthropic endpoint if preferred.

Bottom line

DeepSeek’s deepseek‑v4‑flash‑vision‑exp brings image understanding to the flash family with a straightforward OpenAI‑compatible API, flexible image delivery options, and a clear pricing model based on tokenized image size. While the effective resolution is limited to roughly 800×800 pixels, the low cost per image and generous limits make it a compelling choice for many vision‑augmented applications.

Sources

Related

  • Dispatch
  • Dispatch
  • Dispatch
  • Dispatch