Kimi API

Kimi API

Three Moonshot AI models, all on the standard Text API passthrough. Every model here answers on all four request formats the Text API supports.

ModelChoose it for
kimi-k3The flagship — a 1M-token context at one flat rate across the whole window
kimi-k2.7-codeThe coding specialist, at the same rate as the general K2.6
kimi-k2.6The general-purpose model of the previous generation

OpenAI Chat Completions

POST https://api.beatapi.io/v1/chat/completions

1import OpenAI from "openai";
2
3const client = new OpenAI({
4 apiKey: process.env.BEATAPI_API_KEY,
5 baseURL: "https://api.beatapi.io/v1"
6});
7
8const completion = await client.chat.completions.create({
9 model: "kimi-k3",
10 max_tokens: 2000,
11 messages: [
12 { role: "user", content: "Refactor this service to make its retry policy testable, and explain the seam you introduced." }
13 ]
14});
15
16console.log(completion.choices[0].message.content);
$curl --request POST \
> --url https://api.beatapi.io/v1/chat/completions \
> --header 'Authorization: Bearer <BEATAPI_API_KEY>' \
> --header 'Content-Type: application/json' \
> --data '{
> "model": "kimi-k3",
> "messages": [
> {
> "role": "user",
> "content": "Refactor this service to make its retry policy testable, and explain the seam you introduced."
> }
> ]
>}'

kimi-k2.6 bills a large fixed prompt overhead on every request, so a short conversational turn costs far more on it than its headline input rate suggests. For short-turn or high-frequency workloads, kimi-k2.7-code and kimi-k3 carry no such overhead and are cheaper in practice despite the higher listed rate.

K3 and K2.7 Code think by default; the reasoning budget appears under usage.completion_tokens_details.reasoning_tokens and bills as output.

Other SDK formats

The same models answer on /v1/responses, /v1/messages and the Gemini-compatible endpoint. The request and response shapes are identical for every text model, so they are documented once on the Text API page rather than repeated here.

Authentication and availability

One BeatAPI key reaches every model on this page — there is no per-vendor key, no per-vendor base URL, and no separate signup. Send Authorization: Bearer <BEATAPI_API_KEY> against https://api.beatapi.io.