/v1/schemas/moonshot/chat/v1/responses
| field | recorded source |
|---|---|
| schema | Source linked above. upstream-spec Source tracef6c78afc0c20eb8d222859e3bae823a1c32bb4f8876059aa61df062c264a7fdf{
"fetchedAt": 1792819279,
"extractorVersion": "1",
"verifiedAt": null
} |
Request body
13 properties · 2 required · 16 $defs| property | type | description | constraints |
|---|---|---|---|
| model* | string | ID of the model to use. This endpoint currently supports `kimi-k3.1-pro`, `kimi-k3.1-pro-highspeed`, and `kimi-k3`. | |
| input* | string | ResponsesInputItem[] | Input for this request. A string is equivalent to a single user message. An array holds ordered typed items and may contain conversation history, tool calls, and tool results. | |
| instructions | string | Top-level system instructions, applied ahead of every input item. | |
| stream | boolean | When true, the response is delivered as a stream of SSE events. | default: false |
| max_output_tokens | integer | Maximum number of tokens to generate for this response. For Kimi K3-series models (`kimi-k3.1-pro`, `kimi-k3.1-pro-highspeed`, and `kimi-k3`) it defaults to 131072 and can be set up to 1048576. This refers to the length of tokens you expect us to return, not t… | |
| reasoning | object | Reasoning configuration. | |
| text | object | Output text configuration. | |
| tools | ResponsesTool[] | List of tools the model may call. | |
| tool_choice | enum | Controls tool-calling behavior. With `auto`, the model decides whether to call a tool. | auto |
| include | enum[] | Additional fields to return. Only effective when the `web_search` tool is used. `web_search_call.action.sources` returns the web pages the search hit; `web_search_call.results` returns image search results. | |
| prompt_cache_key | string | Context cache identifier. Reusing the same value across a session improves cache hit rate. | |
| prompt_cache_options | object | Context cache write options. When omitted, cache write is enabled by default (5m tier): the system automatically writes the request prefix to the 5m cache tier | |
| safety_identifier | string | A stable identifier used to help detect users of your application that may be violating usage policies. The ID should be a string that uniquely identifies each user. It is recommended to hash the username or email address to avoid sending any identifying infor… |
Types
16 $defsResponsesAdditionalToolsItemobject
Adds callable tools partway through a conversation, effective from the position of this item.
| type* | enum | additional_tools | |
| id | string | ||
| role* | enum | developer | |
| tools* | ResponsesTool[] |
ResponsesCustomToolobject
A custom tool that takes free-form text input. Only the custom tool named `apply_patch` is supported, and it must define a `grammar` + `lark` format; when the model calls it, a `custom_tool_call` item is returned in the output.
| type* | enum | custom | |
| name* | enum | Tool name. Only `apply_patch` is supported. | apply_patch |
| description | string | ||
| format* | object | Input format constraint. Only the `grammar` type with `lark` syntax is supported. |
ResponsesCustomToolCallItemobject
Replays a custom tool call.
| type* | enum | custom_tool_call | |
| id | string | ||
| call_id* | string | Call ID paired with the matching `custom_tool_call_output`. | |
| name* | string | ||
| namespace | string | Namespace the tool belongs to, returned for namespace tool calls. | |
| input* | string | Free-form text input generated by the model. | |
| status | enum | completed |
ResponsesCustomToolCallOutputItemobject
Result of executing a custom tool call.
| type* | enum | custom_tool_call_output | |
| call_id* | string | Same call ID as the matching `custom_tool_call`. | |
| output* | string | ResponsesInputContentPart[] | Content returned by the tool. | |
| status | enum | completed |
ResponsesFunctionCallItemobject
Replays a function call.
| type* | enum | function_call | |
| id | string | ||
| call_id* | string | Call ID paired with the matching `function_call_output`. | |
| name* | string | ||
| namespace | string | Namespace the tool belongs to, returned for namespace tool calls. | |
| arguments* | string | JSON string of the function arguments. | |
| status | enum | completed |
ResponsesFunctionCallOutputItemobject
Result of executing a function call.
| type* | enum | function_call_output | |
| call_id* | string | Same call ID as the matching `function_call`. | |
| output* | string | ResponsesInputContentPart[] | Content returned by the tool. | |
| status | enum | completed |
ResponsesFunctionToolobject
A function tool whose arguments are described by a JSON Schema.
| type* | enum | function | |
| name* | string | Function name. Must follow the regex: ^[a-zA-Z_][a-zA-Z0-9-_]{0,127}$ | |
| description | string | ||
| parameters | object | JSON Schema describing the function arguments. | |
| strict | boolean |
ResponsesInputContentPartInput text | Input image | Output text
An element of a content array, discriminated by `type`.
ResponsesInputItemMessage | Reasoning | Function call | …
An element of the input array, discriminated by `type`. When `type` is omitted the item is treated as `message`.
ResponsesMessageItemobject
A conversation message. `type` may be omitted.
| type | enum | message | |
| role* | enum | Message role. `developer` is handled as a system instruction. | user | assistant | developer |
| content* | string | ResponsesInputContentPart[] | Message content, either a string or an array of content parts. | |
| status | enum | completed |
ResponsesNamespaceToolobject
Groups a set of function or custom tools under one namespace.
| type* | enum | namespace | |
| name* | string | ||
| description* | string | ||
| tools* | ResponsesFunctionTool | ResponsesCustomTool[] |
ResponsesReasoningItemobject
Replays reasoning content from a previous turn. `content` takes precedence over `summary`.
| type* | enum | reasoning | |
| id | string | ||
| summary | object[] | ||
| content | object[] | ||
| status | enum | completed |
ResponsesToolFunction tool | Custom tool | Namespace tool | …
A tool definition, discriminated by `type`. Supported types are `function`, `custom` (only `apply_patch`), `namespace`, and `web_search`; other tool types are not supported.
ResponsesToolChoiceenum
Controls tool-calling behavior. With `auto`, the model decides whether to call a tool.
auto
ResponsesWebSearchCallItemobject
Replays a previous web search call. Kept for history only and ignored during conversion; the search results are already carried by the assistant message that follows.
| type* | enum | web_search_call | |
| id | string | ||
| status | enum | completed | |
| action | object |
ResponsesWebSearchToolobject
A web search tool executed on the server side. When present, the server first decides from the input whether a search is needed; if so, it runs the search, injects the results into the model context, and returns a `web_search_call` item in the output. At most …
| type* | enum | web_search | |
| filters | object | Search scope filters. | |
| search_content_types | enum[] | Result types to search for. Defaults to `text` only. Including `image` additionally runs an image search. | default: ["text"] |
| image_settings | object | Image search settings. Only effective when `search_content_types` includes `image`. |
Validate a payload
before you spend tokens$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"moonshot","endpointId":"v1/responses","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}