1 min read
You can now access Kimi K2 0905, a new model from Moonshot AI focused on agentic coding with a 256K context window, using Vercel AI Gateway with no other provider accounts required.
AI Gateway lets you call the model with a consistent unified API and just a single string update, track usage and cost, and configure performance optimizations, retries, and failover for higher than provider-average uptime.
To use it with the AI SDK v5, start by installing the package:
pnpm i ai
Then set the model to moonshotai/kimi-k2-0905
:
import { streamText } from 'ai'
const result = streamText({ model: 'moonshotai/kimi-k2-0905', prompt: 'How is a trillion parameter oss model possible?'})
Includes built-in observability, Bring Your Own Key support, and intelligent provider routing with automatic retries.
To deliver high performance to Kimi K2, AI Gateway leverages multiple model providers under the hood, including direct to Moonshot AI, Groq, and Fireworks AI.
Learn more about AI Gateway.