DeepSeek V4.1 Flash Preview 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 | Preview |
| Type | Text generation · Responses + Chat Completions |
| Reasoning | none / high / max |
| Streaming | Supported |
| Pricing | HiAPI live pricing |
DeepSeek V4.1 Flash Preview is available through HiAPI for text generation, reasoning, and streaming. Use Responses for new integrations or retain Chat Completions for existing clients.
Production guidance
- 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; high and max enable reasoning.
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
}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
}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 does Preview mean?
This model is offered as DeepSeek V4.1 Flash Preview. Use the public model ID shown here and verify behavior against your workload when the model version changes.
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, high, or max. The examples explicitly use 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?
These capabilities have not been verified for this HiAPI integration and are not advertised on this page. Use text input for the documented request contract.