I hit a rate limit on my second day using Moonshot AI's Kimi API, after maybe fifteen total requests. That number should have been nowhere near any limit worth worrying about, and for a while I assumed I'd misread the docs or fat-fingered a loop somewhere in my test script. The actual cause turned out to be a detail about how Kimi counts rate-limit usage that isn't obvious from the signup flow, and it's the part of this whole process actually worth writing down — getting the key itself is genuinely quick.
Getting the key: the two-minute part
Moonshot's developer platform handles account creation and API keys together, and it's about as straightforward as this kind of signup gets:
- Create an account. Go to the Moonshot developer platform and sign up with email, phone, or a Google account — no separate identity system if you already have a consumer Kimi account.
- Generate an API key. From the console dashboard, open API Keys and create a new key. It's shown once, so copy it immediately into a password manager, .env file, or your platform's secrets manager — never into a committed file.
- Add a minimum top-up. Creating a key is free, but making it work requires prepaid credits — a $1 minimum activates the account for actual calls.
- Make your first call. The API is OpenAI-compatible, so the standard OpenAI SDK works unmodified against Moonshot's base URL:
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": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain what Moonshot AI's Kimi K3 model is in two sentences."},
],
max_completion_tokens=200,
)
print(completion.choices[0].message.content)
That's genuinely the whole setup. If it runs without an auth error, you're done with the part everyone writes about.
Pick the current model, not an old guide's model
One thing worth checking before you copy a model string from an older tutorial: Moonshot's lineup moves fast, and kimi-k2.5 along with the earlier moonshot-v1 series were sunset at the end of August 2026. As of this writing, the current flagship is kimi-k3 — a large model with a 1M-token context window, priced at $3 input / $15 output per million tokens with a $0.30 cache-hit input rate. For lighter or more cost-sensitive workloads, kimi-k2.6 and kimi-k2.7-code sit at a cheaper $0.95/$4.00 tier, with a latency-tuned kimi-k2.7-code-highspeed variant if response speed matters more than raw cost. If you're following any guide — including this one, eventually — it's worth hitting Moonshot's list-models endpoint to confirm what's actually still live before committing to a model string in production code.
The part that actually caused my rate limit
Here's the detail that cost me an afternoon of confused debugging. Kimi's rate limiting doesn't count the tokens a request actually consumes — it books tokens against your limit based on your input plus whatever you set max_completion_tokens to, at the moment you send the request, regardless of how much the model actually generates.
That means a request with a 2K-token prompt and max_completion_tokens set to something generous like 131,072 gets billed against your tokens-per-minute limit as if it used all 133K tokens — even if the actual response comes back at 200 tokens. I'd copied a "safe" high value for max_completion_tokens from an example script without thinking about it, assumed my low request volume meant I had plenty of headroom, and burned through my rate limit on a handful of calls that individually did almost nothing.
The fix is straightforward once you know to look for it: set max_completion_tokens to something close to what you actually expect the response to need, not a generous ceiling "just in case." It's a small code change with an outsized effect on how far your rate limit actually stretches.
# Before: books the full ceiling against your rate limit on every call
completion = client.chat.completions.create(
model="kimi-k3",
messages=messages,
max_completion_tokens=131072, # "just in case" — books 131K tokens regardless of actual output
)
# After: set close to what the task actually needs
completion = client.chat.completions.create(
model="kimi-k3",
messages=messages,
max_completion_tokens=500, # short classification/summary task — no reason to book more
)

Understanding the tier system before you scale up
Rate limits on Kimi's platform run through a numbered tier system (0 through 5) tied to how much you've topped up, not how long you've had the account. The two anchor points worth knowing early:
- Tier 0 (before topping up past the $1 minimum): capped at roughly 1.5M tokens per day total.
- Tier 1 (after topping up to $10 cumulative): the daily cap goes away, and you unlock 200 requests per minute with 50 concurrent requests.
That $10 threshold matters in a very similar way to the free-tier unlocks you see on other AI platforms — it's a one-time cumulative top-up, not a subscription, and it's worth crossing early if you're building anything beyond a quick test, since Tier 0's daily cap combined with the max_completion_tokens booking behavior above is a fast way to hit a wall on legitimate, low-volume testing.
When a direct key isn't the right fit
The direct signup flow above is the right choice if Kimi is the only model you need and you're comfortable managing the top-up tiers and rate-limit accounting yourself. If you're already juggling keys for multiple model providers, or you want Kimi models available alongside others behind one key without separately tracking each platform's own tier system, that's a different problem than "how do I get a Kimi key" — it's a routing question. Gateways like RouteAI provide access to Kimi models alongside DeepSeek, Qwen, GLM, and others through a single OpenAI-compatible key, which is worth knowing about if the appeal of Moonshot's own key was really "I need Kimi for one thing" rather than "I want to build my whole stack around Moonshot's console specifically."
The checklist version
If you're getting a Kimi API key today: sign up on the developer platform, generate a key and store it immediately, top up at least $1 to activate it (and consider crossing $10 early to clear Tier 0's daily cap), confirm your model string against the current live model list rather than an old tutorial, and set max_completion_tokens to what your task actually needs instead of a generous default. The signup itself was never the hard part — the rate-limit accounting is the thing that'll actually catch you off guard.
TL;DR: Getting a Kimi API key takes about two minutes, but the rate limit isn't based on actual token usage — it books your input plus whatever max_completion_tokens you set, at request time, whether or not the model uses it, so setting that value realistically (and crossing the $10 top-up threshold early) matters more than the signup flow itself.
Website: https://www.fastrouteai.com

Top comments (0)