API · Models
Text

Kimi K2 Instruct

Kimi K2 is a state-of-the-art mixture-of-experts (MoE) language model with 32 billion activated parameters and 1 trillion total parameters. Trained with the Muon optimizer, Kimi K2 achieves exceptional performance across frontier knowledge, reasoning, and coding tasks while being meticulously optimized for agentic capabilities.

Tools
Context 131.1K·Max out 131.1K

Quickstart

import { streamText } from 'ai';
import { createOpenAICompatible } from '@ai-sdk/openai-compatible';

const blackbox = createOpenAICompatible({
  name: 'blackbox',
  apiKey: process.env.BLACKBOX_API_KEY!,
  baseURL: 'https://api.blackbox.ai/v1',
});

const result = streamText({
  model: blackbox('blackboxai/moonshotai/kimi-k2'),
  prompt: 'Why is the sky blue?',
});

for await (const chunk of result.textStream) {
  process.stdout.write(chunk);
}

Specs & pricing

Input $/M
0.57
Output $/M
2.30
Context window
131.1K
Max output
131.1K
Supported parameters

Related models

ModelTypeContextInput $/M
Kimi K2.7 CodeText262.1K0.95
Kimi K2 ThinkingText216.1K0.47
Kimi K2.5Text262.1K0.6
Kimi K2.6Text262K0.95
Kimi K2.7 Code High SpeedText262.1K1.90