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/json

Request / 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
FieldField typeRequiredDefaultOptions / rangeDescriptionExample
messagesarrayY--DeepSeek Chat Completions message array.[{"role":"user","content":"Hello, world"}]
system_instructionstringN--Used to set the role, style, and boundaries of responses.You are a rigorous assistant.
temperaturenumberN1-Controls randomness. DeepSeek officially recommends adjusting either temperature or top_p, not both.1
top_pnumberN1-Nucleus sampling probability threshold. DeepSeek officially recommends not changing temperature at the same time.1
max_tokensintegerN--Limits the maximum output length of this response.4096
stoparrayN--A string or array of strings that stops generation.["\n\n"]
streambooleanNfalse-Whether to use an SSE streaming response.false
stream_optionsobjectN--Extra streaming options, e.g. include_usage.{"include_usage":true}
thinkingobjectN--DeepSeek thinking mode configuration, used to control reasoning output.{"type":"enabled","reasoning_effort":"high"}
response_formatobjectN--Asks the model to return a structured format such as a JSON object.{"type":"json_object"}
toolsarrayN--DeepSeek tools/function calling definitions.[]
tool_choiceenumN-none, auto, requiredControls the tool calling strategy.auto
logprobsbooleanNfalse-Whether to return log probabilities for output tokens.false
top_logprobsintegerN--Number of most likely tokens to return at each position.5
user_idstringN--Unique end-user identifier, used for safety and abuse detection on DeepSeek's side.user_123
Response fields
FieldField typeRequiredDefaultOptions / rangeDescriptionExample
idstringN---chatcmpl_example
objectstringN---chat.completion
createdintegerN---1710000000
modelstringN---deepseek-v4.1-flash-1017
choicesarrayN---[{"index":0,"message":{"role":"assistant","content":"Hello from Mix API"},"finish_reason":"stop"}]
choices[]objectN---{"index":0,"message":{"role":"assistant","content":"Hello from Mix API"},"finish_reason":"stop"}
choices[].indexintegerN---0
choices[].messageobjectN---{"role":"assistant","content":"Hello from Mix API"}
choices[].message.rolestringN---assistant
choices[].message.contentstringN---Hello from Mix API
choices[].finish_reasonstringN---stop
usageobjectN---{"total_tokens":24,"prompt_tokens":8,"completion_tokens":16}
usage.prompt_tokensintegerN---8
usage.completion_tokensintegerN---16
usage.total_tokensintegerN---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"
}'