Skip to main content

Kimi API key setup

Moonshot AI's Kimi platform offering large language models with long context windows and tool calling support.

Get your key

  1. Open the Kimi API keys page: platform.moonshot.ai/console/api-keys
  2. Create an account and generate an API key.
  3. Paste it into the Dracon BYOK provider keys, stored encrypted (AES-256-GCM), used browser-direct, works in every Dracon tool.

Use your key in every tab

Two free extensions take the key you just set up. Both read the page you are on and use your own provider key: free, no account, nothing stored on a server we run.

SamAI

Summarize or ask about any page with your own provider key.

Add to Chrome Add to Firefox

AI Auto Form Filler

Complete a web form from a short description, using a model you bring yourself.

Add to Chrome Add to Firefox

All extensions · last checked 2026-10-22.

Get the key and test it

  1. Open the Kimi API keys page: platform.moonshot.ai/console/api-keys Create a key and copy the secret straight away.
  2. Point your client at this provider's base URL: https://api.moonshot.ai/v1 It speaks the OpenAI-compatible shape, so an OpenAI SDK client works against it with no adapter: only the base URL and the key change.
  3. Prove the endpoint answers before you trust it. Send one call with no Authorization header: a live endpoint answers 401 Unauthorized, because it is waiting for a bearer key. The wording of that error differs by provider (some say invalid_api_key, others incorrect_api_key or Token is invalid), so read the 401 as the signal, not the error text.
  4. Paste the key into the Dracon BYOK provider keys ; stored encrypted, used browser-direct, no relay.
  5. Compare other provider plans when this subscription does not match your usage or budget.

Test the key

Both examples read the key from the KIMI_API_KEY environment variable, so the key stays out of the command line.

export KIMI_API_KEY="<YOUR_API_KEY>"

curl https://api.moonshot.ai/v1/chat/completions \
  -H "Authorization: Bearer $KIMI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"kimi-k2-0905-preview","messages":[{"role":"user","content":"hi"}]}'
import os
from openai import OpenAI

# export KIMI_API_KEY="<YOUR_API_KEY>" first
client = OpenAI(
    api_key=os.environ["KIMI_API_KEY"],
    base_url="https://api.moonshot.ai/v1",
)
resp = client.chat.completions.create(
    model="kimi-k2-0905-preview",
    messages=[{"role": "user", "content": "hi"}],
)
print(resp.choices[0].message.content)

Free tier

No recurring free tier advertised as of the last check (2026-10-26). Usage is billed per the provider's listed pricing. You pay them directly, no Dracon markup.

Rate limits: Varies by usage tier

Paid plans compared

Every tier Kimi publishes, with the price and the limit as the vendor states them, last checked 2026-10-26. Confirm with the provider before you buy. You pay them directly, no Dracon markup.

Kimi subscription plans: price, usage limit and what each tier includes.
PlanPriceUsage limitWhat you get
Moderato$19/moBasic usage; Kimi Code billing: $19/month, or $15/month billed annually at $180/year
  • Hosted Kimi models
  • Long context window
  • Tool calling support
Allegretto$39/mo5x more requests for Kimi Code; Kimi Code billing: $39/month, or $31/month billed annually at $372/year
  • Hosted Kimi models
  • Long context window
  • Tool calling support
Allegro$99/mo15x more requests for Kimi Code; Kimi Code billing: $99/month, or $79/month billed annually at $948/year
  • Hosted Kimi models
  • Long context window
  • Tool calling support
Vivace$199/mo30x more requests for Kimi Code; Kimi Code billing: $199/month, or $159/month billed annually at $1,908/year
  • Hosted Kimi models
  • Long context window
  • Tool calling support

Official plan source: kimi.com/code

Connection details

Base URL
https://api.moonshot.ai/v1
API shape
OpenAI-compatible
Env var
KIMI_API_KEY
Models
kimi-k2-0905-preview, moonshot-v1-32k
Model lineup
Kimi K2.6, Kimi K2.5, Kimi K2, Kimi K1.5

Our verdicts on this kind of provider

Independent comparisons we keep current as pricing and free tiers shift. A guide is setup; a verdict is whether it's worth setting up.

Add your Kimi key Add this provider to a fallback list Compare provider plans