进阶 api-docs.deepseek.com 2026-10-13 22:45:35 · 21 阅读

第7章 模型列表 API

模型列表 GET /models 列出当前可用的模型,并提供元数据,包括显示名称、上下文窗口、输出限制、支持的输入/输出模态、支持的推理强度等级以及各协议的 API 功能。请查看模型与定价页面了解我们当前支持的模型。 响应 200 OK,返回模型列表 application/json 模式示例(源自模式定义) 模式定义 对象 字符串 必填 可能值:[list] 对象类型,始终为 list。 data 对象数组 必填 模型对象列表。 数组 [id 字符串 必填 模型标识符,可在 API 端点中引用。 object 字符串 必填 可能值:[model] 对象类型,始终为 "model"。 owned_by 字符串 必填 拥有该模型的组织机构。 name 字符串 模型的显示名称,用于模型选择器和发现工具。 context_window 整数 上下文窗口的总 token 容量,计入输入和输出 token。 max_output_tokens 整数 服务器允许单次响应中的最大输出 token 数,即 max_tokens 参数的最大接受值。 input_modalities 字符串数组 可能值:[text, image] 模型接受的输入类型。 output_modalities 字符串数组 可能值:[text] 模型可生成的媒体类型。 effort 对象 启用思考模式时可用的推理强度等级。 supported_levels 字符串数组 必填 启用思考模式时模型支持的推理强度等级,按推荐显示顺序排列。这些是 reasoning_effort 参数接受的值;用于关闭思考模式的 none 不包含在内。 default_level 字符串 当启用思考模式且请求未指定强度时,服务器使用的推理强度等级。始终是 supported_levels 中的一个。仅在服务器为该模型定义了默认值时存在。 api_capabilities 对象 按 API 协议声明的模型行为。 anthropic_messages 对象 通过 Anthropic Messages API 使用模型时适用的功能。 system_prompt_update 字符串 必填 可能值:[leading-only, in-history] 模型在对话过程中如何获取更新后的系统提示。 leading-only:仅对话开始处的系统提示生效。若要更改系统提示,需修改开头的系统提示;历史中后续出现的系统消息不被视为系统提示更新。 in-history:可以向对话历史中追加系统消息。历史中最新的系统消息提供完整的有效系统提示,并替换之前所有系统提示。 ]
"object": "list",
"data": [
{
"id": "string",
"object": "model",
"owned_by": "string",
"name": "string",
"context_window": 0,
"max_output_tokens": 0,
"input_modalities": [
"text"
],
"output_modalities": [
"text"
],
"effort": {
"supported_levels": [
"string"
],
"default_level": "string"
},
"api_capabilities": {
"anthropic_messages": {
"system_prompt_update": "leading-only"
}
}
}
]
}
{
"object": "list",
"data": [
{
"id": "deepseek-flash",
"object": "model",
"owned_by": "deepseek",
"name": "DeepSeek-V4.1-Flash",
"context_window": 1048576,
"max_output_tokens": 393216,
"input_modalities": ["text", "image"],
"output_modalities": ["text"],
"effort": {
"supported_levels": ["low", "high", "max"],
"default_level": "high"
},
"api_capabilities": {
"anthropic_messages": {
"system_prompt_update": "in-history"
}
}
},
{
"id": "deepseek-v4-pro",
"object": "model",
"owned_by": "deepseek",
"name": "DeepSeek-V4-Pro",
"context_window": 1048576,
"max_output_tokens": 393216,
"input_modalities": ["text"],
"output_modalities": ["text"],
"effort": {
"supported_levels": ["low", "high", "max"],
"default_level": "high"
},
"api_capabilities": {
"anthropic_messages": {
"system_prompt_update": "leading-only"
}
}
}
]
}
加载中...

评论 (0)