curl --request POST \
--url https://www.anyfast.com.cn/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "deepseek-v4.1-flash",
"messages": [
{
"role": "user",
"content": "解释 B 树索引如何加速数据库查询。"
}
],
"max_tokens": 1024
}
'{
"id": "chatcmpl-example",
"object": "chat.completion",
"created": 123,
"model": "deepseek-v4.1-flash",
"choices": [
{
"index": 123,
"message": {
"role": "assistant",
"content": "<string>",
"reasoning_content": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
]
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"prompt_tokens_details": {
"cached_tokens": 123
},
"prompt_cache_hit_tokens": 123,
"prompt_cache_miss_tokens": 123
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}DeepSeek
deepseek-v4.1-flash
使用 DeepSeek V4.1 Flash 根据文本或图像输入生成响应。
POST
/
v1
/
chat
/
completions
curl --request POST \
--url https://www.anyfast.com.cn/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "deepseek-v4.1-flash",
"messages": [
{
"role": "user",
"content": "解释 B 树索引如何加速数据库查询。"
}
],
"max_tokens": 1024
}
'{
"id": "chatcmpl-example",
"object": "chat.completion",
"created": 123,
"model": "deepseek-v4.1-flash",
"choices": [
{
"index": 123,
"message": {
"role": "assistant",
"content": "<string>",
"reasoning_content": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
]
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"prompt_tokens_details": {
"cached_tokens": 123
},
"prompt_cache_hit_tokens": 123,
"prompt_cache_miss_tokens": 123
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
AnyFast 模型 ID。
Available options:
deepseek-v4.1-flash Example:
"deepseek-v4.1-flash"
对话消息列表。图像内容只能放在 user 消息中。
Minimum array length:
1Show child attributes
Show child attributes
思考模式配置。默认开启思考模式。
Show child attributes
Show child attributes
思考开关与推理强度。none 关闭思考;该字段位于请求顶层,不属于 thinking 对象。
Available options:
none, low, high, max 最大生成 Token 数。
Required range:
1 <= x <= 393216使用 json_object 开启 JSON 模式,同时需要在提示词中明确要求输出 JSON。
Show child attributes
Show child attributes
是否通过 SSE 流式返回消息增量。
Show child attributes
Show child attributes
开启思考模式时该参数会被忽略。
Required range:
0 <= x <= 2思考模式下小于 0.95 的值按 0.95 处理;非思考模式下有效值为 1.0。
Required range:
0 <= x <= 1Show child attributes
Show child attributes
Available options:
none, auto, required 为兼容性保留;开启思考模式时不生效。
Required range:
-2 <= x <= 2为兼容性保留;开启思考模式时不生效。
Required range:
-2 <= x <= 2用于内容安全和缓存隔离的稳定终端用户标识。
Maximum string length:
512Pattern:
^[a-zA-Z0-9\-_]+$