Kimi K3.1 Pro: Claude Code, Codex, Model IDs and Pricing

Try Kimi K3.1 Pro with the correct model ID, verify API access, and connect Claude Code or Codex without relying on the older K3 alias. Compare token prices and independent task-cost data, control reasoning effort, and distinguish Kimi Code membership from pay-as-you-go billing.

Contents
Kimi K3.1 Pro: Claude Code, Codex, Model IDs and Pricing

For a first Kimi K3.1 Pro coding trial, use the standard kimi-k3.1-pro API model, set reasoning explicitly, and verify a small request before connecting Claude Code or Codex. If you already have Kimi Code membership, try its separate k3.1-pro entry with /model first. Choose Highspeed after measuring whether shorter waits justify its higher charges.

Pricing and availability below are current as of 2026-10-24. The Claude Code and Codex recipes use the pay-as-you-go Kimi API; Kimi Code subscription access is covered separately.

What changed from Kimi K3?

K3.1 Pro is a post-trained version of K3, with more post-training compute and improvements aimed at tasks involving sustained reasoning and tool use. Moonshot reports 61.2% versus K3’s 55.95% on its internal Kimi Code Bench 3.0 Long-horizon evaluation. Treat that as a vendor result when choosing tasks to try, such as debugging across files or completing a feature through several edit-and-test cycles.

The 1,048,576-token context window is not new to this release: K3 already offered that capacity. The change for existing K3 API users is the combination of the new model, lower token rates, and its documented reasoning behavior. Context capacity is also separate from account rate limits and paid balance, as the Kimi pricing documentation explains.

Hosted access is available now. Moonshot’s release announcement schedules full model weights by 2026-11-04. Plan a hosted trial today; assess self-hosting after the weights and model-specific license terms are available.

Which model ID should you use?

Choose the ID for the service issuing your API key. Kimi’s paid API, Kimi Code membership, and OpenRouter use different namespaces and billing arrangements.

Access routeModel ID or client settingBilling
Kimi API, including Codex through that APIkimi-k3.1-pro or kimi-k3.1-pro-highspeedKimi API usage charges
Claude Code through the Kimi API, using the recipe belowkimi-k3.1-pro[1m]Kimi API usage charges
Kimi Code membershipk3.1-pro or k3.1-pro-highspeedSubscription quota
OpenRoutermoonshotai/kimi-k3.1-proOpenRouter API billing

The identifiers come from the Kimi API reference, Kimi Code model configuration, and OpenRouter model listing.

There is an important trap in Kimi’s current Claude Code guide: its settings still use kimi-k3[1m], although its verification request uses kimi-k3.1-pro.

Anthropic’s model configuration documentation explains that [1m] tells Claude Code to use a 1M context window and is stripped before the model ID reaches the provider. It does not turn kimi-k3 into kimi-k3.1-pro. The configuration below therefore explicitly names K3.1 Pro.

What are the current API prices?

Standard K3.1 Pro’s listed input, output, and cache rates are one third below K3’s. A completed task’s bill still depends on how many tokens the agent consumes.

These are USD per 1,000,000 tokens, using the default 5m cache-write tier, from the Kimi platform’s current model prices. Prices exclude applicable taxes.

ModelUncached inputCache write, 5mCache hitOutput
Kimi K3.1 Pro$2.00$2.00$0.20$10.00
Kimi K3.1 Pro Highspeed$4.00$4.00$0.20$20.00
Kimi K3$3.00$3.00$0.30$15.00

Cache reads, cache writes, and the remaining uncached input are mutually exclusive token categories. Do not charge the same input tokens at both the ordinary-input and cache-write rates. Kimi’s cache billing guide documents automatic caching, the default five-minute lifetime, and a separately priced 1h write tier.

For an illustrative estimate, assume a task accumulates:

  • 100,000 fresh input tokens, billed as ordinary input or 5m cache writes.
  • 500,000 cache-hit input tokens.
  • 20,000 total output tokens, including reasoning.

Standard K3.1 Pro costs:

(100,000 × $2.00 + 500,000 × $0.20 + 20,000 × $10.00) / 1,000,000 = $0.50

The same token counts cost $0.75 on K3 and $0.90 on Highspeed. These estimates exclude taxes and additional tool charges and assume no 1h cache writes. Highspeed does not double this particular bill because its cache-hit rate remains $0.20.

Independent task-cost evidence is already available. Artificial Analysis’s launch evaluation reports approximately 55K output tokens per Intelligence Index task, versus 48K for K3, and $1.98 per task, roughly equal to K3 in that evaluation. Its methodology weights costs across the benchmark mix. That figure is useful evidence about token consumption, not a forecast for fixing a bug in your repository.

Verify API access and set reasoning explicitly

Check your API account before debugging a coding tool’s configuration. The K3.1 Pro quickstart says access unlocks after a successful top-up of at least $1. This is an API access requirement, separate from Kimi Code membership.

The following commands use Bash on macOS or Linux, with curl and jq installed. Paste your Kimi API-platform key when read waits for input, then press Enter; the key is not displayed.

set -o pipefail
read -rs MOONSHOT_API_KEY && export MOONSHOT_API_KEY

curl --silent --show-error --fail-with-body \
  https://api.moonshot.ai/v1/chat/completions \
  --header "Authorization: Bearer $MOONSHOT_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "model": "kimi-k3.1-pro",
    "reasoning_effort": "low",
    "max_completion_tokens": 2048,
    "messages": [{"role": "user", "content": "Reply with exactly: KIMI_API_OK"}]
  }' | jq -e '
    if .error then error(.error | tostring)
    else {model, answer: .choices[0].message.content,
          finish_reason: .choices[0].finish_reason, usage}
    end
  '

A completed check should return model as kimi-k3.1-pro, the requested answer, finish_reason as stop, and actual usage. The Chat Completions reference documents these response fields.

If finish_reason is length, the generation reached its cap; increase max_completion_tokens and retry before diagnosing an authentication problem. A 401 calls for checking the key and endpoint pairing. If the model is unavailable to a new account, verify the successful top-up and exact ID first.

K3.1 Pro always reasons. The direct API’s reasoning guide accepts low, high, and max, with max as the default. The smoke test deliberately uses low; the coding-tool examples below choose high as an initial trial setting.

For custom integrations, the official API schema places that setting differently by protocol: Chat Completions uses reasoning_effort, Responses uses reasoning.effort, and Messages uses output_config.effort. Do not copy the Chat Completions field into every request format.

Set up Claude Code with the explicit K3.1 Pro ID

Map the main conversation, background model slots, and subagents to K3.1 Pro so the trial consistently requests that model. This recipe adapts Kimi’s integration layout using the canonical ID accepted by its Messages API and Anthropic’s documented [1m] behavior.

Use an updated Claude Code installation. Merge the following into ~/.claude/settings.json, preserving unrelated settings:

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.moonshot.ai/anthropic",
    "ANTHROPIC_MODEL": "kimi-k3.1-pro[1m]",
    "ANTHROPIC_DEFAULT_FABLE_MODEL": "kimi-k3.1-pro[1m]",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "kimi-k3.1-pro[1m]",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "kimi-k3.1-pro[1m]",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "kimi-k3.1-pro[1m]",
    "CLAUDE_CODE_SUBAGENT_MODEL": "kimi-k3.1-pro[1m]",
    "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "1000000",
    "CLAUDE_CODE_EFFORT_LEVEL": "high"
  }
}

All those slots now use K3.1 Pro pricing, including background tasks associated with the Haiku slot. The compaction setting is a client threshold; it does not purchase additional context or tokens.

Keep credentials out of this JSON example. Remove stale ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN entries from its existing env object before using the shell credential below: Kimi documents that settings-file environment values override terminal exports.

From the same Bash session used for the API check, launch:

unset ANTHROPIC_API_KEY
export ANTHROPIC_AUTH_TOKEN="$MOONSHOT_API_KEY"
claude

In the new session, run /status. Check that the base URL is https://api.moonshot.ai/anthropic and that the selected model names K3.1 Pro, possibly with the [1m] annotation. Keep thinking enabled.

Use the repository-inspection check in the next section to exercise tool calls. /status confirms your selected configuration; an assistant’s answer to “Which model are you?” is not a reliable routing check.

If the old model still appears, inspect existing model overrides in your settings and restart. If only background work fails, check every family and subagent mapping rather than changing the main model alone.

Connect Codex through the native Responses API

Use Kimi’s native Responses endpoint for Codex. The official Kimi integration supports kimi-k3.1-pro directly, with wire_api = "responses" and a context window of 1048576.

For Codex 0.134.0 or later, use a separate profile file so you can select this setup explicitly. Check your version with codex --version. Under the current Codex profile rules, --profile kimi-k31 loads ~/.codex/kimi-k31.config.toml over the base configuration.

Create that file with:

model = "kimi-k3.1-pro"
model_provider = "kimi"
model_context_window = 1048576
model_reasoning_effort = "high"

[model_providers.kimi]
name = "Kimi"
base_url = "https://api.moonshot.ai/v1"
env_key = "KIMI_API_KEY"
wire_api = "responses"

The provider settings follow Kimi’s guide. The explicit high effort combines Codex’s reasoning configuration field with a value accepted by Kimi’s Responses schema.

From the terminal holding your API key, run:

export KIMI_API_KEY="$MOONSHOT_API_KEY"
codex --profile kimi-k31

Open /status and confirm the kimi provider and kimi-k3.1-pro model. Codex sends requests to https://api.moonshot.ai/v1/responses; the base URL therefore includes /v1, unlike the Claude Code base URL.

In either coding client, open a small repository and submit:

Read the repository's top-level files and its test configuration.
Explain the entry point and the command for running its tests.
Cite the relevant file paths. Do not edit files or run the tests.

Check that the client reads files and produces a final answer after the tool results return. This verifies more of the coding integration than a greeting.

If Codex returns 404 on /v1/responses, check the exact base URL and any existing local-router configuration. Kimi also documents that a model-metadata warning can occur because the model is absent from Codex’s built-in catalog; the explicit context-window setting supplies the missing capacity.

Already using Kimi Code membership?

Use /model in the official Kimi Code CLI, select K3.1 Pro, and start a fresh session for the trial. The October 23 release notes recommend a new session when moving from older models.

For current plans, standard K3.1 Pro is available on Plus and above; Pro and above unlock its full 1M context and Highspeed. The corresponding legacy tiers are Moderato and Allegretto. Highspeed consumes about 2× the subscription quota, according to the model guide. That is a quota multiplier, separate from the API price table.

Select effort explicitly instead of assuming the direct API default also applies to your client. Keep thinking enabled: Kimi Code’s error reference documents HTTP 400 with “K3.1 Pro does not support disabled thinking mode.”

Copy model IDs carefully. Kimi Code warns that a mistyped ID can fall back to K2.8 Preview without thinking; its error reference also documents invalid IDs that return 400. Treat a typo as a routing risk, not an error you can always expect to catch automatically.

A Kimi Code key belongs with its own service. For example, its separate Claude Code instructions use https://api.kimi.ai/coding/. Substituting that key into the pay-as-you-go Moonshot configuration above does not select your membership allowance.

Should you replace Claude Opus 5.5?

Test K3.1 Pro on a representative repository task before moving an established Opus workflow. The published results justify a trial, but they do not establish a universal quality or completed-task cost ranking.

Moonshot reports 65.7% on Terminal-Bench 4.0, compared with 66.4% for Claude Opus 5.5 and 58.2% for GPT-6 Astra. Its benchmark footnotes say K3.1 Pro used the Claude Code harness, while comparison scores were drawn from vendor reports or the leaderboard. This is not a single controlled run of every model under identical conditions.

Artificial Analysis’s independent launch report separately reports approximately 67% on Terminal-Bench 4.0 and 55 on its Intelligence Index. Keep those results associated with their own evaluation; do not mix them into Moonshot’s comparison as though the conditions were identical.

For your trial, hold the repository snapshot, task, permissions, and acceptance tests constant. Record the effort setting, total charge, elapsed time, retries, and whether the final change passes review. Adopt standard K3.1 Pro where it meets your quality bar at a useful cost; try Highspeed where generation waits dominate. Keep Opus for tasks where fewer repair cycles or a required client capability make the existing workflow more effective.

Ready to optimize your LLM workflow?

Join thousands of developers building faster, smarter, and more cost-effective AI applications with BetterToken.

Get Started for Free