kimiapikey.comGuide
Use a Kimi-Style API Key in Cursor: Setup Guide
Cursor can talk to any OpenAI-compatible endpoint, so connecting it to this API takes four fields and about two minutes. This guide covers the exact values, a test that proves the key works, and the errors you are most likely to meet.
Updated

Key points
- Cursor needs three values: your key, the base URL https://api.kimiapikey.com/v1 and the model name
uncensored. - Test the key with curl first, so a Cursor-side problem is easy to tell from an API-side one.
- Agent-style edits send large prompts, so watch input tokens: $0.15 per 1M in, $0.50 per 1M out.
- The trial key allows 2 concurrent requests, which Cursor's agent can exceed. A full key allows 8.
The short answer
If you are searching for how to use kimi api key in cursor, the first thing to know is that a key issued by another provider only works with that provider's own endpoint. The key from this site works with this site's endpoint, and Cursor accepts it because the endpoint speaks the OpenAI chat completions format. You paste the key, point Cursor at a different base URL, and add one custom model name.
The whole setup in order:
- Create an account and copy your key from the API key page.
- Open Cursor, go to Settings, then Models.
- Paste the key into the OpenAI API key field.
- Turn on the base URL override and enter
https://api.kimiapikey.com/v1. - Add a custom model called
uncensoredand select it in the chat.
The rest of this article explains each step, gives you a way to test the connection outside the editor, and lists what usually goes wrong.
What this key is and is not
This site sells access to one open-weight model, run by an independent provider and tuned to answer without content refusals for lawful adult use. It is not the official API of Moonshot, Kimi or any other vendor, and it is not a router that forwards your request to someone else's model. The site name reflects what people search for, not who runs the service. If you already hold a key from another vendor, keep using it with that vendor's endpoint. The two keys are not interchangeable.
What you get is a plain OpenAI-style API: POST /v1/chat/completions and GET /v1/models, bearer-token authentication, a 100,000-token context window, streaming, tool calling and JSON mode. It is text only. There is no image generation, no embeddings and no fine-tuning, which matters in an editor because Cursor features that depend on those will not use this endpoint. The Kimi API key explainer goes into the naming and the alternatives in more detail.
For coding, "uncensored" has a practical meaning. The model will not stop halfway through a task because a variable name or a test fixture looks sensitive. Security tooling for systems you own, log parsers full of ugly strings, scrapers, fiction generators and moderation test sets are the kind of work that trips refusals elsewhere. The hard limit stays in place: no sexual content involving minors, ever.
Step-by-step setup in Cursor
1. Get the key and the trial credit
Sign up with Google, or with an email and password. On the API key page you can claim $0.50 of trial credit with one click. It needs no card, lasts 7 days and is one per person. That is enough for a few hundred normal chat requests, so you can finish this whole guide before paying anything.
2. Open the model settings
In Cursor, open Settings and find the Models section. Menu labels move around between versions, so look for a field named for an OpenAI API key and a toggle or field named for overriding the OpenAI base URL. Those are the two settings that matter.
3. Fill the three values
| Cursor field | Value |
|---|---|
| OpenAI API key | Your key from the dashboard |
| Override OpenAI base URL | https://api.kimiapikey.com/v1 |
| Custom model name | uncensored |
Enter the base URL exactly as shown. It ends in /v1, without a trailing slash and without /chat/completions, because the client adds the path itself. A pasted URL with the full path produces a 404, and the error message rarely says why.
4. Select the model and send a message
Open the chat panel, pick uncensored from the model list, and ask something small, such as "write a function that parses ISO dates". If a reply streams in, you are done. If Cursor shows an error, do not change settings at random. Go to the next section and test the endpoint directly.
5. Know the side effect of the override
The base URL override typically applies to every OpenAI-style model you use in Cursor, not only the custom one. If you switch back to a standard OpenAI model later, turn the override off first, or your request will go to this endpoint with a model name it does not serve.
Test the key before blaming the editor
Two minutes with a terminal saves an hour of guessing. This request does what Cursor does: it sends a chat completion with a bearer token.
curl https://api.kimiapikey.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Reply with the word ready."}],
"max_tokens": 20
}'
A JSON body with a choices array means the key, the URL and the model name are all correct. Check the response headers too. X-Balance-USD shows your remaining credit and X-Request-Id is worth keeping if you ever need to trace a request.
The same check in Python with the official OpenAI SDK:
from openai import OpenAI
client = OpenAI(
base_url="https://api.kimiapikey.com/v1",
api_key="YOUR_KEY",
)
resp = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Reply with the word ready."}],
max_tokens=20,
)
print(resp.choices[0].message.content)
You can also list models with GET /v1/models. Cursor and similar clients sometimes call it when you press a verify button, so a working models call is a good sign. If curl works and Cursor does not, the problem is in the editor settings, and the fault table below covers the usual ones.
What changes when the model writes code in your editor
Chat in a side panel is cheap. A short question with a few hundred tokens of context costs a fraction of a cent. Editor features that attach files, search results and conversation history cost more because every request carries everything again. The model has a 100,000-token window shared between prompt and reply, and Cursor will happily fill a lot of it if you attach a large folder.
Here is a real calculation. Say a request carries 40,000 input tokens and the model writes 1,500 tokens back:
- Input: 40,000 / 1,000,000 x $0.15 = $0.006
- Output: 1,500 / 1,000,000 x $0.50 = $0.00075
- Total: $0.00675 per request, so 100 such requests cost $0.675
That is well under a dollar for a heavy afternoon, but the input side dominates, so the habit that saves money is attaching fewer files, not asking shorter questions. Start a new chat when the topic changes, because old history is paid for again on every turn.
Tool calling is supported by the API, which is what agent-style editor features rely on. The model decides to call a tool, your client runs it and returns the result as a role: "tool" message. How well any model drives a multi-step agent depends on the model, so try it on a small task before you hand it a refactor. One open-weight model behind the API means you get one behaviour, not a menu to choose from.
Cursor features that run on Cursor's own models, such as its tab completion, are generally not switched by a custom key. Check Cursor's current documentation for which features accept a custom OpenAI-style endpoint, since that list changes between releases.
Common errors and how to fix them
| Symptom | Likely cause | Fix |
|---|---|---|
| 404 or "not found" | Base URL includes the endpoint path, or lacks /v1 | Use exactly https://api.kimiapikey.com/v1 |
| 401 unauthorized | Extra space or newline in the pasted key, or an old key | Re-copy the key from the dashboard and paste it again |
| Model not found | Model name typed differently | Use uncensored, lowercase, nothing else |
429 with code concurrency | Too many requests at once for your key | Wait for running requests to finish, or use a full key (8 concurrent) |
429 with code rate_limited | More than the per-minute allowance | Slow down; trial keys allow 60 per minute, full keys 300 |
429 with a Retry-After: 5 header | Temporary overload | Retry after five seconds |
| Verify button fails, curl works | The editor tests with a model name it knows | Skip the verify step and send a real chat message |
The concurrency error deserves a note because it surprises people on the trial key. The trial allows 2 concurrent requests, and an agent that starts several operations in parallel can exceed that without you doing anything. A streamed response also holds its slot until the stream ends, so a long answer keeps one slot busy the whole time. A full key allows 8 concurrent requests and 300 requests per minute, which is comfortable for one developer.
Failed and refused requests are not charged, so retrying after an error costs nothing extra. You can read the full limits on the documentation page.
Paying for it once the trial runs out
There is no subscription. You top up prepaid credit with any whole amount from $20 to $500, and requests draw it down at $0.15 per 1M input tokens and $0.50 per 1M output tokens. Credit never expires, so a month with no coding costs nothing. Top-ups of $50 or more carry a bonus: +5% from $50, +10% from $100 and +15% from $200. You can pay with crypto (USDT on TRC20, USDC on Base). The pricing page has the current numbers in one place.
Using the 40,000-in, 1,500-out request from earlier, a $20 top-up covers roughly 2,960 such requests ($20 / $0.00675). Most editor requests are smaller, so the real figure is higher. Your prompts are not used for training, which matters when the code you paste in belongs to a client.
When you finish setup, a sensible first task is a small one you can review quickly: a unit test for an existing function, a regex with a long comment, or a rewrite of one noisy file. If the results suit your workflow, add credit. If they do not, you have spent a few cents of trial credit finding out.
More guides
- Kimi API Key Pricing: What This Alternative Costs
- Kimi API Key Integration with OpenAI SDKs and LangChain
- Kimi API Key: How It Works and What the Alternatives Are
Frequently Asked Questions
Is the model the same as Moonshot's official Kimi?
No, we host an open-weight model that is tuned to be uncensored. It is not GPT, Claude, Gemini, Grok, DeepSeek, or any other vendor's model. It is a distinct model run on our own servers.
Do you train on my data?
No. Your prompts and completions are not used for training. We value privacy and transparency, so your data remains yours.
What are the rate limits?
You are limited to 300 requests per minute per key. The maximum request body size is 8 MB. These limits are designed to ensure stable performance for all users.
What is the content policy?
The model is uncensored regarding adult, controversial, and creative topics. However, we do block sexual content involving minors. This is a hard limit that always applies, regardless of your subscription level.
Questions and answers
Can I put a Moonshot or Kimi key into Cursor with this base URL?
No. A key works only with the endpoint of the provider that issued it. Use the key from your dashboard here, or keep the other key with its own provider's URL.
What model name do I enter in Cursor?
Enter uncensored, in lowercase. It is the only model ID this API serves, and a different name returns a model-not-found error.
Does it work with Cursor's agent mode?
The API supports tool calling, which agent features need. How reliably the model completes long multi-step tasks varies, so test it on a small task before a large one.
Why do I get a 429 error on the trial key?
The trial key allows 2 concurrent requests and 60 per minute. A full key allows 8 concurrent and 300 per minute, and a Retry-After: 5 header means a short overload you can retry.
Is my code used for training?
No. Prompts sent to the API are not used for training.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.