DeepSeek-V4.1-Flash-1017 is a minor update to DeepSeek-V4.1-Flash, delivering substantial improvements across reasoning, coding, agentic tasks, and visual benchmarks.
Parameters
For a more detailed explanation on possible parameters, refer to OpenAI’s Create chat completion documentation.| Field | Type | Definition | Default Value |
|---|---|---|---|
model | str | Required. The model key to be used. Use deepseek-ai/deepseek-v4.1-flash. | deepseek-ai/deepseek-v4.1-flash |
messages | arr | Required. Conversation history. Each object has a role (user or assistant) and content (str). | - |
stream | bool | Routes the request to the streaming path vs non-streaming path. | false |
max_completion_tokens | int | Output token cap. | - |
temperature | float | Randomness. Greedy sampling at 0 ; identical results are not guaranteed. | 1 |
top_p | float | Nucleus sampling cutoff. | 1 |
top_k | int | Limits sampling to the top K tokens. | - |
reasoning_effort | str | Constrains effort on reasoning for reasoning models. Supported values are none, low, high, max. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Setting this value as none disables thinking. | high |
n | int | How many chat completion choices to generate for each input message. Currently, we only support 1. | 1 |
presence_penalty | float | Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model’s likelihood to talk about new topics. | 0 |
frequency_penalty | float | Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model’s likelihood to repeat the same line verbatim. | 0 |
logprobs | bool | Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message. | false |
max_thinking_tokens | int | Maximum number of thinking tokens allowed before generating the final answer. | - |
Request Format
from openai import OpenAI
client = OpenAI(
base_url="https://api-cdn.deploy.com/api/v1",
api_key="DEPLOY_API_KEY",
)
response = client.chat.completions.create(
model="deepseek-ai/deepseek-v4.1-flash-1017",
messages=[{"role": "user", "content": "Explain TCP and UDP in two sentences."}],
)
print(response.choices[0].message.content)
curl https://api-cdn.deploy.com/api/v1/chat/completions \
-H "Authorization: Bearer $DEPLOY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-ai/deepseek-v4.1-flash-1017",
"messages": [{"role": "user", "content": "Hello!"}]
}'
Response Format
{
"id": "bf7eb425-c8ee-11f1-bc46-67542ee84316",
"object": "chat.completion",
"created": 1792106317,
"model": "deepseek-ai/deepseek-v4.1-flash",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I help you today?",
"reasoning_content": "The user just said \"Hello!\" That's a simple greeting. I should respond warmly and openly, inviting them to share what they need. No need for tools or complex analysis here—just a friendly, natural reply that sets a helpful tone. I'll keep it simple and engaging."
},
"finish_reason": "stop",
"logprobs": null
}
],
"usage": {
"prompt_tokens": 32,
"completion_tokens": 68,
"total_tokens": 100,
"prompt_tokens_details": { "cached_tokens": 0 },
"completion_tokens_details": { "reasoning_tokens": 58 }
}
}

