Kimi K2.7 Code HighSpeed API

moonshot/kimi-k2-7-code-highspeed
Kimi K2.7 Code HighSpeed is a high-performance AI coding model built for professional developers.
Context
256K tokens
Input
$2.47 / 1M tokens
Output
$10.4 / 1M tokens
Released
Jun 22, 2026

How to use Kimi K2.7 Code HighSpeed API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to moonshot/kimi-k2-7-code-highspeed.
import requests

r = requests.post(
    "https://api.aimlapi.com/v1/chat/completions",
    headers={"Authorization": "Bearer " + AIMLAPI_KEY},
    json={
      "model": "moonshot/kimi-k2-7-code-highspeed",
      "messages": [
        {
          "role": "user",
          "content": "Hello!"
        }
      ]
    },
)
print(r.json())
const r = await fetch("https://api.aimlapi.com/v1/chat/completions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "model": "moonshot/kimi-k2-7-code-highspeed",
    "messages": [
      {
        "role": "user",
        "content": "Hello!"
      }
    ]
  }),
});
console.log(await r.json());
curl -X POST https://api.aimlapi.com/v1/chat/completions \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"moonshot/kimi-k2-7-code-highspeed","messages":[{"role":"user","content":"Hello!"}]}'

OpenAI-compatible — swap the base URL and it works with your existing SDK.

Kimi K2.7 Code HighSpeed API Pricing

TypePrice
Input
$2.47 / 1M tokens
Output
$10.4 / 1M tokens
Cached input
$0.494 / 1M tokens

Kimi K2.7 Code HighSpeed vs other models

ModelInputOutputContextBest for
$2.47 / 1M tokens
$10.4 / 1M tokens
256K tokens
Coding + agents
$6.5 / 1M tokens
$39 / 1M tokens
1M tokens
Reasoning + agents
$2.6 / 1M tokens
$13 / 1M tokens
1M tokens
Balanced coding + agents
$3.9 / 1M tokens
$19.5 / 1M tokens
1M tokens
Long-context, multimodal & agentic workflows
$1.95 / 1M tokens
$11.7 / 1M tokens
1M tokens
Reasoning + agents

Frequently asked questions

Kimi K2.7 Code HighSpeed has a 262,144 tokens context window and can return up to 260,000 tokens.

Kimi K2.7 Code HighSpeed takes text as input and returns text.

Use moonshot/kimi-k2-7-code-highspeed as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.

Kimi K2.7 Code HighSpeed is priced at input $2.47 / 1M tokens, output $10.4 / 1M tokens, cached input $0.494 / 1M tokens.

Yes, Kimi K2.7 Code HighSpeed can stream responses as they are generated.

Kimi K2.7 Code HighSpeed was built by Moonshot AI.

Start building with Kimi K2.7 Code HighSpeed

Get API Key
1000+ models, one API.