DeepSeek V4.1 Flash
deepseek-v4.1-flash-1017
TextDeepSeekDeepSeek V4.1 Flashdeepseek-v4.1-flash-1017
deepseek-v4.1-flash-1017 is the 1017 checkpoint of V4.1 Flash, with open weights; it scores higher, finishes faster and answers shorter than the first release. Image input, 1M-token context, 384K output, switchable thinking, JSON output and tool choice.
Authentication
- Base URL
https://api.dreamto.ai- Authorization
Authorization: Bearer YOUR_API_KEY- Content-Type
application/json- Model name (model)
deepseek-v4.1-flash-1017
Integration protocol
Why choose this protocol
Best for existing OpenAI SDK, Chat Completions code, or unified gateway integrations.
Endpoint URL
POST/v1/chat/completions
Authorization: Bearer YOUR_API_KEYContent-Type: application/jsonRequest / response JSON
Request
{
"stop": [
"\n\n"
],
"model": "deepseek-v4.1-flash-1017",
"tools": [],
"top_p": 1,
"stream": false,
"user_id": "user_123",
"logprobs": false,
"messages": [
{
"role": "user",
"content": "Hello, world"
}
],
"thinking": {
"type": "enabled",
"reasoning_effort": "high"
},
"max_tokens": 4096,
"temperature": 1,
"tool_choice": "auto",
"top_logprobs": 5,
"stream_options": {
"include_usage": true
},
"response_format": {
"type": "json_object"
},
"system_instruction": "You are a rigorous assistant."
}Response
{
"id": "chatcmpl_example",
"model": "deepseek-v4.1-flash-1017",
"usage": {
"total_tokens": 24,
"prompt_tokens": 8,
"completion_tokens": 16
},
"object": "chat.completion",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello from Mix API"
},
"finish_reason": "stop"
}
],
"created": 1710000000
}Request / response fields
Request fields
| Field | Field type | Required | Default | Options / range | Description | Example |
|---|---|---|---|---|---|---|
| messages | array | Y | - | - | DeepSeek Chat Completions message array. | [{"role":"user","content":"Hello, world"}] |
| system_instruction | string | N | - | - | Used to set the role, style, and boundaries of responses. | You are a rigorous assistant. |
| temperature | number | N | 1 | - | Controls randomness. DeepSeek officially recommends adjusting either temperature or top_p, not both. | 1 |
| top_p | number | N | 1 | - | Nucleus sampling probability threshold. DeepSeek officially recommends not changing temperature at the same time. | 1 |
| max_tokens | integer | N | - | - | Limits the maximum output length of this response. | 4096 |
| stop | array | N | - | - | A string or array of strings that stops generation. | ["\n\n"] |
| stream | boolean | N | false | - | Whether to use an SSE streaming response. | false |
| stream_options | object | N | - | - | Extra streaming options, e.g. include_usage. | {"include_usage":true} |
| thinking | object | N | - | - | DeepSeek thinking mode configuration, used to control reasoning output. | {"type":"enabled","reasoning_effort":"high"} |
| response_format | object | N | - | - | Asks the model to return a structured format such as a JSON object. | {"type":"json_object"} |
| tools | array | N | - | - | DeepSeek tools/function calling definitions. | [] |
| tool_choice | enum | N | - | none, auto, required | Controls the tool calling strategy. | auto |
| logprobs | boolean | N | false | - | Whether to return log probabilities for output tokens. | false |
| top_logprobs | integer | N | - | - | Number of most likely tokens to return at each position. | 5 |
| user_id | string | N | - | - | Unique end-user identifier, used for safety and abuse detection on DeepSeek's side. | user_123 |
Response fields
| Field | Field type | Required | Default | Options / range | Description | Example |
|---|---|---|---|---|---|---|
| id | string | N | - | - | - | chatcmpl_example |
| object | string | N | - | - | - | chat.completion |
| created | integer | N | - | - | - | 1710000000 |
| model | string | N | - | - | - | deepseek-v4.1-flash-1017 |
| choices | array | N | - | - | - | [{"index":0,"message":{"role":"assistant","content":"Hello from Mix API"},"finish_reason":"stop"}] |
| choices[] | object | N | - | - | - | {"index":0,"message":{"role":"assistant","content":"Hello from Mix API"},"finish_reason":"stop"} |
| choices[].index | integer | N | - | - | - | 0 |
| choices[].message | object | N | - | - | - | {"role":"assistant","content":"Hello from Mix API"} |
| choices[].message.role | string | N | - | - | - | assistant |
| choices[].message.content | string | N | - | - | - | Hello from Mix API |
| choices[].finish_reason | string | N | - | - | - | stop |
| usage | object | N | - | - | - | {"total_tokens":24,"prompt_tokens":8,"completion_tokens":16} |
| usage.prompt_tokens | integer | N | - | - | - | 8 |
| usage.completion_tokens | integer | N | - | - | - | 16 |
| usage.total_tokens | integer | N | - | - | - | 24 |
Code examples
cURLrequest.sh
curl -X POST "https://api.dreamto.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4.1-flash-1017",
"messages": [
{
"content": "Hello, world",
"role": "user"
}
],
"system_instruction": "You are a rigorous assistant.",
"temperature": 1,
"top_p": 1,
"max_tokens": 4096,
"stop": [
"\n\n"
],
"stream": false,
"stream_options": {
"include_usage": true
},
"thinking": {
"reasoning_effort": "high",
"type": "enabled"
},
"response_format": {
"type": "json_object"
},
"tools": [],
"tool_choice": "auto",
"logprobs": false,
"top_logprobs": 5,
"user_id": "user_123"
}'