curl --request POST \
--url https://www.anyfast.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "deepseek-v4.1-flash-1017",
"messages": [
{
"role": "user",
"content": "解释 B 树索引如何加速数据库查询。"
}
],
"max_tokens": 1024
}
'{
"id": "chatcmpl-example",
"object": "chat.completion",
"created": 1792547235,
"model": "deepseek-v4-1-flash-261017",
"service_tier": "default",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "READY",
"reasoning_content": "The user wants only the word READY."
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 38,
"completion_tokens": 12,
"total_tokens": 50,
"prompt_tokens_details": {
"cached_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 9
}
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}DeepSeek
deepseek-v4.1-flash-1017
使用 DeepSeek V4.1 Flash 1017 根据文本或图像输入生成响应。
POST
/
v1
/
chat
/
completions
curl --request POST \
--url https://www.anyfast.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "deepseek-v4.1-flash-1017",
"messages": [
{
"role": "user",
"content": "解释 B 树索引如何加速数据库查询。"
}
],
"max_tokens": 1024
}
'{
"id": "chatcmpl-example",
"object": "chat.completion",
"created": 1792547235,
"model": "deepseek-v4-1-flash-261017",
"service_tier": "default",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "READY",
"reasoning_content": "The user wants only the word READY."
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 38,
"completion_tokens": 12,
"total_tokens": 50,
"prompt_tokens_details": {
"cached_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 9
}
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
application/json
AnyFast 模型 ID。
可用选项:
deepseek-v4.1-flash-1017 示例:
"deepseek-v4.1-flash-1017"
对话消息列表。图像内容只能放在 user 消息中。
Minimum array length:
1Show child attributes
Show child attributes
思考模式配置。默认开启思考模式。
Show child attributes
Show child attributes
思考强度。关闭思考请设置 thinking.type=disabled;该字段位于请求顶层。
可用选项:
low, high, max 最大生成 Token 数。
必填范围:
1 <= x <= 393216使用 json_object 开启 JSON 模式,同时需要在提示词中明确要求输出 JSON。
Show child attributes
Show child attributes
是否通过 SSE 流式返回消息增量。
Show child attributes
Show child attributes
开启思考模式时该参数会被忽略。
必填范围:
0 <= x <= 2思考模式下小于 0.95 的值按 0.95 处理;非思考模式下有效值为 1.0。
必填范围:
0 <= x <= 1Show child attributes
Show child attributes
可用选项:
none, auto, required 为兼容性保留;开启思考模式时不生效。
必填范围:
-2 <= x <= 2为兼容性保留;开启思考模式时不生效。
必填范围:
-2 <= x <= 2用于内容安全和缓存隔离的稳定终端用户标识。
Maximum string length:
512Pattern:
^[a-zA-Z0-9\-_]+$响应
对话补全创建成功
示例:
"chatcmpl-example"
可用选项:
chat.completion Unix 秒级时间戳。
AnyFast 响应中的模型名称,与公开请求模型 ID 不同。
示例:
"deepseek-v4-1-flash-261017"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
AnyFast 返回的服务层级。
示例:
"default"
此页面对您有帮助吗?