Kimi K3: API integration, cache billing, and open-weight boundaries

K3’s hosted request and tool contract, cache TTL accounting, protocol usage differences, published weights and benchmark conditions.

By benchr Editorial Team · · · Changelog

Kimi K3: API integration, cache billing, and open-weight boundaries
A hosted request, a cache hit, and a local weight deployment are separate claims.

Kimi K3 has a hosted API and published open weights. Those are separate deployment choices with different access rules, operating costs and legal terms. Its current hosted guide supports always-on reasoning, large completion budgets and native visual input. The practical question is whether your request wrapper, tool loop and billing parser implement that contract correctly.

The hosted request is not the Kimi Code subscription

The hosted identifier is kimi-k3, using the documented https://api.moonshot.ai/v1 base URL. Access requires a successful account top-up; a Kimi Code membership is not a substitute for API balance. Code's product-level identifier and routing can also differ from this pay-as-you-go model.

K3 reasoning is always enabled. The current effort choices are low, high and max, with max as default. The hosted limits are 1,048,576 tokens of context, 1,048,576 tokens of maximum completion and 131,072 tokens of default completion. A permitted ceiling is not a sensible default budget for every task.

The guide fixes temperature, top-p, sample count and penalty settings. Omit incompatible controls rather than forwarding a generic sampling form. Text, image and video inputs use content arrays; the current image path accepts uploaded files or encoded data rather than a public image URL. Separate the answer's content from the reasoning field before applying a JSON parser.

A minimal server request, with its verification boundary

This Python example follows the current OpenAI-compatible quickstart. It requires the openai package, a server environment variable and an API account permitted to use K3. Its Python syntax is checked locally. No package call, paid request or response was executed; the printed text is not a fabricated output.

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["MOONSHOT_API_KEY"],
    base_url="https://api.moonshot.ai/v1",
    timeout=30.0,
    max_retries=0,
)
response = client.chat.completions.create(
    model="kimi-k3",
    messages=[{"role": "user", "content": "List the assumptions needed to estimate this API bill."}],
    max_completion_tokens=512,
    extra_body={"reasoning_effort": "low"},
)
print(response.choices[0].message.content)

A timeout limits how long the client waits; it is not a promise that the provider charges nothing after a disconnect. Handle authentication, quota, invalid-input and transient errors separately. Disable automatic repeats where a retry could duplicate a tool side effect, and log request identifiers without recording credentials or private prompts unnecessarily.

Preserve the tool conversation

The quickstart requires retaining the complete assistant message, including reasoning and tool calls, across a multi-step loop. Send a result for each returned tool-call identity. If a first-turn policy requires a tool, release that requirement for subsequent turns rather than forcing an endless tool loop. Dynamic tool definitions must remain present in the conversation when they are needed.

Authorize every action in application code. Treat tool responses and retrieved documents as untrusted content, validate arguments, and enforce time, cost and filesystem limits. The current K3 guide warns that its built-in web-search path is being updated and is not recommended for production use. A model's browsing benchmark does not override that hosted-tool restriction.

Input, cache reads and cache writes are disjoint charges

Global hosted API list rates per million tokens
CategoryRecorded rate
Ordinary input$3.00
Output$15.00
Cache read$0.30
Five-minute cache write$3.00
One-hour cache write$6.00

The caching guide says a write replaces its portion of ordinary input billing. Adding its write charge to the full input charge would double-count those tokens. A cache hit renews the TTL without another write charge; the selected TTL cannot be changed for an existing entry until it expires. Prefix matching, expiry and organization isolation still determine whether a hit occurs.

For a hypothetical one-million-token prefix, a five-minute write costs $3, a one-hour write $6, and a full-prefix hit $0.3. If two reuse gaps each exceed five minutes but stay within an hour, the short-TTL route needs repeated writes while the long-TTL route can reuse the prefix. This is deterministic rate arithmetic, not evidence that your traffic will hit the cache. New suffixes and output are additional work.

Normalize usage by protocol. Chat Completions and Responses totals include cache reads and writes within their reported input totals; the Messages-compatible API's ordinary input field excludes them. Add the Messages categories to obtain total input before passing a disjoint partition to a common calculator. In streaming mode, preserve the final usage event rather than estimating usage from rendered text.

Open weights change deployment, not the evidence standard

The publisher card lists 2.8T total and 104B active parameters. Active computation does not mean that only the active parameter count needs storage. Pin the artifact revision, quantization, serving engine and chat template before comparing a local deployment with the hosted API.

The custom Kimi K3 license includes notice requirements, a separate-agreement condition for qualifying Model-as-a-Service businesses, and a branding condition for certain large commercial services. It also defines exceptions and what counts as Model-as-a-Service. Read those definitions for your deployment; this article does not determine eligibility or equate the license with MIT or Apache.

The provider's benchmark footnotes use max effort, different harnesses and task-specific settings. Its DeepSWE result uses Kimi Code, while some comparator results use other harnesses. The SWE-Marathon notes describe recalibrated H20 tasks before the final benchmark release and fallback behavior for a comparator. These conditions matter more than a simple winner label. benchr has not loaded the weights or reproduced these evaluations.

Use held-out coding tests or source-span checks for extraction, record repairs and failures, and calculate cost per accepted result. Compare a hosted route only with alternatives that can meet the same modalities, tool permissions and output requirements. Request-level cost scenarios and local evidence review help organize that decision without turning a provider score into a benchr measurement.

Changelog

  • 2026-10-14 — Rebuilt the K3 reference around the hosted contract, syntax-checked server example, cache partitions and TTLs, custom artifact license and attributed evaluation conditions.
  • August 21, 2026 — Published after reviewing the official provider sources and recording unreported fields as gaps.

Sources and documentation review

Documentation review dates are recorded per source. No provider inference or independent benchmark replication was performed for this revision.

  1. Hosted request, limits and tool loop — read
  2. Current global hosted rates — read
  3. Cache writes, TTLs and protocol usage fields — read
  4. Publisher model card and evaluation footnotes — read
  5. Actual artifact license — read
  6. Historical launch scope — read