GET

/v1/schemas/moonshotai-cn/chat/v1/responses

kind inputactivity chathash 58bca315…extracted Oct 24, 2026version currentsource upstream spec ↗
fieldrecorded source
schemaSource linked above.

upstream-spec

Source trace
0fc1213cc878662cfb4dc71f9526e83e0a192b10691c543339fda4d21e784977
{
  "fetchedAt": 1792819843,
  "extractorVersion": "1",
  "verifiedAt": null
}

Request body

13 properties · 2 required · 16 $defs
propertytypedescriptionconstraints
model*string使用的模型 ID。本接口当前支持 `kimi-k3.1-pro`、`kimi-k3.1-pro-highspeed` 和 `kimi-k3`。
input*string | ResponsesInputItem[]本次请求的输入。传字符串等价于一条 user 消息;传数组时按顺序给出带类型的 item,可包含历史对话、工具调用与工具结果。
instructionsstring顶层系统指令,作为最靠前的指令生效。
streamboolean为 true 时以 SSE 事件流返回响应。default: false
max_output_tokensinteger本次响应最多生成的 Token 数量。Kimi K3 系列(`kimi-k3.1-pro`、`kimi-k3.1-pro-highspeed`、`kimi-k3`)默认为 131072,最大可设置为 1048576。此值为期望返回的 Token 长度,而非输入加输出的总长度。达到上限时 `status` 为 `incomplete`,`incomplete_details.reason` 为 `max_output_tokens`。
reasoningobject推理相关配置。
textobject输出文本配置。
toolsResponsesTool[]模型可调用的工具列表。
tool_choiceenum控制工具调用行为。取 `auto` 时由模型自行决定是否调用工具。auto
includeenum[]要额外返回的字段,仅在使用 `web_search` 工具时有效。`web_search_call.action.sources` 返回搜索命中的网页来源;`web_search_call.results` 返回图片搜索结果。
prompt_cache_keystring上下文缓存标识,同一会话使用相同取值可提升缓存命中率。
prompt_cache_optionsobject上下文缓存写入选项。不传时默认开启缓存写入(5m 档):系统自动将请求前缀写入 5m 档缓存
safety_identifierstring用于检测可能违反使用政策的用户的稳定标识符。应为唯一标识每个用户的字符串。建议对用户名或邮箱进行哈希处理以避免发送可识别信息

Types

16 $defs

ResponsesAdditionalToolsItemobject

在对话中途追加可调用的工具,作用范围从该 item 所在位置开始。

type*enumadditional_tools
idstring
role*enumdeveloper
tools*ResponsesTool[]

ResponsesCustomToolobject

接收自由文本输入的自定义工具。当前仅支持名为 `apply_patch` 的自定义工具,且必须提供 `grammar` + `lark` 格式定义;模型调用时在 output 中返回 `custom_tool_call` item。

type*enumcustom
name*enum工具名称,当前仅支持 `apply_patch`。apply_patch
descriptionstring
format*object输入格式约束。当前仅支持 `grammar` 类型与 `lark` 语法。

ResponsesCustomToolCallItemobject

回放一次自定义工具调用。

type*enumcustom_tool_call
idstring
call_id*string与对应 `custom_tool_call_output` 配对的调用 ID。
name*string
namespacestring工具所属的命名空间,调用命名空间工具时返回。
input*string模型生成的自由文本输入。
statusenumcompleted

ResponsesCustomToolCallOutputItemobject

自定义工具调用的执行结果。

type*enumcustom_tool_call_output
call_id*string与对应 `custom_tool_call` 相同的调用 ID。
output*string | ResponsesInputContentPart[]工具返回的内容。
statusenumcompleted

ResponsesFunctionCallItemobject

回放一次函数调用。

type*enumfunction_call
idstring
call_id*string与对应 `function_call_output` 配对的调用 ID。
name*string
namespacestring工具所属的命名空间,调用命名空间工具时返回。
arguments*string函数参数的 JSON 字符串。
statusenumcompleted

ResponsesFunctionCallOutputItemobject

函数调用的执行结果。

type*enumfunction_call_output
call_id*string与对应 `function_call` 相同的调用 ID。
output*string | ResponsesInputContentPart[]工具返回的内容。
statusenumcompleted

ResponsesFunctionToolobject

用 JSON Schema 描述参数的函数工具。

type*enumfunction
name*string函数名称。必须符合正则表达式:^[a-zA-Z_][a-zA-Z0-9-_]{0,127}$
descriptionstring
parametersobject描述函数参数的 JSON Schema。
strictboolean

ResponsesInputContentPart输入文本 | 输入图片 | 输出文本

content 数组的元素,按 `type` 区分。

ResponsesInputItem消息 | 推理 | 函数调用 | …

input 数组的元素,按 `type` 区分。省略 `type` 时按 `message` 处理。

ResponsesMessageItemobject

一条对话消息。`type` 可省略。

typeenummessage
role*enum消息角色。`developer` 按系统指令处理。user | assistant | developer
content*string | ResponsesInputContentPart[]消息内容,字符串或 content part 数组。
statusenumcompleted

ResponsesNamespaceToolobject

把一组函数工具或自定义工具收纳到同一个命名空间下。

type*enumnamespace
name*string
description*string
tools*ResponsesFunctionTool | ResponsesCustomTool[]

ResponsesReasoningItemobject

回放上一轮的推理内容。`content` 优先于 `summary`。

type*enumreasoning
idstring
summaryobject[]
contentobject[]
statusenumcompleted

ResponsesTool函数工具 | 自定义工具 | 命名空间工具 | …

工具定义,按 `type` 区分。支持 `function`、`custom`(仅 `apply_patch`)、`namespace` 与 `web_search`,其他工具类型不支持。

ResponsesToolChoiceenum

控制工具调用行为。取 `auto` 时由模型自行决定是否调用工具。

auto

ResponsesWebSearchCallItemobject

回放上一轮的联网搜索调用。仅用于保留历史,转换时会被忽略;搜索结果已包含在其后的 assistant 消息中。

type*enumweb_search_call
idstring
statusenumcompleted
actionobject

ResponsesWebSearchToolobject

由服务端执行的联网搜索工具。加入后服务端会先根据输入判断是否需要搜索;需要时执行搜索并把结果注入模型上下文,同时在 output 中返回一个 `web_search_call` item。每个请求最多包含一个 `web_search` 工具。`search_context_size`、`blocked_domains`、`filters.blocked_domains` 不支持,传入会返回 `invalid_request_error`;`user_location`、`external_web_access`、`…

type*enumweb_search
filtersobject搜索范围过滤。
search_content_typesenum[]搜索结果类型,默认仅 `text`。包含 `image` 时会额外执行图片搜索。default: ["text"]
image_settingsobject图片搜索设置,仅在 `search_content_types` 包含 `image` 时生效。

Validate a payload

before you spend tokens
shell
$ curl -X POST https://modelschemas.com/v1/validate \
    -d '{"provider":"moonshotai-cn","endpointId":"v1/responses","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}