Moonshot AI · Developer resource

Kimi K3: from model specs to your first API call

Kimi K3 is Moonshot AI’s open-weight multimodal reasoning model. Understand its long-context and coding capabilities, compare reported results, and start building with its API.

2.8T / 104B

Total / activated parameters

1,048,576

Context window · tokens

Kimi K3 License

Open weights · custom license

An independent reference guide. API calls run on the provider’s platform; this page does not host Kimi inference. K3 is no longer the latest model in the family.

Sources checked:

What can Kimi K3 do?

Choose it around a workflow, then test it on your own code and inputs. A larger model or context window alone does not guarantee a better result.

Keep more of the project in context

The 1,048,576-token window can accommodate extensive project material. Supply a repository map, relevant files and a clear task; verify important conclusions against the source.

Reason about visual inputs

Use visual understanding to discuss screenshots and interface behavior. Supported input formats depend on the API; follow its vision guide when attaching images or video.

Code with tools and feedback

K3 targets long engineering tasks and tool-assisted coding. An agent harness must execute tool calls, return results and apply changes; a basic chat request does not run terminal commands.

Assist 3D and CAD workflows

Ask for Blender Python or modeling steps, then inspect the result in the target application. Script generation is a workflow aid, not a promise of a downloadable, production-ready 3D asset.

Coding performance comparison

Three coding benchmarks from Moonshot’s Kimi K3 report. Model versions and reasoning settings are preserved below.

Officially reported scores · higher is better
BenchmarkKimi K3 (max)Claude Fable 5 (max, w/ fallback)GPT-5.6 Sol (max)
ProgramBench77.876.877.6
Terminal-Bench 2.188.388.088.8
SWE-Marathon42.035.039.0

Source: Moonshot AI’s evaluation table, checked on the date above. These are vendor-reported results, not our own tests. Tooling, inference settings and task coverage affect outcomes; use a project-specific evaluation before choosing a model.

API pricing and billing

API usage is billed separately from Kimi membership and Kimi Code subscriptions. The official pricing page did not expose numeric K3 rates when checked; unverified means unknown, not free.

Rate unit: per 1 million tokens (MTok). Confirm currency and current rates on the official platform.
Billing itemRateHow it is billed
InputNot yet verifiedRequest input tokens are charged according to usage.
OutputNot yet verifiedGenerated output is charged according to usage.
Cached inputNot yet verifiedCache hits use the cache-hit rate, without an additional write charge.
Cache writesNot yet verifiedWrite charges depend on the cache TTL: 5 minutes or 1 hour.

1 MTok = 1,000,000 tokens. Published prices exclude applicable taxes. Repeated prefixes can use automatic caching, with a default 5-minute TTL. Check the current rate card and your usage breakdown before estimating a budget.

API quickstart

A minimal Python example for your own machine or server. This page never asks for or stores your API key.

  1. 01

    Create a provider API key

    Sign in to the official platform and create an API key. Check model access and billing requirements in its console.

  2. 02

    Install and configure

    Use Python 3.9+ and the OpenAI Python SDK. Set MOONSHOT_API_KEY in the shell where you will run Python; use the command for your operating system.

  3. 03

    Run the Python example

    Save the Python code as kimi_example.py, then run python kimi_example.py. The request uses model kimi-k3 and the official /v1 API endpoint. On macOS / Linux, use python3 if python is not available.

  4. 04

    Read the response

    The example prints the final message content. Replace the prompt with your task, and review the official guide before adding streaming or tool calls.

1. Windows · PowerShell

python -m pip install --upgrade "openai>=1.0"
$env:MOONSHOT_API_KEY="YOUR_API_KEY"

1. macOS / Linux · bash / zsh

python3 -m pip install --upgrade "openai>=1.0"
export MOONSHOT_API_KEY="YOUR_API_KEY"

2. Save and run kimi_example.py

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["MOONSHOT_API_KEY"],
    base_url="https://api.moonshot.ai/v1",
)

completion = client.chat.completions.create(
    model="kimi-k3",
    messages=[{
        "role": "user",
        "content": "Explain how to review a pull request in five steps.",
    }],
)

print(completion.choices[0].message.content)

Run only the shell commands for your platform, replacing YOUR_API_KEY locally. Keep the key on your machine or server, outside source control and browser code. API calls can incur charges. For follow-up turns and tools, preserve the complete assistant message as required by the official guide.

Prompts to try

Copy a prompt into your own workflow and replace the placeholders with relevant material. These are starting points, not measured demonstrations.

Review a code change

Review this diff for correctness and regressions. Report only actionable issues with file paths, line numbers, a concrete failure scenario and a suggested fix. Separate confirmed issues from questions. If context is missing, name the files needed.

Diff and relevant files:
[Paste here]

Understand a large repository

Using the repository map and files below, trace the request from route to service to storage. Cite file paths and symbols for each step. Identify extension points and propose a minimal implementation plan. Do not invent files or behavior absent from the supplied material.

Task, repository map and files:
[Paste here]

Draft a Blender script

Write a Blender Python script for the version specified below to create a simple parametric desk organizer using primitives. Expose dimensions as variables in meters, name the objects and add a camera and lighting. Do not delete existing scene objects or access external files. Explain how to run and inspect the script.

Blender version and dimensions:
[Fill in]

Review generated code before running it. For 3D work, validate scale, geometry and compatibility in Blender or your CAD application.

Explore the Solidcraft CAD guide →

Frequently asked questions

Official sources

Specifications, reported scores and billing explanations are based on the sources below. Check the provider’s current documentation for changes.