Moonshot AI logo
Moonshot AI
Deep Reasoning Open Source

Kimi K2 Thinking

Moonshot AI's reasoning-enhanced model with interleaved thinking and tool-use capabilities, excelling at complex reasoning and agentic tasks

Category Text Model ID kimi-k2-thinking
Context Length256K tokens
Model TypeReasoning-Enhanced MoE Model
Total Parameters1 Trillion

Pricing & Specs

💰 Pricing

Input$4 / M tokens
Output$16 / M tokens
Cached$1 / M tokens

⚙️ Specs

Context Length256K tokens
Model TypeReasoning-Enhanced MoE Model
Total Parameters1 Trillion
Active Parameters32 Billion
Special CapabilitiesInterleaved Thinking & Tool-Use

API Examples

Python

from openai import OpenAI

client = OpenAI(
    base_url="https://api.xairouter.com/v1",
    api_key="your-api-key"
)

response = client.chat.completions.create(
    model="kimi-k2-thinking",
    messages=[
        {"role": "user", "content": "Hello!"}
    ]
)

print(response.choices[0].message.content)

cURL

curl https://api.xairouter.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "kimi-k2-thinking",
    "messages": [
      {"role": "user", "content": "Hello!"}
    ]
  }'