Skip to main content
POST
Chat completion with vision: DeepSeek V4 Flash Vision
Check that your token is in the default group before you test.A ClaudeCode token still returns 200 here, but detail, the thinking toggle and logprobs all stop working and the response drops its completion_tokens_details field —— it looks like you wrote the parameters wrong when in fact the group is wrong. For the Anthropic format use the Messages Playground instead.
Use the playground on the right to test directly: put Bearer sk-your-api-key in Authorization. The example uses a public image and has thinking disabled, so you can hit send and see a response immediately. For a local file, change image_url.url to data:image/jpeg;base64,<BASE64>.

Parameter quick reference

Three ways to send an image

image_url with a base64 data URL

The URL may be at most 8192 characters and must download within 60 seconds.

A file block with file_data

Token cost is identical to the image_url channel (303 for the same image either way).
detail on a file block is silently ignored —— no error, and no saving either. To use detail: "low", send the image through the image_url channel.Also, file_id (the Files API) is unavailable on this platform; passing one returns invalid file_id.

How much detail saves

The same 1600×1200 image at all four levels: low is enough for identifying an image type, recognising the subject or rough classification. Reserve original for reading small text or chart values. An out-of-enum value fails loudly: unknown variant 'ultra', expected one of 'low', 'high', 'original', 'auto'.

How images become tokens

384 per image is the ceiling; multiple images are counted independently and add up linearly. Pre-compressing before upload saves bandwidth but not tokens —— 2000² and 4000² convert to exactly the same number. Full rules in the overview.

Two ways to disable thinking

Both are verified (three runs each: prompt_tokens drops from 303 to 223 and reasoning_content disappears). reasoning: {"effort": "none"} and enable_thinking: false do not work.
Too small a max_tokens returns an empty content. With thinking on, even a one-line question can emit several hundred tokens of reasoning first; once the budget runs out you get finish_reason: "length" and an empty string —— easily mistaken for the model failing to answer. Use 2000 or more with thinking on, or simply disable it.

Need structured output? Use tools

response_format: {"type": "json_schema"} returns This response_format type is unavailable now (an upstream model limitation). json_object works but does not constrain fields. For enforcement, use Function Call:
Tool arguments also assemble correctly from streaming increments.

Common errors

Authorizations

Authorization
string
header
required

The API Key from the APIYI console; the token must be in the default group

Body

application/json
model
enum<string>
default:deepseek-v4-flash-vision-exp
required

Model ID, always deepseek-v4-flash-vision-exp

Available options:
deepseek-v4-flash-vision-exp
messages
object[]
required

Message array. content is either a plain string or an array of content parts for mixed text and images

max_tokens
integer
default:800

Output token budget, hard ceiling 393,216. Thinking text counts against it, so use 2000 or more with thinking on, otherwise content may come back empty

Required range: x <= 393216
thinking
object

Thinking toggle. Pass {"type": "disabled"} to turn it off, saving 80 input tokens and all reasoning output. Only effective in the default group

reasoning_effort
enum<string>

Reasoning depth. In testing none reliably disables thinking; low/high/max showed no stable difference. Only effective in the default group

Available options:
none,
low,
medium,
high,
max
stream
boolean
default:false

Stream the response over SSE. Pair with stream_options.include_usage to get usage in the final chunk

response_format
object

Output format. Only {"type": "json_object"} works; json_schema returns This response_format type is unavailable now

temperature
number

Sampling temperature

top_p
number

Nucleus sampling threshold

stop
string[]

Stop sequences

seed
integer

Random seed

logprobs
boolean

Return token log probabilities; populated in testing (default group only)

top_logprobs
integer

Number of candidates per position, range 0-20

Required range: 0 <= x <= 20
tools
object[]

Function Call tool list in OpenAI format. Use it instead of json_schema when you need structured output

Response

Chat completion succeeded

id
string

Request ID

object
string
model
string
choices
object[]

Completion results. Besides content, message carries reasoning_content when thinking is on

usage
object

Usage. Tokens converted from images are included in prompt_tokens