Models / Moonshot AI

Kimi K2.7 Code API pricing

$0.426 in, $2.10 out per million tokens, 55% under Moonshot AI's list price on input and 47% on output.

kimi-k2.7-codemanaged routeOpenAI SDK

Price · per million tokens, USD

TokensMoonshot AI list priceUplinkSwitchSaving
Input$0.95$0.426-55%
Cached input$0.19$0.09-52%
Output$4.00$2.10-47%
List price: Moonshot AI's published rate, read October 2026. Same price on every host.

Kimi K2.7 Code specs

Context window
262,144 tokens
Max output
262,144 tokens
Input
text, image and video
Released
June 2026

Kimi K2.7 Code API · base URL and key

Python · OpenAI SDK
from openai import OpenAI

client = OpenAI(
    base_url="https://api.uplinkswitch.com/v1",
    api_key="sk-uplink-live-...",
)

completion = client.chat.completions.create(
    model="kimi-k2.7-code",
    messages=[{"role": "user", "content": "Summarize this in one line."}],
)
print(completion.choices[0].message.content)
TypeScript · OpenAI SDK
import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://api.uplinkswitch.com/v1',
  apiKey: 'sk-uplink-live-...',
});

const completion = await client.chat.completions.create({
  model: 'kimi-k2.7-code',
  messages: [{ role: 'user', content: 'Summarize this in one line.' }],
});
console.log(completion.choices[0].message.content);
curl
curl https://api.uplinkswitch.com/v1/chat/completions \
  -H "authorization: Bearer sk-uplink-live-..." \
  -H "content-type: application/json" \
  -d '{"model":"kimi-k2.7-code","messages":[{"role":"user","content":"Hello"}]}'

What would it cost? · paste a prompt, priced before you send it

Input is counted at about 4 characters per token.

Cheapest first. A real request is billed on the provider's own token count. Same estimate as JSON: POST https://api.uplinkswitch.com/v1/estimate, no key needed.

Kimi K2.7 Code questions

How much does the Kimi K2.7 Code API cost?
$0.426 per million input tokens and $2.10 per million output tokens, with cached input at $0.09. Moonshot AI's list price is $0.95 and $4.00, so this is 55% under Moonshot AI's list price on input and 47% on output.
Is Kimi K2.7 Code free?
It is pay as you go: prepaid credit from $10, with no subscription or monthly fee, billed per token. A 1,000-token prompt with a 500-token reply costs about $0.0015.
What is the Kimi K2.7 Code context window?
Kimi K2.7 Code has a 262,144-token context window, with up to 262,144 output tokens per request. It takes text, image and video input.
What is the Kimi K2.7 Code model id?
kimi-k2.7-code. Send it as the model through the OpenAI SDK with base URL https://api.uplinkswitch.com/v1.
Is it the real Kimi K2.7 Code?
Every day each model gets the same test prompt, and a model always counts that prompt the same way; a swapped one would not. Kimi K2.7 Code's latest result: Same fingerprint since Oct 19.