Kimi K3 on KeepRouter: working with a 1M-token context window

Published 2026-07-23 · KeepRouter

kimi-k3 is in the production catalog. Moonshot AI documents a 1,048,576-token context window for this model, which changes what fits in a single request: a large repository slice, a long document set, or an extended agent transcript. This article covers how to call it and how to reason about what that context size costs — from your own measured usage, not estimates.

Call it with the OpenAI SDK

from openai import OpenAI

client = OpenAI(base_url="https://keeprouter.com/v1", api_key="sk-kr-your-key")
r = client.chat.completions.create(
    model="kimi-k3",
    messages=[{"role": "user", "content": "Hello"}],
)
print(r.choices[0].message.content)

Or in Claude Code

Claude Code sends Anthropic Messages requests, and KeepRouter serves that format:

export ANTHROPIC_BASE_URL=https://keeprouter.com
export ANTHROPIC_AUTH_TOKEN=sk-kr-your-key

Run claude, then switch with /model kimi-k3. For environment details and limitations, see the Claude Code setup guide.

What a 1M-token window means for cost

A large context window does not change how billing works — it changes how large your input can get. Charges are always measured input tokens plus output tokens at the model's current rates, and at repository scale the input side usually dominates. Two practical consequences:

  • Send context deliberately. The window admitting a million tokens does not mean every request should carry them. Include what the task needs; the request log shows exactly what each request carried.
  • Check the cached-input rate. The kimi-k3 model page lists a cached-input rate alongside input and output. Repeated context (the same repository slice across turns) is where that rate matters.

This article deliberately records no prices: /models/kimi-k3 is the live source for current input, output, and cached-input rates, endpoint compatibility, and trial eligibility.

Measure before you commit

Run one representative long-context task, then read the request log: input tokens, output tokens, status, charge. That single measured request tells you more about your cost profile on kimi-k3 than any static comparison table.

Start

Sign up and create a key scoped to kimi-k3, or test the plumbing first with a free-scoped key and the quickstart. kimi-k3 requires prepaid credit unless your account currently lists it as trial-eligible.

← All posts · Models & pricing · Get an API key