- Kimi K2.7 Code 是 Kimi 迄今最智能的 Coding 模型,在长上下文中更可靠地遵循指令,能以更高的成功率完成编程任务。同时支持文本、图片与视频输入,仅支持思考模式,对话与 Agent 任务 - 模型上下文长度 256k,支持长思考擅长深度推理 - 支持自动上下文缓存功能,ToolCalls、JSON Mode、Partial Mode 等能力
from openai import OpenAI
client = OpenAI(
base_url="https://api.openroute.cn/v1",
api_key="<ONTOROUTE_API_KEY>",
)
completion = client.chat.completions.create(
model="kimi-k2.7-code",
messages=[
{
"role": "user",
"content": "Write a one-sentence bedtime story about a unicorn.",
}
],
)
print(completion.choices[0].message.content)Prices are CNY (¥) per million tokens, billed as you go. Cache reads can cut the cost of repeated context.
| Provider | Max Input | Max Output | Context length | Tool Calling |
|---|---|---|---|---|
moonshot moonshot/kimi-k2.7-code | 128K | 128K | 262K | Supported |
This model does not publish tunable parameters.