← All models
Online
Kimi K2.7 Code
Moonshot AI · OpenAI-compatible API
moonshotai/kimi-k2.7-codeUSD / 1M tokens
Input$0.69
Cached Input$0.15
Output$3.29
- Context
- 262K
- Tool Calling
- ✓
- Reasoning
- ✓
- Vision
- ✗
- Streaming
- ✓
OpenAI-compatible API
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": "Hello!"}],
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.iteracompute.com/v1",
apiKey: process.env.ITERACOMPUTE_API_KEY,
});
const response = await client.chat.completions.create({
model: "moonshotai/kimi-k2.7-code",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);curl https://api.iteracompute.com/v1/chat/completions \
-H "Authorization: Bearer $ITERACOMPUTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "moonshotai/kimi-k2.7-code",
"messages": [{"role": "user", "content": "Hello!"}]
}'Overview
Text input, streaming, reasoning, tool calling and structured outputs; up to 262,144 output tokens.
Pricing
Prices in USD per 1M tokens.
Input$0.69
Cached Input$0.15
Output$3.29
API
- Base URL
https://api.iteracompute.com/v1- Endpoint
POST /v1/chat/completions- Model ID
moonshotai/kimi-k2.7-code- Authentication
- Authorization: Bearer ITERACOMPUTE_API_KEY
Use Cases
Agentic coding, repository-scale development and long-running software engineering workflows.
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?
Input $0.69, cached input $0.15, output $3.29 per 1M tokens, in USD.
What context length is available?
262,144 tokens.