基础 URL、请求方法和必需请求头均按当前模型的协议模板渲染。

Kimi K2.7 Code
Coding-focused variant in the Kimi K2 family. Accepts text and image inputs, with reasoning on by default. Suited for long-horizon coding and agentic workflows.
价格
| 规格 | 价格 |
|---|---|
| 输入 | $0.95/ M tokens |
| 输出 | $4/ M tokens |
| 缓存读 | $0.19/ M tokens |
| 缓存写 | $1.1174/ M tokens |
快速开始
可直接粘贴运行下方示例代码。Gate.AI API 与 OpenAI 兼容,多数 SDK 只需替换 base URL;切换模型时,只需修改模型 ID。
Get your API key
Sign in to the Gate.AI console and create a new key under "API Keys". Keep it safe and send it via the Authorization header on every request.
前往控制台创建密钥Make a request
Send a POST request to the Chat Completions endpoint with a model ID and an array of messages to get a reply.
curl --location "https://api.gate.ai/openai/v1/chat/completions" \
--header "Authorization: Bearer {API_KEY}" \
--header "Content-Type: application/json" \
--data '{
"model": "kimi-k2.7-code",
"messages": [
{"role": "user", "content": "Hello"}
]
}'Handle the response \\\\\& streaming
By default a full JSON response is returned. Add "stream": true to the request body to receive incremental chunks over SSE.
curl --no-buffer --location "https://api.gate.ai/openai/v1/chat/completions" \
--header "Authorization: Bearer {API_KEY}" \
--header "Content-Type: application/json" \
--data '{
"model": "kimi-k2.7-code",
"messages": [
{"role": "user", "content": "Hello"}
],
"stream": true
}'端点
相关模型
Kimi K3.1 ProSuccessor to K3 and flagship open-weight multimodal reasoning model for long-horizon coding and agentic knowledge work, with native image and video understanding.
Kimi K3A multimodal reasoning model for complex coding, knowledge work, and long-running agent tasks. It works across large codebases, calls tools, and debugs, using images, logs, and test output to refine its output.
Kimi K2.6Latest multimodal model in the K2 series, built for long-horizon coding, code-driven UI/UX generation, and multi-agent orchestration.
Kimi K2.5顶级中英双语模型,强大的长上下文能力。
Kimi K2 ThinkingOpen-source thinking model built for long-horizon reasoning and hundreds of sequential tool calls across autonomous research, coding, and agent workflows.
Kimi K2 InstructInstruction-tuned for agent workflows with reliable tool calling and multilingual coding.