Messages
Messages API
Call Kimi models with an Anthropic Messages API compatible format, supporting streaming, tool use, image input, thinking, and structured output.
post/anthropic/v1/messages
Request
- Base URL: https://api.moonshot.ai
- URL: https://api.moonshot.ai/anthropic/v1/messages
- Auth: HTTP bearer
Headers
X-Msh-Request-Noncestring
Example:7d929748-0ae6-41c2-ab5d-a186498ad721
A client-generated random nonce (a UUID v4 is recommended). Sending it enables Request Signature: the Kimi API returns Msh-Request-Timestamp and Msh-Request-Signature in the response headers, which can later be used to prove that the request was handled by the Kimi API. Exactly one non-empty header value is allowed; if the value is invalid, the request proceeds normally but the headers above are not returned. See Verify Request Signature.
Request body
Example request
{
"messages": [
{
"role": "user"
}
]
}Response
Message response
Example response
{
"type": "message"
}Changes
No recorded changes to this operation across all 1 revision of this API.