All models

Kimi K2.7 Code

Launched on IteraCompute

Online

Moonshot AI

moonshotai/kimi-k2.7-code
Tool Calling
SupportedTool calling · Supported · Default configuration reference; not live verification
Reasoning
SupportedReasoning · Supported · Default configuration reference; not live verification
Vision
UnsupportedVision · Unsupported · Default configuration reference; not live verification
Streaming
SupportedStreaming · Supported · Default configuration reference; not live verification
JSON mode
SupportedJSON mode · Supported · Default configuration reference; not live verification

USD / 1M tokens

Input
$0.69
Cache Read
$0.15
Cache Write
—
Output
$3.29
Context
256K
Max Output
256K
Precision
Official precision
Price checked

Overview

Text input, streaming, reasoning, tool calling and structured outputs; up to 256K output tokens.

API protocols and integration

Base URL · OpenAI SDK
https://api.iteracompute.com/v1
Authentication
Authorization: Bearer ITERACOMPUTE_API_KEY

Choose request fields, response parsing and stream completion by endpoint. This table describes wire formats; see this model's capabilities and verification scope.

Customer endpointModel statusInput / output budgetResultSSE completion
OpenAI Chat Completions
POST /v1/chat/completions
Declared for this modelmessages
max_tokens
choices[0].message.content[DONE]
OpenAI Responses
POST /v1/responses
Declared for this modelinput
max_output_tokens
output[] (SDK: output_text)response.completed
Anthropic Messages
POST /v1/messages
Declared for this modelmessages; system (top-level)
max_tokens (required)
content[]message_stop

For the Messages SDK use https://api.iteracompute.com as base URL; max_tokens is required. Do not reuse another protocol's fields.

View docs
LLMs.txt · Copy for an AI coding assistant

Includes this model's ID, wire formats and parameter constraints. Check this page's verification scope and current prices before use.

LLMs.txt
# IteraCompute · moonshotai/kimi-k2.7-code

Model ID: moonshotai/kimi-k2.7-code
Base URL (OpenAI SDK): https://api.iteracompute.com/v1
Authentication: Authorization: Bearer ITERACOMPUTE_API_KEY
Content-Type: application/json

Use only the customer endpoints below. Request and response formats differ by protocol. An endpoint declaration does not certify every capability.

## Chat Completions
POST https://api.iteracompute.com/v1/chat/completions
Input: messages
Output budget: max_tokens
Read result: choices[0].message.content
SSE completion: [DONE]
Docs: https://iteracompute.com/docs.html#api-reference

## Responses
POST https://api.iteracompute.com/v1/responses
Input: input
Output budget: max_output_tokens
Read result: output[] (SDK: output_text)
SSE completion: response.completed
Docs: https://iteracompute.com/docs.html#responses-api

## Messages
POST https://api.iteracompute.com/v1/messages
Input: messages; system (top-level)
Output budget: max_tokens (required)
Read result: content[]
SSE completion: message_stop
Docs: https://iteracompute.com/docs.html#anthropic-messages

## Parameters
Configuration and parameter acceptance do not establish semantic capability. Do not invent undisclosed defaults.
Current parameter configuration is unconfirmed. Check the model page and current catalog before calling.

## References
Model catalog: https://iteracompute.com/models/
Current prices and billing: https://iteracompute.com/pricing/
Documentation index: https://iteracompute.com/llms.txt
Unknown prices are not zero. Account and subscription limits also apply.
Never include a real API key in an LLM prompt or client-side code.

Open plain text

Text models expose Chat Completions, Responses and Messages. Use each protocol’s native fields and this model’s verified capabilities and limits.

Use the parameters and verification evidence published for this exact model. A supplier documentation review does not certify every feature on the gateway.

API parameters

These parameters and ranges come from the model’s existing default configuration, not live verification of the current route. Published configuration takes precedence.

Tool calling
Supported
Reasoning
Supported
Vision
Unsupported
Streaming
Supported
JSON mode
Supported

Parameters and values

Click a parameter to copy its name; scroll the table horizontally to see all columns. Usage notes identify protocol differences; identical names do not guarantee cross-endpoint support.

ParameterTypeAcceptanceRangeUsage / protocol
integerReference: supported[1, 262144]Output token budget; includes reasoning where applicable. Chat Completions / Messages.
integerReference: supported[1, 262144]Alternative Chat output budget; use only when accepted by this model.
integerReference: supported[1, 262144]Responses output budget. Chat acceptance must be checked separately.
enumReference: supported[1]Sampling randomness. An accepted but ignored value does not control generation.
enumReference: supported[0.95]Nucleus sampling probability threshold.
enumReference: supported[0]Penalize tokens already present in the generated text.
enumReference: supported[0]Penalize repeated tokens according to frequency.
enumReference: supported[1]Number of completions; many routes accept only 1.
booleanReference: supported—Enable SSE streaming; completion markers depend on the protocol.
arrayReference: supported—Tool definitions; the application executes tool calls and returns results.
anyReference: supported—Choose whether and which tool to call; allowed shapes vary by protocol.
objectReference: supported—Text: Chat output format. Images: b64_json only; not text JSON mode.
anyReference: supported—Reasoning control; object or boolean depends on the model and protocol.

Reference request (applicability unverified)

POST /v1/chat/completions

Chat Completions request
{
  "model": "moonshotai/kimi-k2.7-code",
  "messages": [
    {
      "role": "user",
      "content": "Reply OK"
    }
  ],
  "max_tokens": 256
}

Parameter revision:eba2cbfd8719

Technical reference (current configuration takes precedence)

API parameters

Click a parameter to copy its name.

ParametersUsage
text → text
256K
Kimi K3 and K2.7 Code fix temperature=1, top_p=0.95, n=1 and both penalties=0. Omit these fields instead of tuning them.
Reasoning stays enabled. Preserve complete assistant messages, including reasoning_content and tool_calls, across tool turns.
Define functions in tools and use tool_choice=auto. Execute tool_calls in your application, then return role=tool with the matching tool_call_id.
Use response_format={"type":"json_object"} and request JSON in the prompt. Validate the returned JSON and required fields in your application.
stream=true, stream_options={"include_usage":true}

Input and requested output share the context budget. Reasoning tokens count toward output usage.

Raw HTTP request body
{
  "model": "moonshotai/kimi-k2.7-code",
  "messages": [
    {
      "role": "user",
      "content": "Hello!"
    }
  ],
  "max_tokens": 512,
  "stream": true,
  "stream_options": {
    "include_usage": true
  }
}
Python SDK example
from openai import OpenAI

client = OpenAI(
    api_key="ITERACOMPUTE_API_KEY",
    base_url="https://api.iteracompute.com/v1",
)
stream = client.chat.completions.create(
    model='moonshotai/kimi-k2.7-code',
    messages=[{'role': 'user', 'content': 'Hello!'}],
    max_tokens=512,
    stream=True,
    stream_options={'include_usage': True},
)
for chunk in stream:
    print(chunk.model_dump_json(exclude_none=True))

SDK extra_body merges its entries into the HTTP body. When the raw request itself contains an extra_body object, preserve that object as nested extra_body in the SDK example.

Response fields and tool results

Final text; concatenate streamed fragments.
Optional reasoning text. Preserve it in assistant history when required; its absence does not prove thinking was disabled.
Parse arguments as JSON, execute the function, and return role=tool with the original call ID.
Check final usage and the stream terminal. length means truncation; HTTP 200 alone is not successful completion.
Read the error code and message. For rate limits, honor Retry-After and avoid parallel retries.

Parameter reference

Parameter usage

  • Kimi K2.7 Code always thinks. Omit thinking, or use enabled with keep=all. Effort levels and tool_choice=required are unsupported.

Interface reference checked: 2026-10-23

Checked parameter constraints

ParametersUsage
Chat uses max_tokens or max_completion_tokens; Responses uses max_output_tokens. Use positive integers within Gateway limits.
Kimi K3 and K2.7 Code fix temperature=1, top_p=0.95, n=1 and both penalties=0. Omit these fields instead of tuning them.
Kimi K2.7 Code always thinks. Omit thinking, or use enabled with keep=all. Effort levels and tool_choice=required are unsupported.

2026-10-26

API

Current parameter configuration is unconfirmed; the historical example below has not been verified against the current configuration.

Historical example (applicability unverified)
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.iteracompute.com/v1",
    api_key=os.environ["ITERACOMPUTE_API_KEY"],
)
response = client.chat.completions.create(
    model='moonshotai/kimi-k2.7-code',
    messages=[{'role': 'user', 'content': 'Reply OK'}],
    max_tokens=256,
)
print(response.choices[0].message.content)

View Docs

Pricing

Current prices and availability are shown below. Missing prices do not mean free.

Input$0.69
Cache Read$0.15
Cache Write—
Output$3.29
Version / Model ID
moonshotai/kimi-k2.7-codeBackend revision: not disclosed
Context
256K
Precision
Official precision
Price checked
Verification scope and sources
View verification scope and sources

Use the parameters and verification evidence published for this exact model. A supplier documentation review does not certify every feature on the gateway.

Model developer documentation

Price source: Public Models API · Price and precision evidence are reviewed separately.

Cache-read rates require actual cache hits. A missing rate (—) is unknown, not zero. See usage limits for account and Gateway context restrictions.

Cost calculator

USD · Estimate
Calculation mode
Advanced token usage

Input includes cache reads and writes; these portions must not overlap. Output already includes reasoning; enter reasoning as a subset, never add it twice. Count agent steps and retries as requests.

Estimated monthly cost

—USD

Kimi K2.7 Code

Cache hits and capacity are not guaranteed.

Cost breakdown
Uncached input
—
Cache read
—
Cache writes (5m + 1h)
—
Output (including reasoning)
—

Usage limits

  • Use the context and output limits shown above when configuring clients. Account limits also apply.
  • Start with one representative task. Check correctness, actual usage and response time before increasing traffic.

Tasks and selection tradeoffs

Agentic coding, repository-scale development and long-running software engineering workflows.

Choose your tool

Choose a model and tool for your task

FAQ

How do I use Kimi K2.7 Code with the OpenAI SDK?

Set base_url to https://api.iteracompute.com/v1 and model to moonshotai/kimi-k2.7-code. Authenticate with your IteraCompute API key.

What does Kimi K2.7 Code cost?

See the pricing section for current input, cached-input and output rates in USD per 1M tokens. Check the refresh time before use.

What context length is available?

See the summary above for the context and maximum output available through this API. Input and requested output share the context budget.

Ready for your first request?

Create your key, choose a tool and get a non-empty first reply.

New arrivals

Explore the models selected for New Arrivals, with API pricing, supported capabilities and integration guides.

View new arrivals
QwenNew

Qwen-Audio-3.1-Realtime-Plus

qwen/qwen-audio-3.1-realtime-plus

Stream audio and text over a real-time connection.

Launched on IteraCompute

Text input
$0.48
Audio input
$3.84
Text output
$3.84
Audio output
$14.40

USD per million tokens

QwenNew

Qwen3.8-Omni-Flash-Realtime

qwen/qwen3.8-omni-flash-realtime

Stream audio and text over a real-time connection.

Launched on IteraCompute

Text / image / video input
$0.23
Audio input
$0.93
Text output
$0.70
Audio output
$1.87

USD per million tokens

QwenNew

Qwen3.7-Plus

qwen/qwen3.7-plus

Qwen3.7-Plus returns text from text and visual input.

Launched on IteraCompute

Input
$0.384
Output
$1.536

USD / 1M tokens