Skip to content
English

Switch theme

// Models · API key guide

Kimi API key: how to get one

Create the key in the Kimi Open Platform console and call the OpenAI-compatible endpoint https://api.moonshot.cn/v1.

4 stepsofficial docs onlychecked 2026-10-26

01How to get a Kimi (Moonshot AI) API key

  1. Sign up / log in at platform.kimi.com.
  2. Open Console → API Keys and create a new key.
  3. Save it as MOONSHOT_API_KEY.
  4. Call https://api.moonshot.cn/v1 with model kimi-k3.1-pro (Chat Completions, Responses and Anthropic Messages formats are supported).

Official key page: https://platform.kimi.com/console/api-keys – console labels may change; follow what the official page shows.

02Real-name, phone and credit card requirements

Real-name / ID verificationRequired to receive the ¥15 trial voucher.
Phone numberThe trial voucher is for new users registering with a mainland China phone number.
Credit card / paymentNot mentioned in the docs; top-up methods are on the platform’s billing page.

03Base URL and a minimal call

Base URL:https://api.moonshot.cn/v1
Environment variable:MOONSHOT_API_KEY · Example model:kimi-k3.1-pro
kimi-k3.1-pro-highspeed is the faster variant.

curl

curl https://api.moonshot.cn/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $MOONSHOT_API_KEY" \
  -d '{
    "model": "kimi-k3.1-pro",
    "messages": [{"role": "user", "content": "你好"}]
  }'

Python

# pip install openai
import os
from openai import OpenAI

client = OpenAI(api_key=os.environ["MOONSHOT_API_KEY"], base_url="https://api.moonshot.cn/v1")
resp = client.chat.completions.create(
    model="kimi-k3.1-pro",
    messages=[{"role": "user", "content": "你好"}],
)
print(resp.choices[0].message.content)

¥15 voucher for new users (mainland phone), issued after real-name verification, valid 3 months, not usable for Kimi K3. With the voucher used up and a zero balance, requests return 403.

Our free-API tracker:¥15 voucher on sign-up, issued after real-name verification, valid 3 months; not usable for Kimi K3.
checked 2026-10-22 · details →

05Kimi (Moonshot AI) API prices

All model prices →
ModelInput / 1M tokensOutput / 1M tokensSource
Kimi K2.7 Codekimi-k2.7-code ¥6.5¥27 official · 2026-10-10
Kimi K2.6kimi-k2.6 ¥6.5¥27 official · 2026-10-10
Kimi K2.7 Code HighSpeedkimi-k2.7-code-highspeed ¥13¥54 official · 2026-10-10
Kimi K3.1 Prokimi-k3.1-pro ¥13¥68 official · 2026-10-24
Kimi K3kimi-k3 ¥20¥100 official · 2026-10-10
Kimi K3.1 Pro Highspeedkimi-k3.1-pro-highspeed ¥26¥136 official · 2026-10-24

Standard (non-batch) list prices from our price database; cheapest first, max 8 rows. Prices change – the official page wins.

06Keep your API key safe

07FAQ

FAQ

Where do I get a Kimi API key?

platform.kimi.com/console/api-keys after logging in.

Is the Kimi API free?

Only the ¥15 trial voucher for new users (conditions above); otherwise pay-as-you-go.

What is the Kimi API base_url?

https://api.moonshot.cn/v1

08Official sources

All facts checked against these pages on 2026-10-26. If anything differs, the official page wins.

09Related

Other API key guides

Data updated: Model API prices · HF model metadata(UTC+8)