AI Gateway

Kimi K2

moonshotai/kimi-k2

Kimi K2 is a large-scale Mixture-of-Experts (MoE) language model developed by Moonshot AI, featuring 1 trillion total parameters with 32 billion active per forward pass. It is optimized for agentic capabilities, including advanced tool use, reasoning, and code synthesis. Kimi K2 excels across a broad range of benchmarks, particularly in coding (LiveCodeBench, SWE-bench), reasoning (ZebraLogic, GPQA), and tool-use (Tau2, AceBench) tasks.

index.ts
import { streamText } from 'ai'
const result = streamText({
model: 'moonshotai/kimi-k2',
prompt: 'Why is the sky blue?'
})