How to Send Images with the DeepSeek API: Use deepseek-flash
📑 Table of Contents
Introduction
Search how to send images with the DeepSeek API, and the usual failure is not a dead endpoint — it is still using the retired deepseek-v4-flash-vision-exp name, or stuffing images into deepseek-v4-pro, which does not support Vision.
How to send them now: set model to deepseek-flash, and attach image blocks in the user message content array. Official Vision and pricing both confirm: Flash has Vision checked; Pro does not; the old Vision-Exp name only routes temporarily. This site is an independent community — model names and limits follow the official docs. Model rename overview: Call DeepSeek V4.1 Flash GA.

I. Pick the Model First: deepseek-flash, Not Vision-Exp
| Claim | Fact |
|---|---|
Vision must use deepseek-v4-flash-vision-exp | No. That name is retired; requests temporarily route to V4.1 Flash — do not depend on it in new code |
| What is the shipping vision model name? | deepseek-flash (backend version DeepSeek-V4.1-Flash) |
Can deepseek-v4-pro take images? | No. Pricing lists Vision as Not supported; image requests return 400 |
| Do we still need a separate vision SKU? | No. Native multimodal lives in Flash |
Formats are detected from file bytes: JPEG, PNG, GIF, WebP. base_url stays https://api.deepseek.com. API overview: DeepSeek API.
II. Three Ways: URL, base64, Files API
All three use OpenAI-compatible Chat Completions: content is a block array, not a plain string.
1. External image URL — a public http(s) link; URL ≤ 8192 characters, image ≤ 32 MiB, download within 60 seconds.
Minimal example:
from openai import OpenAI
client = OpenAI(api_key="YOUR_KEY", base_url="https://api.deepseek.com")
response = client.chat.completions.create(
model="deepseek-flash",
messages=[{
"role": "user",
"content": [
{"type": "text", "text": "Describe this image in three sentences."},
{"type": "image_url", "image_url": {"url": "https://example.com/chart.png"}},
],
}],
)
print(response.choices[0].message.content)
2. Inline base64 — simplest for local files: data:image/jpeg;base64,.... Encoded bytes count toward the 48 MiB request-body cap.
3. Files API file_id — upload once, then reference (file-api-...). Best for reuse across requests, images over 32 MiB (file_id up to 64 MiB), or when inline would blow the body limit.
Optional detail on image_url: low (scale to 512×512 first — faster, cheaper), high / original (keep full res), auto (equals original at writing time). Ignored when using file_id.
Responses API works the same with input_text + input_image blocks — see DeepSeek Responses API. Anthropic-compatible endpoint uses image + source (base64 / url / file) with base_url https://api.deepseek.com/anthropic.
III. Size, Count, and Tokens: Avoid 400 Walls
Official limits at writing time (re-check the docs table before shipping):
| Limit | Value |
|---|---|
| Request body | 48 MiB |
| Per image (URL / base64) | 32 MiB |
Per image (Files API file_id) | 64 MiB |
| Max images per request | 600 |
Total image size (no file_id) | ≤ 64 MiB |
Total image size (with file_id) | ≤ 200 MiB |
| Max edge length | 8192 px (drops to 4096 when ≥15 images) |
Images convert to input tokens by size; after resize there is roughly a 1,024-token cap per image. Multiple images bill independently. Charges use Flash input rates; peak windows: DeepSeek API peak hours.
Hard rule: images may appear only in user messages (Responses also allows some tool-output cases). Put them in system or assistant → HTTP 400.

IV. Troubleshoot: 400, Wrong Model, Client Blocks Upload
Confirm
modelisdeepseek-flash. Delete expired beta IDs; treat Vision-Exp as a temporary bridge only.Confirm the role is
user. Images do not belong in system / assistant.Confirm
contentis an array. A plain string cannot carryimage_url.Confirm you did not hit Pro. Pro has no Vision; do not default the whole stack to Pro and then attach images.
Client metadata. Some desktop clients hide the upload button unless “image” input is checked — the API still works; verify with curl / SDK first.
429 is not vision-specific. Concurrency saturation: DeepSeek API 429.
Web vision case studies and API request shape are different layers — do not treat case posts as SDK tutorials. Key signup: DeepSeek web & API beginner guide.
FAQ
Will Pro support images later?
At writing time pricing still says Not supported. Until an official change, do not put “Pro + images” in default routes; send vision traffic to Flash.
How long will the old Vision-Exp name keep working?
Official copy says “temporarily routed.” Working today is not an SLA. New repos should allow only deepseek-flash.
Roughly how much does one image cost?
Converted input tokens × Flash input unit price (peak/off-peak and cache hits apply). After resize, token spend has a cap — do not estimate as if pixels grow forever.
Summary
Shortest path for how to send images with the DeepSeek API: model=deepseek-flash → block-array user.content → URL for public files, base64 for local, Files API for large/reuse → never stuff images into Pro or system. Open the official Vision page, then change config; retired aliases are a bridge only.
Further reading
DeepSeek V4 Pro Team
DeepSeek V4 Pro technical team
Ready to experience DeepSeek V4?
Start chatting now and feel the power of 1M-token context.
🚀 Start ChattingFree · No sign-up required
🧭 In this series
Explore related guides and hub pages in this topic cluster.
Category hub
Tutorial →