Kimi K3 for Coding: Cost, Benchmarks, and Tool Setup

Kimi K3 is a candidate for long coding runs, large repositories, and tasks that combine code with visual input. Choosing it from a leaderboard alone is risky: results depend on the harness, reasoning effort, endpoint, and task. Its always-on thinking can also make short loops slower and more expensive than expected.

Want to test the model with a controlled budget? Check the current model and price in the BetterToken catalog, create your own API key, and begin with one short task that has an objective pass condition. Catalog availability and prices can change, so record the values used for each run.

What Moonshot AI released

The official Kimi K3 repository describes a sparse MoE model with 2.8 trillion total parameters and 104 billion activated per token. It supports a 1,048,576-token context window, native text and image input, and thinking that remains enabled. The API exposes low, high, and max reasoning effort, with max as the documented default.

A large context window is capacity, not a guarantee that every token of a repository will be used well. A useful evaluation should check whether the agent finds the right files, respects scope, recovers after tool errors, and finishes within a budget.

Calculate API cost before the test

Moonshot's current Kimi K3 pricing lists $0.30 per million cache-hit input tokens, $3.00 per million cache-miss input tokens, and $15.00 per million output tokens, including reasoning.

For 200,000 uncached input tokens and 20,000 output tokens:

0.2 × $3.00 + 0.02 × $15.00 = $0.90.

If all 200,000 input tokens were cache hits, the same token shape would cost $0.36. Full cache reuse is a boundary case, not a forecast. Tool results, file changes, and conversation history often change the reusable prefix. Record cache hits, misses, output, and reasoning instead of estimating from the nominal context size.

Read coding benchmarks with their harness

Moonshot reports Kimi K3 scores including 88.3 on Terminal-Bench 2.1, 67.5 on DeepSWE, 77.8 on ProgramBench, 81.2 on FrontierSWE, 42.0 on SWE-Marathon, and 72.9 on Kimi Code Bench 2.0. These are vendor-reported results. The repository notes that Kimi K3 uses max reasoning effort and that some coding evaluations use the Kimi Code harness while competitors may use different published harnesses.

The useful comparison unit is:

model + harness + effort + endpoint + task.

A score does not tell you how many tokens the agent used, whether it stayed within the requested files, or how often a human had to redirect it.

Connect Kimi K3 to coding tools

Moonshot publishes separate official guides for Claude Code, Codex CLI, and OpenCode. Do not assume one configuration works unchanged in all three tools.

For Claude Code, the documented international Anthropic-compatible setup uses:

export ANTHROPIC_BASE_URL="https://api.moonshot.ai/anthropic"
export ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY"
export ANTHROPIC_MODEL="kimi-k3[1m]"

Restart the client, run /status, and confirm the effective Base URL and model. Do not commit the key or paste it into an issue.

Codex CLI uses the Responses API, while Kimi K3 exposes Chat Completions. Moonshot's guide uses CC Switch as a local router between those contracts. Treat that router as a separate trusted component: verify its source, update process, credential storage, and active route before allowing file changes.

For OpenCode, run opencode auth login, choose Moonshot AI, provide the key through the credential dialog, then use /models and /variants to select Kimi K3 and its effort. Start with a read-only task and verify model and usage in the provider dashboard.

Turn user reports into test cases

MoonshotAI/kimi-code issues #1911 and #2031 describe hangs, weak interruption, scope expansion, and unusually high input-token consumption in specific sessions. These reports are not an error rate for all users. They are reasons to test explicit file boundaries, iteration limits, cancellation, token accounting, and recovery after a failed tool call.

Prepare five representative tasks: a local bug, a multi-file change, a test addition, repository search, and one visual-input task. Freeze the commit, prompt, tools, timeout, and acceptance test. Record input, cache, output, reasoning, duration, manual interventions, and scope violations. The result will show whether Kimi K3 fits as a default agent, a model for hard tasks, or a fallback.

Sources

Related articles