MorseSign inOpen Morse

Kimi API key, where Moonshot issues one and how to call every Kimi model with a Morse key

The Morse teamPublished Facts checked 6 min read

A Kimi API key comes from Moonshot AI, the lab that makes Kimi: you sign in to the Kimi API Platform, open API Keys, and create one, as its quickstart describes. A "Moonshot API key" is the same thing, and that key calls Kimi on Moonshot's own API.

Kimi's open-weight models also answer to a Morse key. One secret starting with sk_morse_ reaches all six Kimi ids in Morse's catalog, from Kimi K2 through Kimi K3.1 Pro and its abliterated build, through an OpenAI-compatible endpoint at https://inference.trymorse.ai/v1. This guide covers that path: how the key works, how to make it, and a Kimi K3.1 Pro call we ran on December 4, 2026 using the steps in Morse's API docs.

How does a Kimi API key work?

The key tells the server which account is calling, so it knows whom to bill and whether to answer at all. Every request carries it in the Authorization header as a Bearer token. The server matches it to an account, checks that account can pay, runs the Kimi model named in the request body, and records the tokens used.

Three settings are all a client needs:

  • The key, sk_morse_..., copied once at creation.
  • The base URL, https://inference.trymorse.ai/v1, which goes in the base_url field of any client built for OpenAI's chat completions.
  • The model id, such as moonshotai/kimi-k3.1-pro. Moving from Kimi K3.1 Pro to Kimi K2 means editing this one value.

Clients that speak Anthropic's format can send the key in an x-api-key header instead. Each key closes with a checksum, so secret scanners can catch one pushed to a repository. A request whose key is absent, wrong, or revoked gets 401 invalid_api_key.

How do I get a Kimi API key on Morse?

Through the Morse console, in five short steps, taken from the quickstart:

  1. Sign in at console.trymorse.ai, with a verified email, which key creation requires.
  2. Click Create key, label it with the app or tool it's for, and press Create.
  3. Copy the secret right then. The console displays it a single time and Morse saves only a hash.
  4. Load credits on the console's credits page. Requests spend from that balance, and with none left they return 402 insufficient_balance.
  5. Export the key into your shell so code can read it without holding it:
export MORSE_API_KEY="sk_morse_..."

The script in the next section picks it up from there. Kept in the environment, a key never lands in a commit, a screenshot, or a notebook you share, and replacing it is a one-line change.

How do you call Kimi K3.1 Pro with the key?

Hand the OpenAI SDK Morse's base URL and your key, and set the model to a Kimi id. We ran this script on December 4, 2026. It adds a privacy floor of tee, so the request had to run inside attested hardware, which Kimi K3.1 Pro supports:

import os
import time

from openai import OpenAI

client = OpenAI(
    base_url="https://inference.trymorse.ai/v1",
    api_key=os.environ["MORSE_API_KEY"],
)

start = time.monotonic()
reply = client.chat.completions.create(
    model="moonshotai/kimi-k3.1-pro",
    reasoning_effort="low",
    max_tokens=300,
    extra_body={"provider": {"min_privacy": "tee"}},
    messages=[{
        "role": "user",
        "content": "In two sentences, what does a canary token do in a network you defend?",
    }],
)
print(round(time.monotonic() - start, 2), "s")
print(reply.usage)
print(reply.choices[0].message.content)

The full reply took 17.97 seconds, measured from our machine. Usage came to 103 prompt tokens and 185 completion tokens, and 124 of the completion tokens went to reasoning at low effort before the answer started. This was the answer, complete:

A canary token is a decoy file, link, credential, or other lure placed where no legitimate user should interact with it. If accessed or used, it triggers an alert, giving defenders a high-confidence early warning of an intrusion or insider threat.

The reasoning tokens explain most of the wait. Kimi K3.1 Pro takes the efforts "none", "low", "high", or "max", so pick the lowest that does the job, and leave max_tokens room for both the thinking and the reply. A single short call checks your setup; it says little about the model. The Kimi K3.1 Pro guide has a longer run.

Which Kimi models does one Morse key reach?

Every Kimi model in the catalog, six ids, with nothing to set up per model.

ModelIdContextReadsPrivacy tiers
Kimi K3.1 Promoonshotai/kimi-k3.1-pro1M tokenstext and imagesTEE, Private
Kimi K3.1 Pro Uncensoredmoonshotai/kimi-k3.1-pro-uncensored1M tokenstext and imagesPrivate
Kimi K3moonshotai/kimi-k31M tokenstext and imagesPrivate
Kimi K2.6moonshotai/kimi-k2.6256K tokenstext and imagesPrivate
Kimi K2 0905moonshotai/kimi-k2-0905256K tokenstextPrivate
Kimi K2moonshotai/kimi-k2128K tokenstextPrivate

What each one is for:

  • Kimi K3.1 Pro is the newest, the first model of Moonshot's K3.1 series, and the pick for coding and long agent runs. It's the only stock Kimi with an enclave tier. Its guide: Kimi K3.1 Pro.
  • Kimi K3.1 Pro Uncensored is that model abliterated, covered in the last section and in its own walkthrough.
  • Kimi K3 is the July 2026 flagship that K3.1 Pro was trained from and reads text and images. See the Kimi K3 guide.
  • Kimi K2.6 is the K2-generation agent model with an instant and a thinking mode, and it reads images.
  • Kimi K2 0905 and Kimi K2 answer straight away with no thinking phase, which suits fast tool calls. The 0905 build is the September update with the longer context.

Prices sit on each model's page under /inference/models, next to the longest reply it can write. For a model-by-model take on coding work, read Kimi for coding.

When should a Kimi request run in a TEE?

When the prompt holds something that shouldn't be readable by the machine's operator. Kimi K3.1 Pro's privacy tiers are TEE, Private. It runs in attested hardware enclaves, under zero-data-retention terms. The enclave tier is opt-in, so a request lands there only when you ask for it. The other five Kimi ids run on the Private tier, under zero-data-retention terms with the provider.

There are two ways to ask. In the request, put "provider": {"min_privacy": "tee"} in the body, as the script above does. On the key, choose a privacy floor when you create it, and every call through that key inherits it, even from tools whose requests you can't edit. Morse then serves the call at that tier or higher. If a model has nothing at the floor, the request fails with 400 privacy_floor_unmet before anything is billed. The privacy tiers page says what each tier guards.

How do I stop a Kimi key from being misused?

Anyone who has the key can spend your credits, so store it only on servers and your own computer, never in front-end or app code. Then narrow it in the console:

  • Spend limit: a ceiling on what the key may spend, reset daily, weekly, monthly, or never. Calls over it get 402 key_spend_limit_reached.
  • Expiry: a date after which the key answers 401 api_key_expired.
  • Allowed IPs: up to 100 addresses or ranges. A call from outside them gets 403 ip_not_allowed.
  • Privacy floor: the lowest tier any of the key's requests may run on, as above.

GET /v1/key returns the key's name, prefix, limits, and remaining allowance, never the secret, and costs nothing. An account holds up to 25 active keys, so one per tool is easy. Revoking a key on the console's API keys page is instant and permanent; make the new key before you revoke the old one if something depends on it.

Can the key run Kimi in Claude Code or Codex?

Yes. Morse's Claude Code and Codex guides both start you on Kimi K3.1 Pro, and the docs cover Cursor, Cline, and others the same way. Set the reasoning effort in the tool's config rather than leaving its default, since effort decides how long each step thinks. Kimi for coding has our Claude Code and Codex runs with the settings we used.

What is the uncensored Kimi build for?

Jobs where a stock model stops partway. Kimi K3.1 Pro Uncensored is Kimi K3.1 Pro abliterated: the refusal direction has been removed from its weights, as our abliterated model explainer describes. Morse serves its uncensored models for four kinds of work: cybersecurity, agent security, AI and ML research, and training data. It takes the same key and the same script; only the model id changes to moonshotai/kimi-k3.1-pro-uncensored.

Where do I start?

Make a key on the Morse API page, export it, and run the script above with the Kimi id that fits your work. To try Kimi in a chat window before writing code, sign up for Morse and choose it from the model menu.

Common questions

Is a Moonshot API key the same thing as a Kimi API key?

Yes. Moonshot AI makes the Kimi models, and its developer platform now lives at platform.kimi.ai; the older platform.moonshot.ai address forwards there. Its docs even name the environment variable MOONSHOT_API_KEY.

Can I paste my Kimi platform key into Morse?

No. A key works only where it was issued. Keys from the Kimi API Platform go to Moonshot's base URL, and Morse accepts its own keys, which start with sk_morse_, at https://inference.trymorse.ai/v1.

Which Kimi model should a new key call first?

Kimi K3.1 Pro for coding and agent work, and the one Morse's Claude Code and Codex guides start on. Kimi K2.6 suits work that fits in 256K tokens.

How do I call the uncensored Kimi?

Send the same request with the model set to moonshotai/kimi-k3.1-pro-uncensored. It's an abliterated build of Kimi K3.1 Pro and answers to the same key.

Ask what you actually want to ask.

80+ models, uncensored ones included, plus images. Every chat is encrypted and stays on your device. Free to start.

Start a private chat

Read next