Kimi API Key Errors: Region, Model and Permissions
Beginner fix guide for Kimi / Moonshot API key errors: match .ai vs .cn URLs, avoid retired model names and K3 Max typos, decode 401/404/429, and set up DSH.
On this page

Just created a brand-new sk-... API key from Kimi / Moonshot AI, pasted it into DeepSeek Harness (DSH), OpenCode, or OpenChamber, and immediately hit an error?
Stop deleting and recreating new keys! Over 95% of beginner Kimi errors have nothing to do with a broken key string—they come from one of three mix-ups:
- China vs International region mismatch (#1 cause of
401errors): Keys created on the China site (platform.moonshot.cn) only work on.cnURLs, while keys from the international site (platform.kimi.ai) only work on.aiURLs. The two accounts do not recognize each other's keys! - Outdated or invented model names (#1 cause of
404errors):moonshot-v1-8kfrom 2024 blog posts is discontinued, and the newest K3 model ID iskimi-k3—adding-maxto typekimi-k3-maxwill fail! - Mistaking a
429speed limit for an empty balance: Many429errors are per-minute rate limits or temporary server overload rather than$0balance.
Table 1: Match your Kimi key to the exact Base URL and model ID
Check the browser tab where you generated your key and match it row for row (sourced from Kimi's international API overview, China-region quickstart, and the official Kimi model catalog):
| Where You Created Your Key | Exact Base URL | Which Card to Pick in DSH | Valid Current Model IDs (exact spelling) |
|---|---|---|---|
International console (platform.kimi.ai) | https://api.moonshot.ai/v1 | Built-in Moonshot AI (moonshotai) | kimi-k3, kimi-k2.7-code, kimi-k2.7-code-highspeed, kimi-k2.6 |
China console (platform.moonshot.cn) | https://api.moonshot.cn/v1 | Built-in Moonshot AI China (moonshotai-cn) | kimi-k3, kimi-k2.7-code, kimi-k2.7-code-highspeed, kimi-k2.6 |
| Consumer Kimi web chat / Kimi Code plan | Separate product credentials | Check Kimi's OpenCode guide | Do not substitute consumer web logins for API platform keys |
Two model-naming traps to avoid:
- Retire
moonshot-v1-8k: Older tutorials still showmoonshot-v1-8k, which Kimi's catalog now marks as discontinued. Replace it withkimi-k3orkimi-k2.7-code. - Why does
kimi-k3-maxfail with404? Becausemaxis a reasoning effort level, not part of the model ID! In OpenCode 1.18.3, for instance, you pick modelkimi-k3first and then selectmaxeffort through/variants.
Table 2: Instant lookup by error code
Match the exact code on your screen using Kimi's official error reference and DSH's adapter rules:
| Error Code / Message | Real Plain-English Cause | One-Step Fix |
|---|---|---|
401 (Unauthorized) | .ai key pasted into .cn card (or vice versa), or truncated key | Pick the matching International vs China Moonshot card in DSH and re-paste the full sk-... key |
403 (Forbidden) | Wrong product credential or organization IP allowlist block | Confirm the key comes from the API developer console and check IP restrictions |
404 (Not Found) | Discontinued moonshot-v1-8k, invented kimi-k3-max, or missing /v1 in URL | Use exact ID kimi-k3 and confirm Base URL ends with /v1 |
429 (Too Many Requests) | Three different causes: $0 balance, per-minute RPM cap, or engine_overloaded_error | Read the error text: only top up money if it says quota/balance; for rate limits or overload, wait 60 seconds and retry |
MISSING_CREDENTIAL | DSH has no saved key for the Moonshot route you selected | Re-save your key under Settings -> Models on the active Moonshot card |
UNKNOWN_MODEL | Older local app catalog does not list kimi-k3 yet | Update DSH, or add a custom openai-completions entry with kimi-k3 |
3-step beginner fix: test your key in 10 seconds, then connect DSH
If you already changed several settings and lost track, reset cleanly with these three steps:
Step 1: Test your key in 10 seconds from the terminal
Open PowerShell (Windows) or Terminal (Mac) and run the command matching where you created your key (based on Kimi's List Models endpoint; never share screenshots containing your real key).
For an international (platform.kimi.ai) key:
curl https://api.moonshot.ai/v1/models -H "Authorization: Bearer PASTE_YOUR_KEY"For a China (platform.moonshot.cn) key:
curl https://api.moonshot.cn/v1/models -H "Authorization: Bearer PASTE_YOUR_KEY"If a JSON list containing "kimi-k3" prints in your terminal, your key is 100% valid! (If one URL returns 401, try the other URL right away—beginners often forget which portal tab issued the key; see Kimi's quickstart if you need a fresh account check.)
Step 2: Connect the matching Moonshot card inside DSH
Open DSH on your computer and click Settings -> Models -> Add provider:
- Pick
Moonshot AIif.aiworked in Step 1, orMoonshot AI Chinaif.cnworked (step-by-step screenshots in our DSH Kimi provider guide). - Paste your key, save, and select
kimi-k3orkimi-k2.7-code(if your installed DSH catalog is older, add it viaAdd a custom providerwithopenai-completionsfollowing our custom provider guide). - Click New session and send
"Reply only with connected"inside an empty test folder.
Step 3: Extra check for OpenCode and OpenChamber users
Using OpenChamber or OpenCode? Watch out for two version quirks: older OpenCode docs use /connect with K2 examples, while Kimi's OpenCode 1.18.3 guide uses opencode auth login, /models, and /variants for K3. Also remember that OpenChamber Desktop bundles its own internal OpenCode CLI separate from any global opencode binary in your terminal—make sure you configure the instance you actually launch.
Common questions
Why does Kimi's consumer website chat work fine while my API key fails?
Consumer chat on Kimi's website/app and developer API billing are completely separate systems. Working web chat does not fund or activate developer API keys.
Will creating a brand-new API key fix a 401 error?
Almost never—if you paste a new .cn key into an .ai endpoint (or vice versa), the new key will fail with the exact same 401 error. Match the region URL first.
Why did listing /v1/models work in Step 1, yet sending a chat prompt still failed?
Listing models is free and only checks your key and region. Sending an actual chat message checks whether your developer balance is above $0 and whether your account tier has permission for that specific model ID.
Should I run Kimi straight on my main repository once chat connects?
Test one read-only folder command in an empty folder or disposable copy first so you confirm tool calls behave cleanly before editing real project files.
Model and workflow guides
Gemini 4 Neon is here. When is it worth switching models?
Compare Gemini 4 Neon in two coding setups, work through a $0.45 API example, and find Neon in Gemini, Google AI Studio, and Antigravity.
Read →Models and costsGPT-6.2 Astra & Sol Guide: Specs, Pricing & Choice
Beginner guide to OpenAI's GPT-6.2 Astra and Sol: Claude vs DeepSeek price table, plain-English benchmarks, 272K cliff, and step-by-step DSH & Python setup.
Read →Models and costsGPT-6.1 Terra Guide: Uses, Pricing and Sol Comparison
Beginner guide to OpenAI's GPT-6.1 Terra: half-price visual, computer-use, and writing model compared with Sol and DeepSeek, plus DSH and Python setup steps.
Read →Model setup and costsConnect Local Qwen 3.8 27B to DSH
Beginner guide to connecting local Qwen 3.8 27B to DSH: GPU memory table, LM Studio / Ollama / llama.cpp port setup, exact 5-field config, and error fixes.
Read →Model setup and costsCodex Costs: API Billing vs Subscription Usage
Beginner guide to OpenAI Codex costs: ChatGPT Plus login vs API-key billing table, real per-prompt dollar math, and 3 steps to lock a monthly budget cap.
Read →Model setup and costsConnect Grok API to DSH: Setup & Tools
Step-by-step beginner guide to connecting xAI's Grok API (grok-4.7) to DSH: Grok vs Groq comparison, exact 5-field custom provider setup, and 401/404 fixes.
Read →Model setup and costsChoose a Gemini Model by Task and Cost
Beginner guide to Google Gemini model selection: compare 3.8 Flash, 4 Argon, and DeepSeek prices, watch 2027 rate changes, and set up DSH in 4 simple steps.
Read →Model benchmarks and engineeringGemini 4 Argon Coding Benchmarks & 1M Window
Beginner guide to Google's Gemini 4 Argon coding scores vs Claude and GPT, how its shared 1M window and 65K output cap work, plus 4-step DSH setup.
Read →API costs and enterprise ROIGemini 4 Argon API Pricing, Cache & ROI Guide
Beginner guide to Gemini 4 Argon API pricing: Dec 2026 2x rate jump, how 95% auto-caching and thinking tokens bill, DeepSeek cost comparison, and calculator.
Read →Model setup and costsClaude Sonnet vs Opus: Which Should You Use?
Beginner guide to Claude Sonnet 5.5 vs Opus 5.5: side-by-side API prices, per-prompt cost math, clear rules on when to upgrade, and 4-step DSH setup.
Read →Models and costsOpus 5.5 vs Fable 5.2: Which Model Is Right for You?
Beginner guide to Claude Opus 5.5 vs Fable 5.2: side-by-side API prices, coding benchmarks, per-task cost math, 30-day retention rules, and 4-step DSH setup.
Read →Content creationHow to draft a video script with Media Desk for DeepSeek Harness
Turn a phone note into a video script, cover, and storyboard with Media Desk for DeepSeek Harness. See how to install it, set up images, and export a draft.
Read →Mobile and remote accessUse DeepSeek Harness on Your Phone: Beginner Guide
Zero-jargon beginner guide to using DeepSeek Harness on your phone: find your computer IP, connect over home Wi-Fi in 2 minutes, or use Tailscale on 4G/5G.
Read →Model interfaces and workflowsMiniMax H3 vs M-Series in DSH: Which Works?
Beginner guide to MiniMax H3 vs M3 in DSH: why H3 is for video while M3 handles coding, how to avoid region 401 errors, and 4-step DSH setup instructions.
Read →Image editing and toolsAI Image Editing: Prompts, Masks and Review
Beginner guide to AI image editing without ruining your subject: copy our 4-line prompt template, avoid PNG mask traps, inspect edges, and use DSH safely.
Read →