Skip to content

How to use the Kimi K3.1 Pro API: key, snippets, and unlimited access

Kimi K3.1 Pro is live on CheapestInference: Moonshot’s new flagship — scoring 55 on the Artificial Analysis Intelligence Index (v4.3.2), #4 of every model AA tracks, 3 points off the leader (Claude Opus 5.5, 58) and one behind Claude Sonnet 5.5 at the same list price — served in the Flagship Pool next to Qwen3.8 Max (it replaced Kimi K3 in place on November 6, 2026), through an OpenAI- and Anthropic-compatible API with no token caps at a flat monthly price, from $199/mo (live availability — seats are very limited). This is the practical guide: get access, call it, understand its reasoning settings, wire it into your coding agent.

Two realistic routes to K3.1 Pro over an API today:

  1. Per-token — Moonshot’s list price is $2.00 per 1M input tokens ($0.20 cached) and $10.00 per 1M output. Ideal for evaluation and light use; it adds up fast for agent workloads, especially with reasoning on.
  2. Time-block subscription (this guide) — reserve one or more daily 8-hour blocks on the Flagship Pool and use K3.1 Pro with no token caps during your hours. From $199/mo per block ($169.15/mo billed annually); all three blocks = 24/7. The same subscription also serves Qwen3.8 Max, and existing kimi-k3 setups keep working until December 7, 2026.

For the subscription route: create an account, subscribe to the Flagship Pool, and mint an API key at cheapestinference.com/keys. Model id: kimi-k3.1-pro.

curl:

Terminal window
curl https://api.cheapestinference.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "kimi-k3.1-pro", "reasoning_effort": "low", "max_tokens": 8192, "messages": [{"role": "user", "content": "Hello"}]}'

OpenAI SDK (Python):

from openai import OpenAI
client = OpenAI(
base_url="https://api.cheapestinference.com/v1",
api_key="sk-...", # your subscriber key
)
response = client.chat.completions.create(
model="kimi-k3.1-pro",
reasoning_effort="low", # low / high / max — omit for a direct answer with no reasoning
max_tokens=16000, # leave room for the reasoning when it is on
messages=[{"role": "user", "content": "Refactor this function..."}],
)
print(response.choices[0].message.content)

Anthropic SDK (Python) — the same key works on the Anthropic Messages endpoint:

import anthropic
client = anthropic.Anthropic(
base_url="https://api.cheapestinference.com/anthropic",
api_key="sk-...", # your subscriber key
)
message = client.messages.create(
model="kimi-k3.1-pro",
max_tokens=16000,
messages=[{"role": "user", "content": "Review this diff..."}],
)
print(message.content[-1].text)

Input is text and image — images as base64 data URLs in OpenAI-style image_url parts or Anthropic base64 image blocks; public http(s) image URLs are not accepted by this model, so download and inline the image (Qwen3.8 Max, in the same pool, takes both). The served context window is 1M tokens (1,048,576), with a maximum request size of 8 MB.

Reasoning works exactly as it did on Kimi K3, so existing K3 integrations carry over unchanged:

  • Off unless you ask. With nothing set (or "reasoning_effort": "none") the model answers directly, with no reasoning tokens. Turn it on per request with "thinking": {"type": "enabled"} or with reasoning_effort. (Moonshot’s own API documents K3.1 Pro as always reasoning; here the default is off, as it was for K3.)
  • reasoning_effort sets how much it thinks: low, high or max. Enabled without an effort it runs at max — the setting behind its benchmark scores. For interactive use (chat, code completion, quick edits) we recommend low: noticeably faster, and still the same model.
  • Give it a generous max_tokens. Reasoning tokens count toward the output budget, and K3.1 Pro is verbose by measurement — a tight cap truncates the answer mid-thought. Stream (stream: true) for responsive UIs.
  • Sampling parameters are fixed. temperature, top_p, presence_penalty and frequency_penalty are ignored if you send them, so existing client configs keep working unchanged.

Details: Reasoning · Kimi K3.1 Pro API docs.

The API speaks the Anthropic Messages format, so Claude Code works out of the box:

Terminal window
export ANTHROPIC_BASE_URL="https://api.cheapestinference.com/anthropic"
export ANTHROPIC_AUTH_TOKEN="sk-..." # your subscriber key
export ANTHROPIC_MODEL="kimi-k3.1-pro"
export ANTHROPIC_SMALL_FAST_MODEL="kimi-k3.1-pro"

Start claude as usual — every request now runs on K3.1 Pro with no per-token meter. Pointing the small/fast model at Kimi K3 (same pool, same key) keeps Claude Code’s background calls quick, since K3 can answer without reasoning. The same key works in OpenCode, Cline, Roo Code, Continue, and any client that accepts a custom OpenAI base URL — use https://api.cheapestinference.com/v1 and model kimi-k3.1-pro (Claude Code guide · OpenCode, Roo Code, Aider · Cline).

At list price, a coding agent that burns 100M tokens a month on K3.1 Pro costs roughly $150–300 per-token, depending on your cache-hit and output mix — and with reasoning on at max the output share climbs: Artificial Analysis measured 150M output tokens to run its index on K3.1 Pro, against a median of 87M. Light or cache-heavy users can come in under $199, and for them per-token is the cheaper route. Heavy agentic users go far beyond 100M. A Flagship block at $199/mo ($169.15/mo annual) covers your working day; all three blocks cover 24/7. The trade-offs: during your reserved hours there are no token caps, each subscription runs one request at a time (fair use), and outside your blocks the key doesn’t serve. Full pricing detail: Plans & Limits · Kimi K3.1 Pro API docs · the full analysis: specs, benchmarks, license.

Seats on the Flagship Pool are very limited — when a block sells out it’s gone until someone leaves. Check live availability →


CheapestInference serves Kimi K3.1 Pro and Qwen3.8 Max (Flagship Pool), GLM 5.3 and MiniMax M3 (Frontier Pool) and DeepSeek V4.1 Flash and MiMo V2.6 Flash (Core Pool) through one OpenAI- and Anthropic-compatible API on time-block subscriptions with no token caps. See the pools or get started.