API · Models
Text

Kimi K2.7 Code

MoonshotAI Kimi K2.7 Code is a multimodal Mixture-of-Experts model (activates ~32B of ~1T parameters) optimized for agentic coding, long-context reasoning, and tool use. It supports text and image inputs, always operates in thinking mode, and offers a 256K context window.

ReasoningToolscoding
Context 262.1K·Max out 65.5K

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.7-code'),
  prompt: 'Why is the sky blue?',
});

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

Specs & pricing

Input $/M
0.95
Output $/M
4
Context window
262.1K
Max output
65.5K
Supported parameters
tool-usereasoningstreamingjson-mode

Related models

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