Chat
Create Chat Completion
Creates a completion for the chat message. Supports standard chat, Partial Mode, and Tool Use (Function Calling).
post/v1/chat/completions
Request
- Base URL: https://api.moonshot.ai
- URL: https://api.moonshot.ai/v1/chat/completions
- 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
Chat completion response
Example response
{
"object": "chat.completion"
}Changes
No recorded changes to this operation across all 1 revision of this API.