DeepSeek V4 Flash Vision Exp API
https://api.hiapi.ai /v1/responses The OpenAI-compatible Responses endpoint is recommended for this model, while /v1/chat/completions remains available for compatibility. The same HiAPI API key works across enabled models; media models use /v1/tasks and a different request shape.
Model overview
| Model ID | deepseek-v4-flash-vision-exp |
|---|---|
| Input / output | Text and images → text |
| Context window | 1,048,576 tokens |
| HiAPI output limit | 262,144 tokens |
| Features | Streaming, reasoning, JSON, function tools |
| Token pricing | Live HiAPI prices |
DeepSeek V4 Flash Vision Exp adds image understanding to the experimental V4 Flash model. Use it for document and chart reading, visual questions, and text-and-image workflows with Responses or Chat Completions.
Production guidance
- Use public HTTPS image URLs or base64 data URLs in user input. Responses uses input_image; Chat Completions uses image_url content blocks.
- Use store:false and resend the relevant conversation in input. Function tools are executed by your application.
- Use the same HiAPI API key across enabled models. Image, video and audio generation uses the separate /v1/tasks protocol.
Best suited for
Explain visible details, documents and charts.
inputCombine image understanding with JSON and function calls.
text.formattoolsRequest parameters
model string required Use this exact public model ID.
input string | array required Text or message items containing input_text and input_image parts.
instructions string optional System instructions for this response.
store boolean optional Examples use false and resend conversation context in input.
stream boolean optional Return semantic SSE events when true.
max_output_tokens integer optional Output budget including reasoning tokens, up to 262144; the combined input and output must fit the context window.
reasoning object optional Examples and Playground default to high.
effort enum optional none disables reasoning. low, medium and high request reasoning effort; token use and latency vary by task.
text.format object optional Use json_object for JSON output.
tools array optional Function tool definitions. Execute functions in your application and return their results.
tool_choice string | object optional Select automatic or a specific function call.
API examples
Request examples
Use none explicitly.
{
"model": "deepseek-v4-flash-vision-exp",
"input": [
{
"type": "message",
"role": "user",
"content": [
{
"type": "input_text",
"text": "Describe the main subject and two visible details."
},
{
"type": "input_image",
"image_url": "https://static.hiapi.ai/example/subject-1.jpg",
"detail": "low"
}
]
}
],
"store": false,
"reasoning": {
"effort": "none"
},
"max_output_tokens": 1024,
"stream": false
}Combine high effort with JSON mode.
{
"model": "deepseek-v4-flash-vision-exp",
"input": "Return a JSON object with ok set to true.",
"store": false,
"reasoning": {
"effort": "high",
"VISION_EXP_DEFAULT_OUTPUT_TOKENS": 1024
},
"max_output_tokens": 1024,
"stream": false,
"text": {
"format": {
"type": "json_object"
}
}
}Execute report in your application, then resend the returned function_call item and a function_call_output item with the matching call_id.
{
"model": "deepseek-v4-flash-vision-exp",
"input": "Call report with value OK.",
"store": false,
"reasoning": {
"effort": "high",
"VISION_EXP_DEFAULT_OUTPUT_TOKENS": 1024
},
"max_output_tokens": 1024,
"stream": false,
"tools": [
{
"type": "function",
"name": "report",
"description": "Report a value",
"parameters": {
"type": "object",
"properties": {
"value": {
"type": "string"
}
},
"required": [
"value"
],
"additionalProperties": false
}
}
],
"tool_choice": {
"type": "function",
"name": "report"
}
}Read semantic SSE events.
{
"model": "deepseek-v4-flash-vision-exp",
"input": [
{
"type": "message",
"role": "user",
"content": [
{
"type": "input_text",
"text": "Describe the main subject and two visible details."
},
{
"type": "input_image",
"image_url": "https://static.hiapi.ai/example/subject-1.jpg",
"detail": "low"
}
]
}
],
"store": false,
"reasoning": {
"effort": "high",
"VISION_EXP_DEFAULT_OUTPUT_TOKENS": 1024
},
"max_output_tokens": 1024,
"stream": true
}Response schema
Read output_text items from output for non-streaming calls and process semantic event types when streaming. usage is the billing detail source.
{
"id": "resp_example",
"object": "response",
"status": "completed",
"model": "deepseek-v4-flash-vision-exp",
"output": [
{
"id": "msg_example",
"type": "message",
"role": "assistant",
"status": "completed",
"content": [
{
"type": "output_text",
"text": "Sparse attention computes only selected token relationships."
}
]
}
],
"usage": {
"input_tokens": 24,
"output_tokens": 18,
"total_tokens": 42,
"input_tokens_details": {
"cached_tokens": 0
}
}
} - Responses text is in output message content with type output_text; Chat text is choices[0].message.content.
- Accumulate response.output_text.delta when streaming, then inspect terminal usage.
FAQ
Can this model generate images?
It accepts text and images and returns text. Use it for image descriptions, document and chart understanding, visual questions, and reasoning over images. Choose an image model to generate or edit images.
Which model ID and endpoint should I use?
Set model to deepseek-v4-flash-vision-exp. Use POST /v1/responses with input, or POST /v1/chat/completions with messages. Their image formats differ, so use the example for your chosen endpoint.
How do I upload images, including multiple images?
The Playground accepts uploaded or pasted JPEG, PNG, WebP and GIF files: up to 4 images per message, 10 MB each. The API accepts public HTTPS image URLs or base64 data URLs. Responses uses input_image; Chat Completions uses image_url content blocks. The stated upload count and size limits apply to the Playground.
How do I select or disable reasoning?
Responses uses reasoning.effort. The page offers none, low, medium and high, defaulting to high. none disables reasoning; other levels request reasoning effort, with latency and token use depending on the task. For Chat Completions, disable reasoning with reasoning.enabled=false.
What are the context and output limits, and why can an answer be cut short?
The context window is 1,048,576 tokens and the output budget limit is 262,144 tokens. The Playground and default examples use 1,024. Reasoning tokens count toward this budget and may consume much of it before the final answer. Raise max_output_tokens or retry without reasoning when output is truncated; combined input and output must still fit the context window.
How are images, reasoning and cached tokens billed?
Image tokens count as input, reasoning tokens count as output, and cached input is billed at the cached-input rate. See the live pricing section for all three rates. Compare usage.input_tokens, usage.output_tokens and input_tokens_details.cached_tokens against your API logs. A cache hit does not make the entire request free.
Do I need to resend conversation history?
The examples use store:false. Resend the required context in input on each turn; a previous text response alone does not retain the conversation for you. With Chat Completions, put the relevant history in messages.
Does it support JSON output and function calls?
Yes. For Responses, use text.format.type=json_object for JSON and tools/tool_choice to define and select functions. Your application executes returned function calls, then supplies a function_call_output with the matching call_id. The model does not execute local code for your application. See the API documentation for complete examples.
How do I detect the end of a streamed response?
Read text from response.output_text.delta and final usage from response.completed. Also handle response.incomplete and response.failed. Do not wait for the Chat Completions [DONE] marker on the Responses endpoint.
Can I reuse an existing HiAPI API key?
Yes, if the key has access to this model and the account has sufficient balance. Set the OpenAI SDK base_url to https://api.hiapi.ai/v1 and use responses.create or chat.completions.create. The web Playground uses your signed-in session, so you do not paste an API key there.