DeepSeek V4.1 Flash 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 name | deepseek-v4.1-flash |
|---|---|
| Version | GA · DeepSeek Flash |
| Type | Text generation · Responses + Chat Completions |
| Reasoning | none / low / high / max · default high |
| Streaming | Supported |
| Context / output | 1M context · up to 384K output |
| Image input | URL / base64 |
| Pricing | HiAPI live pricing |
DeepSeek official model name: deepseek-flash. HiAPI exposes this integration under the public model ID deepseek-v4.1-flash for text and image input. According to DeepSeek official documentation, it supports a 1M-token context window, up to 384K output tokens, four reasoning efforts, and image URL or base64 input.
Production guidance
- DeepSeek calls the official model deepseek-flash; HiAPI keeps deepseek-v4.1-flash as the public model ID. Use deepseek-v4.1-flash in every request and code example.
- Send required conversation history in input on every request.
- Omit store. Do not send previous_response_id, conversation, background, or context_management.
- Use the same HiAPI API key across enabled models; media generation uses /v1/tasks and a different request shape.
Best suited for
Generate text with an explicit reasoning effort and output budget.
inputreasoning.effortmax_output_tokensRequest parameters
model string required Use deepseek-v4.1-flash.
input string | array required Text or message items; replay the required conversation each turn.
stream boolean optional true returns semantic SSE events.
max_output_tokens integer optional Output budget including reasoning tokens. The example is not the model limit.
reasoning object optional Examples explicitly select high; choose an effort for your request.
effort enum optional none disables reasoning; low, high, and max enable reasoning. Default: high.
input[].content[].type enum optional Message content block type.
input[].content[].image_url string optional A publicly reachable HTTPS image URL or data:image/...;base64,... data URL. Replace the placeholder with your own accessible image.
API examples
Request examples
Choose none for a response without reasoning.
{
"model": "deepseek-v4.1-flash",
"input": "Reply with OK only.",
"reasoning": {
"effort": "none"
},
"max_output_tokens": 128,
"stream": false
}Choose low for lighter reasoning effort.
{
"model": "deepseek-v4.1-flash",
"input": "Reply with OK only.",
"reasoning": {
"effort": "low"
},
"max_output_tokens": 128,
"stream": false
}Select the verified max effort explicitly; increase the output budget for longer work.
{
"model": "deepseek-v4.1-flash",
"input": "Reply with OK only.",
"reasoning": {
"effort": "max"
},
"max_output_tokens": 128,
"stream": false
}Read semantic SSE events and the terminal response usage.
{
"model": "deepseek-v4.1-flash",
"input": "Reply with OK only.",
"reasoning": {
"effort": "high"
},
"max_output_tokens": 128,
"stream": true
}Send an image URL or data URI with a user message.
{
"model": "deepseek-v4.1-flash",
"input": [
{
"role": "user",
"content": [
{
"type": "input_text",
"text": "Describe this image."
},
{
"type": "input_image",
"image_url": "https://static.hiapi.ai/example/subject-1.jpg"
}
]
}
],
"reasoning": {
"effort": "high"
},
"max_output_tokens": 128,
"stream": false
}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.1-flash",
"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
}
}
} - Read output_text content from output for a non-streaming response.
- Read usage.input_tokens, usage.output_tokens, and usage.total_tokens; output_tokens_details.reasoning_tokens identifies reasoning usage when present.
- In a stream, read the response usage from the terminal event. Handle incomplete or failed responses explicitly.
FAQ
What are the official name and the HiAPI model ID?
DeepSeek names the official model deepseek-flash. HiAPI exposes it under the public model ID deepseek-v4.1-flash; use that ID in requests and examples.
What is DeepSeek V4.1 Flash?
DeepSeek V4.1 Flash is a production model for text and image input. Use the public model ID shown on this page.
Which endpoint and model ID do I use?
Use model deepseek-v4.1-flash with POST /v1/responses. POST /v1/chat/completions remains available, with messages instead of input. An OpenAI SDK client can use the HiAPI base URL https://api.hiapi.ai/v1 and its HiAPI API key.
How do I select reasoning?
Responses uses reasoning.effort: none, low, high, or max. The default is high; none disables reasoning. Do not assume effort aliases from other models apply.
How do I continue a conversation?
Responses is stateless for this model. Replay required user and assistant messages in input on every turn. Omit store and do not send previous_response_id, conversation, background, or context_management.
How does streaming finish?
Append response.output_text.delta events and read usage from response.completed. Handle response.incomplete and response.failed as terminal outcomes too. Do not wait for the Chat Completions [DONE] marker.
How are tokens billed?
Input, output, and cached-input tokens have separate rates. Reasoning tokens consume the output budget; inspect usage and the live HiAPI price rather than hardcoding a price from this guide. View live pricing.
Are images, tools, and structured JSON supported?
Image URL and base64 input are supported for this integration. Tool calling and structured JSON are not verified and are not advertised.