API 文档 / DeepSeek Flash(V4.1)
API 文档 · DeepSeek Flash(V4.1)
模型 ID:deepseek-flash
接口
POST /v1/chat/completionsapplication/json对话补全GET /v1/models列出可用模型(含 max_model_len)请求参数:
| 参数 | 类型 | 必填 | 默认 | 说明 |
|---|---|---|---|---|
model | string | 是 | — | 模型标识:deepseek-flash |
messages | array | 是 | — | 消息列表;content 可为文本,或 [{type:"text"},{type:"image_url",image_url:{url}}](支持图片理解) |
stream | boolean | 否 | false | 是否流式返回(SSE) |
max_tokens | integer | 否 | — | 最大输出 token 数(可选;服务端有默认上限,建议显式设置) |
temperature | number | 否 | — | 采样温度(可选) |
top_p | number | 否 | — | 核采样(可选) |
tools / tool_choice | object | 否 | — | 工具调用(透传) |
响应示例:
{
"id": "chatcmpl-xxx",
"object": "chat.completion",
"model": "deepseek-flash",
"choices": [{
"index": 0,
"message": { "role": "assistant", "content": "你好!" },
"finish_reason": "stop"
}],
"usage": { "prompt_tokens": 8, "completion_tokens": 20, "total_tokens": 28 }
}所有模型共用同一 API Key 与同一端点:
https://api.trellis.hk/v1