GET

/v1/schemas/moonshotai-cn/chat/v1/responses?kind=output

kind outputactivity chathash add3fb2b…extracted Oct 7, 2026version currentsource upstream spec ↗
fieldrecorded source
schemaSource linked above.

upstream-spec

Source trace
6b78ce0730900579f18d575e9c1c5ed3e34244ea683efa15cb57cee501201ddb
{
  "fetchedAt": 1791351145,
  "extractorVersion": "1",
  "verifiedAt": null
}

Response body

26 properties · 0 required · 13 $defs
propertytypedescriptionconstraints
idstring响应的唯一标识符。
objectenumresponse
created_atinteger响应创建时的 Unix 时间戳。
completed_atany响应结束时的 Unix 时间戳。`status` 为 `completed` 或 `incomplete` 时给出,为 `in_progress` 或 `failed` 时是 `null`。
statusenum响应状态。流式的起手快照为 `in_progress`。in_progress | completed | incomplete | failed
modelstring产生本次响应的模型。
outputResponsesOutputItem[]输出 item 数组,顺序为 web_search_call(如有)、reasoning、message、工具调用。
usageResponsesUsage本次响应的 Token 用量。nullable
incomplete_detailsobject`status` 为 `incomplete` 时给出原因。
errorobject`status` 为 `failed` 时给出错误信息。
instructionsany
reasoningany
textany
toolsany
tool_choiceenum控制工具调用行为。取 `auto` 时由模型自行决定是否调用工具。auto · nullable
max_output_tokensany
temperatureany
top_pany
metadataany
parallel_tool_callsboolean
service_tierany
storeboolean固定为 `false`。
backgroundany固定为 `false`。
previous_response_idany固定为 `null`。
conversationany固定为 `null`。
prompt_cache_optionsobject服务端实际应用的上下文缓存写入选项。当请求省略 prompt_cache_options 时,以此处返回的 mode 和 ttl 为准

Types

13 $defs

ResponsesCustomToolobject

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

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

ResponsesFunctionToolobject

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

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

ResponsesNamespaceToolobject

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

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

ResponsesOutputCustomToolCallItemobject

模型发起的自定义工具调用。

typeenumcustom_tool_call
idstring
call_idstring回传结果时在 `custom_tool_call_output` 中使用该值。
namestring
namespacestring调用命名空间工具时返回。
inputstring模型生成的自由文本输入。
statusenumin_progress | completed

ResponsesOutputFunctionCallItemobject

模型发起的函数调用。

typeenumfunction_call
idstring
call_idstring回传结果时在 `function_call_output` 中使用该值。
namestring
namespacestring调用命名空间工具时返回。
argumentsstring函数参数的 JSON 字符串。
statusenumin_progress | completed

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

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

ResponsesOutputMessageItemobject

模型的文本回复。

typeenummessage
idstring
roleenumassistant
contentobject[]
statusenumin_progress | completed

ResponsesOutputReasoningItemobject

模型的推理内容。

typeenumreasoning
idstring
summaryobject[]推理内容。
encrypted_contentany固定为 `null`。
statusenumin_progress | completed

ResponsesOutputWebSearchCallItemobject

服务端执行的联网搜索调用。仅在请求包含 `web_search` 工具且服务端判断需要搜索时返回,位于 output 数组最前面。

typeenumweb_search_call
idstring
statusenumin_progress | completed
actionobject本次搜索的动作。
resultsobject[]图片搜索结果。仅在 `include` 包含 `web_search_call.results` 且 `search_content_types` 包含 `image` 时返回。

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

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

ResponsesToolChoiceenum

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

auto

ResponsesUsageobject

本次响应的 Token 用量。

input_tokensinteger输入 Token 数量,含命中缓存的部分。
input_tokens_detailsobject
output_tokensinteger输出 Token 数量,含推理 Token。
output_tokens_detailsobject
total_tokensinteger总 Token 数量。

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", …}]}