Kimi API guide

Kimi API access and setup

Global and Mainland China are separate Kimi platform and account routes, so the endpoint, billing surface and applicable terms depend on the route you choose. Then verify the available model ID, request format and response behavior before integration.

Answer first

Start with the account route, not the SDK.

Kimi provides official API access. Before you integrate it, identify the platform and account route you are using, then verify the endpoint, model ID, billing surface and compatibility against current official documentation.

Official access

Kimi Open Platform

Kimi provides an official developer API, separate from the consumer app and Kimi Code.

Choose first

Account region

Select Global or Mainland China before creating a key or copying an endpoint.

K3 model ID

kimi-k3

Confirm current entitlement with the same key through the official model list endpoint.

API format

OpenAI-compatible

The official service supports the OpenAI Chat Completions request and response format.

What it is

What is the Kimi API?

The Kimi API is Moonshot AI's official developer service for calling Kimi models from software. The current documentation presents Kimi K3 as the flagship model and also lists other models, including Kimi K2.6, for different capability and cost needs.

The API product is separate from the consumer Kimi app, Kimi Membership and Kimi Code. A subscription or credential for one product does not automatically provide an Open Platform API balance or key.

DECLARED

Current official product and model documentation

Model availability is account-specific. Use GET /v1/models with the same key before treating any model ID as available to your project.

API key

How to get a Kimi API key

The key belongs to a specific platform account. Regional keys and balances should not be mixed.

  1. 01

    Choose the platform route

    Use platform.kimi.ai for the Global route or platform.kimi.com for the Mainland China route. Do not create a key before deciding which account and billing surface you need.

  2. 02

    Create the key in that console

    Open the API key area inside the matching platform console. Kimi says keys, balances and accounts are isolated between regional platforms.

  3. 03

    Keep the key server-side

    Store it in a secret manager or environment variable. Do not expose it in browser code, a public repository or logs.

  4. 04

    Verify models before integration

    Call the official model list with the same key, then confirm the model ID, endpoint, account balance and response behavior you will use in production.

Regional routing

Global vs Mainland China API access

These are separate account, credential and billing surfaces. Choose one route consistently from signup through production monitoring.

Users outside Mainland China

Global Kimi API

DECLARED
Platform
https://platform.kimi.ai
OpenAI-compatible base URL
https://api.moonshot.ai/v1
API key source
Global Kimi Open Platform console
Billing surface
Global account balance and billing surface
Check the official route ↗

Mainland China platform users

Mainland China Kimi API

DECLARED
Platform
https://platform.kimi.com
OpenAI-compatible base URL
https://api.moonshot.cn/v1
API key source
Mainland China Kimi Open Platform console
Billing surface
Mainland China account balance and billing surface
Check the official route ↗
Route check: a key created on one regional platform should not be sent to the other region's endpoint. Kimi's troubleshooting guide says mismatched regional keys can return authentication errors.

Client setup

OpenAI-compatible setup

Kimi documents compatibility with the OpenAI Chat Completions request and response format. That allows the official OpenAI SDK to target Kimi by changing the key, base URL and model.

DECLARED

Compatibility has boundaries

Kimi-specific fields and client behavior can differ. OpenAI-compatible does not mean every OpenAI feature, provider implementation or agent integration behaves identically.

Minimal Global route example
import os
from openai import OpenAI

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

response = client.chat.completions.create(
    model="kimi-k3",
    messages=[
        {"role": "user", "content": "Summarize this change."}
    ],
)

Officially documented Global values are shown. Use the matching Mainland China values only with a Mainland China platform key.

Free and paid access

Is the Kimi API free?

API availability, promotional credit and paid pricing are three different questions.

API availability

DECLARED

Kimi documents an official API service, but access still depends on a valid regional account, matching key, available model and usable balance.

Free credits or promotions

UNKNOWN

Do not assume a permanent Kimi free API tier. Vouchers, trial credits and eligibility can change by account, time and region; verify the current console before planning usage.

Paid API pricing

DECLARED

The official Open Platform describes pay-as-you-go, token-based billing. Model rates and feature charges can change, so use the current pricing page rather than a copied price table.

Delivery path

Official API vs third-party providers

The same model name does not prove the same provider, model build, endpoint, region, features, support or commercial terms. Treat the delivery route as a separate decision.

The third-party route below is an example only. Modroam has not independently verified it, and inclusion is not a recommendation.

Who issues the key?
Official Kimi APIThe matching Kimi Open Platform console
Third-party providerThe selected provider's own console
Which endpoint applies?
Official Kimi APIThe documented Kimi endpoint for the account region
Third-party providerA provider-specific endpoint and request path
Who defines billing and limits?
Official Kimi APIKimi platform pricing, balance and rate-limit rules
Third-party providerThe provider's published terms and your contract
What must be verified?
Official Kimi APIModel list, API docs and the exact Kimi account route
Third-party providerModel version, features, region, retention, support and commercial terms
CONTRACTUAL

Provider data handling, service levels and negotiated terms become contractual only when the applicable agreement says so.

Coding and agents

Kimi API for coding and agents

Keep the API product, coding client and credential source distinct before troubleshooting an integration.

Direct API and SDKs

DECLARED

Start with the official OpenAI-compatible route and a minimal request. Validate streaming, tools, reasoning fields, errors and usage reporting before adding an agent framework.

Kimi Code and Claude Code

DECLARED

Kimi documents a separate coding-product path. Kimi Code keys and Open Platform API keys are not interchangeable, and client-specific model aliases may differ.

Other coding agents

UNKNOWN

An OpenAI-compatible setting is a starting point, not proof of complete support. Test the direct API first, then check tool calls, long-running requests and model-specific fields in the chosen client.

More focused outside-China and coding guides may follow. Until those routes exist, this page remains the decision hub; no placeholder links are published.