Moonshot AI (Kimi)
communityChinese AI company with Kimi long-context language model supporting 200K+ token context.
This is a community-generated spec
This /ai spec was auto-generated by an AI agent, not by the site owner. It may be incomplete or inaccurate.
POST
https://api.moonshot.cn/v1/chat/completionsChat completion
Parameters
modelmoonshot-v1-8k|moonshot-v1-32k|moonshot-v1-128k (stringrequiredmessagesconversation array (arrayrequiredmax_tokensmax tokens (integeroptionaltemperature0-1 (numberoptionalReturns
choices[] with message.content, usage with prompt_tokens, completion_tokensGET
https://api.moonshot.cn/v1/modelsList available models
Returns
data[] with id, object, created, owned_byPOST
https://api.moonshot.cn/v1/tokenizers/estimate-token-countCount tokens
Parameters
modelmodel ID (stringrequiredmessagesmessages to count (arrayrequiredReturns
data with total_tokens