Moonshot (Kimi)
Kimi models with long context, document analysis, function calling, vision, and web search.
Overview
Moonshot AI (月之暗面) builds the Kimi family of large language models, known for very long context windows and strong document understanding.
Official Website: https://www.moonshot.cn Documentation: https://platform.moonshot.ai/docs
Key features
- Long context — Very large context windows for long documents and conversations
- Document analysis — Understand PDFs, Word, and other formats
- Function calling — Tool use support
- Vision — Image understanding on supported models
- Web search — Built-in web search integration
- Thinking — Reasoning-capable models
- Bilingual — Excellent Chinese and English performance
Using Moonshot with Yunxin
Address Moonshot (Kimi) models with the moonshot/<model> prefix in the model field. You use the same Yunxin base URL (https://api.yuhuanstudio.com/v1) and your sk- API key — there is no separate Moonshot configuration on your side.
Capabilities vary by model. Query GET /v1/models to discover available models and what each one supports.
Usage example
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["YUNXIN_API_KEY"],
base_url="https://api.yuhuanstudio.com/v1"
)
response = client.chat.completions.create(
model="moonshot/model-id",
messages=[{"role": "user", "content": "你好!"}]
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.YUNXIN_API_KEY,
baseURL: "https://api.yuhuanstudio.com/v1",
});
const response = await client.chat.completions.create({
model: "moonshot/model-id",
messages: [{ role: "user", content: "你好!" }],
});
console.log(response.choices[0].message.content);curl https://api.yuhuanstudio.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $YUNXIN_API_KEY" \
-d '{
"model": "moonshot/model-id",
"messages": [{"role": "user", "content": "你好!"}]
}'Available models
Query the Models API for the current list and per-model capabilities:
curl "https://api.yuhuanstudio.com/v1/models?provider=moonshot" \
-H "Authorization: Bearer $YUNXIN_API_KEY"Capabilities and pricing are defined per model. Use GET /v1/models (and GET /v1/models/{model_id}) to discover the authoritative model list, supported features, and current rates.
Official resources
How is this guide?