
Kimi K2.7 Code is Moonshot's trillion-parameter agentic coding model with 256K context, always-on reasoning, and text, image, and video inputs.
Kimi K2.7 Code is Moonshot's trillion-parameter agentic coding model with 256K context, always-on reasoning, and text, image, and video inputs.
Supports text, image, and video inputs, function calling, JSON mode structured output, and built-in web search billed at $0.015 per invoked call. Thinking is always on and reasoning tokens are billed as output tokens. Temperature and other sampling overrides are ignored because the model service uses fixed sampling settings. Multi-step function calling must replay the assistant message with its reasoning_content field intact. Explicit cache controls, batches, and fine-tuning are not supported.
kimi-k2-7-codePOST /v1/chat/completionsPOST /v1/responsesPOST /v1/messagesLive pay-as-you-go rates from the EmpirioLabs catalog. You are billed only for what you use, with no monthly minimum.
Kimi K2.7 Code serves the OpenAI-compatible Chat Completions API. Point any OpenAI SDK at https://api.empiriolabs.ai/v1 with your EmpirioLabs API key and use the model id kimi-k2-7-code. Get an API key from the EmpirioLabs dashboard.
curl https://api.empiriolabs.ai/v1/chat/completions \
-H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kimi-k2-7-code",
"messages": [
{"role": "user", "content": "Write a haiku about the ocean."}
]
}'from openai import OpenAI
client = OpenAI(
base_url="https://api.empiriolabs.ai/v1",
api_key="YOUR_EMPIRIOLABS_API_KEY",
)
response = client.chat.completions.create(
model="kimi-k2-7-code",
messages=[{"role": "user", "content": "Write a haiku about the ocean."}],
)
print(response.choices[0].message.content)Request parameters supported by the Kimi K2.7 Code API on EmpirioLabs. Defaults apply when a field is omitted.
| Parameter | Type | Default | Range / values | Description |
|---|---|---|---|---|
| max_tokens | number | 16384 | 1 to 131072 | Maximum output tokens. Reasoning tokens count toward this limit. |
| stop | string | - | - | Up to 4 strings where the model will stop generating further tokens. |
| response_format | object | - | - | OpenAI-compatible JSON mode or JSON schema response format. |
| tool_web_search | boolean | false | - | Search the web for real-time information. Adds $0.015 to the request cost for each invoked web search call. |
Supports text, image, and video inputs with 256K context, function calling, JSON mode structured output, and built-in web search at $0.015 per invoked call. Thinking is always on and cannot be disabled; reasoning tokens are billed as output tokens. Temperature and other sampling overrides are ignored because the model service uses fixed sampling settings. Multi-step function calling through the API must replay the assistant message with its reasoning_content field intact.
On EmpirioLabs, Kimi K2.7 Code is billed pay as you go: Input $0.95 per 1M prompt tokens; Output $4.00 per 1M generated tokens; Web search $0.015 per call when invoked. The live rate card on this page always matches what the API charges.
Kimi K2.7 Code supports a 256K-token context window with up to 131,072 output tokens per response.
Yes. Kimi K2.7 Code serves the OpenAI-compatible Chat Completions API, so existing OpenAI SDKs work by pointing base_url at https://api.empiriolabs.ai/v1 and setting the model id to kimi-k2-7-code.
Yes. The EmpirioLabs playground runs Kimi K2.7 Code in the browser with the same parameters the API exposes, so you can test prompts before writing code.
Create an EmpirioLabs account, then generate a key under API Keys in the dashboard. Billing is pay-as-you-go credits, so you only pay for the requests you make.
Explore our models, or contact us about business inquiries, custom deployments, or anything else.