The Vercel AI SDK is the fastest way to ship a serious AI feature in TypeScript. And Kimi K3, Moonshot's open-weight model with a 1M-token context window, is not in its model catalog. So we wrote the missing piece: wallaby-ai-provider, a thin package that puts Kimi K3 anywhere the AI SDK runs. Install is one command:
npm install wallaby-ai-provider ai
export WALLABY_API_KEY=sk-your-wallaby-key
import { generateText } from 'ai';
import { wallaby } from 'wallaby-ai-provider';
const { text } = await generateText({ model: wallaby('kimi-k3'), prompt: 'Hello, world' });
That is all of it: the kimi-k3 model (1,048,576-token context, 131,072 max output) as a first-class AI SDK provider. generateText, streamText, agents, structured output, all of it. Pay per token, no subscription. Disclosure: Wallaby Token sells API access to Kimi K3, and the endpoint this package points at is ours.
What you need
- A Wallaby Token account: create one at wallabytoken.com and mint an API key in the console. New accounts get $0.50 in trial credit, enough for about 20 verification runs like the ones below. The "token" in our name is the LLM metering unit, not a crypto token.
- Node.js 18 or later, run
node --versionto check. - Two npm packages:
wallaby-ai-providerandai. Everything below was verified on October 13, 2026 with ai 7.0.138. The AI SDK moves fast — on a newer major version, check the package README first.
First run: does it actually talk back?
The hello-world script from above, run for real against the live gateway:
92 input tokens, 117 output tokens, one round-trip. Not a screenshot of our README — a real key, a real model, seconds ago. The usage object comes back on every call, so your own code can meter itself the same way.
Streaming, and the actual bill
Same model, streamText this time, asked what a 1M-token context buys a coding agent. The stream printed as it generated; the last line is the cost, computed at list rates from the usage object:
103 input tokens, 1,859 output tokens, $0.0254. The math: (103 × $2.70 + 1,859 × $13.50) ÷ 1,000,000. No estimate, no "starting at": that run, that bill.
import { streamText } from 'ai';
import { wallaby } from 'wallaby-ai-provider';
const result = streamText({
model: wallaby('kimi-k3'),
prompt: 'In three sentences: what does a 1M-token context window buy a coding agent?',
});
for await (const delta of result.textStream) process.stdout.write(delta);
// wait for the stream to finish, then read token usage
const usage = await result.usage;
In a Next.js app
Same provider, server side. Drop this in app/api/chat/route.ts:
import { streamText } from 'ai';
import { wallaby } from 'wallaby-ai-provider';
export async function POST(req: Request) {
const { messages } = await req.json();
const result = streamText({ model: wallaby('kimi-k3'), messages });
return result.toUIMessageStreamResponse();
}
One difference from the terminal: put the key in .env.local as WALLABY_API_KEY=sk-..., not in a shell export. Next.js loads it into process.env on the server, and the provider picks it up from there. It never ships to the browser — the key only exists inside this route handler.
401 on the first call — why?
WALLABY_API_KEY is not set where the process can read it. In a terminal script, that means the export never ran or ran in another window. In Next.js, it means the key is missing from .env.local, or the dev server was started before you added it; restart next dev after editing env files.
"model not found" — why?
The model ID is exactly kimi-k3. Not moonshotai/kimi-k3, not kimi-k3-turbo, not the display name. The provider passes the string through to the endpoint unchanged, and the endpoint only accepts the canonical ID.
Pricing
Per 1M tokens, our rates as of October 2026 (current rates always on the pricing page):
| Wallaby | Official list | |
|---|---|---|
| Input | $2.70 | $3.00 |
| Cached input | $0.27 | $0.30 |
| Output | $13.50 | $15.00 |
The $0.50 trial credit covers this entire guide about 20 times over.
What you built / Where to go next
You now have Kimi K3 as a first-class provider in the Vercel AI SDK: one npm package, two lines of code, streaming included, billing itemized per token in your own console.
- Deeper: Where to get Kimi K3: every access route compared if you are still deciding where the key should come from
- Sideways: Kimi K3 CLI setup: every terminal and coding tool that works, in one table if your tool is a terminal agent, not a TypeScript app
- Forward: create an account and mint your first key in two minutes


Top comments (0)