The integration: OpenAI compatible means OpenAI pattern
import OpenAI from 'openai';
import { Weckr } from '@weckr/sdk';
const kimi = new OpenAI({
apiKey: process.env.MOONSHOT_API_KEY,
baseURL: 'https://api.moonshot.ai/v1',
});
const wk = new Weckr({ apiKey: process.env.WECKR_API_KEY!, plans: { free: 0, pro: 29 } });
const result = await wk.chat(kimi, {
model: 'kimi-k2.6',
messages,
userId: user.id,
feature: 'chat',
plan: user.plan,
});Costs are recomputed server side at Kimi’s rates, cached input priced at its discounted rate, per the methodology, and the rates themselves are public and weekly watched at pricing.json. Kimi rows land in the same per user margin view as your OpenAI, Anthropic, and Gemini traffic, one dashboard across providers.
Why cheap tokens change the mean, not the tail
Kimi’s pricing genuinely moves the average: k2.6 input costs a fraction of frontier rates, the comparison laid out in Kimi vs Claude vs GPT. But the users who break margins are not average users; they are the tail, the looping agent, the free tier scripter, the power user at a hundred times median volume. Those scale with usage, and usage is unbounded no matter the rate. The math that decides profitability stays the same: cost per user against revenue per user, which needs attribution regardless of which provider is billing you.
Enforcement along Kimi’s own family
- Caps: per plan monthly budgets checked before each call; block throws a catchable error, downgrade steps down inside the family, k3 to k2.6, k2.6 to k2.5, per the block or downgrade guide.
- Velocity:the runaway threshold (default 50,000 tokens per user in 5 minutes) watches Kimi calls like any other provider’s, per the detection flow.
- Mixed fleets: many teams run Kimi for cheap features and a frontier model for hard ones; per feature breakdown shows what each combination actually costs on your real traffic, the routing question from model routing.
FAQ
How do I track Kimi API costs per user?
Kimi’s API is OpenAI compatible, so the same two line pattern applies: point the OpenAI client at https://api.moonshot.ai/v1 with your Moonshot key, wrap calls with wk.chat() passing your user id, feature, and plan, and every call logs per user with cost recomputed server side at Kimi’s rates, cached input included. Same dashboard, same margin view, same caps as your OpenAI and Anthropic traffic.
What does the Kimi API cost?
As tracked in Weckr’s maintained price table: kimi-k2.6 at $0.95 per million input tokens and $4 per million output, with cached input at $0.16; kimi-k2.5 at $0.60 input and $3 output; the flagship kimi-k3 at $3 input and $15 output. Rates are watched weekly against published pricing and the live table is public at useweckr.com/pricing.json, so verify current numbers there.
Why does cheap per token still need per user tracking?
Because margin problems are distributional, not average. Cheap rates lower the mean cost per user, but the heavy tail, the one user running loops or scripting your free tier, scales with usage, not with price. A tenth the token price with a hundred times the usage is still a money losing user, and only per user attribution shows you which one.
Do spending caps and downgrades work with Kimi models?
Yes, identically: per plan monthly caps are checked before each call, blocking with a catchable error or downgrading along Kimi’s own family, k3 traffic stepping down to k2.6, and k2.6 down to k2.5. Velocity detection watches Kimi calls in the same per user stream as every other provider.
Can I compare my real Kimi costs against Claude or GPT?
That is what per feature model breakdown is for: run providers side by side on real traffic and the dashboard shows actual cost per feature per model, your traffic shape rather than benchmark arithmetic. For the list price comparison as a starting point, our Kimi vs Claude vs GPT article covers the rate sheets.
Keep reading
Every provider, one margin view
Kimi completes the set: OpenAI, Anthropic, Gemini, and Moonshot traffic, all attributed per user, priced at current rates, capped per plan, in one dashboard. Free for 50,000 requests a month, integration in about ten minutes, end state on the demo.