Quickstart for Kimi users
Drop in a new base URL and API key to route your existing OpenAI SDK calls to an uncensored LLM. This guide shows the exact three lines needed to start chatting, streaming, and using tools with our compatible endpoint.
Prerequisites: API Key
Before sending requests, you need an API key. Sign up on the Get API key page using Continue with Google or an email and password. Your key appears immediately. New accounts receive $0.50 in trial credit valid for 7 days; no card is required. For paid usage, top up with USDT (TRC20) or USDC (Base). Top-ups range from $20 to $500. You receive a +5% bonus for top-ups of $50 or more, and a +10% bonus for $100 or more. Credit never expires and is charged only for real token usage. Errors and refusals are free. You can hold one active key per account; generating a new key replaces the old one. Use this key in theAuthorization header for all requests.
Basic Chat Completion
Thekimi api endpoint accepts standard OpenAI chat-completion requests. Set your client's base URL to https://api.kimiapi.cc/v1 and provide your key. We serve a single, dedicated uncensored model identified by the ID uncensored. This model is open-weight, runs on our servers, and does not refuse lawful adult, fictional, or controversial topics. It is not GPT, Claude, Gemini, or any other vendor's model. You can send prompts and receive text responses. The model supports a 100,000-token context window (prompt + completion). If you do not set max_tokens, the response can run to the end of the 100,000-token window. No embeddings, images, or audio are generated.
Streaming Responses
Use Server-Sent Events (SSE) for streaming. The API streams tokens as they are generated. Token usage information is included in the final chunk of the stream. This allows you to monitor costs in real time without waiting for the full response. Streaming is supported by all standard OpenAI-compatible SDKs. Setstream=true in your request. The client will receive a series of delta objects containing the text. You can concatenate these deltas to reconstruct the full response. This is ideal for chat interfaces where users expect immediate feedback. The kimi api ensures predictable latency by avoiding proxy overhead.
Function Calling (Tools)
The API supports function calling, also known as tools. You can define tools in your request and the model will return structured arguments when appropriate. Use thetools parameter to pass a list of tool definitions. You can also use tool_choice to force or auto-select tools. The model returns a response with tool calls, which you can pass back to the API to continue the conversation. This enables building agents or automated workflows. The tool definitions follow the standard OpenAI format. The uncensored model handles tool definitions accurately without refusing to use them for valid use cases. JSON mode is also available for stricter output formatting.
JSON Mode
For applications requiring strict output, use JSON mode. Setresponse_format to {"type": "json_object"}. The model will attempt to return a valid JSON object. This is useful for parsing data, generating configuration files, or feeding structured data into other systems. JSON mode works alongside function calling. You can also set parameters like temperature, top_p, stop, seed, presence_penalty, and frequency_penalty to control creativity and determinism. These parameters are standard for OpenAI-compatible clients. Adjust them to balance consistency and creativity based on your use case.
Limits, Errors & Context
Each API key is limited to 300 requests per minute and 8 concurrent requests. The request body must not exceed 8 MB. If the key is invalid, you receive a 401 error. If you have no credit, you receive a 402 error. If you exceed the rate limit, you receive a 429 error. Errors and refusals are free, so you are not charged for failed requests. The context window is 100,000 tokens total. A hard content limit applies: requests involving sexual content with minors are always refused. The API is text-only. No embeddings, images, or fine-tuning are available. For other vendors' models, check their documentation for current prices and limits. This service is an independent alternative, not affiliated with them.
cURL
curl https://api.kimiapi.cc/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Write a blunt product review of a cheap VPN."}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.kimiapi.cc/v1", api_key="YOUR_KEY")
resp = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Summarise this thread without softening it."}],
)
print(resp.choices[0].message.content)Node.js
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.kimiapi.cc/v1", apiKey: process.env.API_KEY });
const resp = await client.chat.completions.create({
model: "uncensored",
messages: [{ role: "user", content: "Draft a villain monologue for my game." }],
});
console.log(resp.choices[0].message.content);Streaming
stream = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Tell the story in second person."}],
stream=True,
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)Specs at a glance
Use this table to decide whether the API fits your project before you buy credit.
| Item | Value |
|---|---|
| API format | OpenAI Chat Completions schema; official openai SDKs work unchanged |
| Base URL | https://api.kimiapi.cc/v1 |
| Model | uncensored |
| API key | Bearer token in the Authorization header |
| Endpoints | POST /v1/chat/completions · GET /v1/models |
| Structured output | JSON object mode via response_format json_object |
| Other parameters | temperature, top_p, stop, seed, presence_penalty, frequency_penalty |
| Max context | 100,000 tokens (prompt + completion together) |
| Function calling | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| SSE streaming | Yes — server-sent events; the last chunk carries token usage |
| Max output | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| Request size | up to 8 MB per request |
| Rate limit | 300 requests per minute per key |
| Response headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Parallel requests | 8 requests at the same time per key |
| Free trial | $0.50 of credit valid 7 days, no card needed · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up |
| Credit expiry | paid credit never expires, no subscription |
| How you pay | pay as you go from prepaid credit; nothing is charged for failed or refused requests |
| Payment | USDT (TRC20) or USDC (Base), any whole amount from $20 to $500 |
| Volume bonus | +5% from $50, +10% from $100, +15% from $200 |
| Token prices | $0.15 per 1M input tokens · $0.50 per 1M output tokens |
| Sign-in | Google or e-mail and password |
| Key management | one key per account, regenerate any time (the old one stops working) |
| Content | uncensored for adults; the only hard rule: no sexual content involving minors |
HTTP errors
The type field is stable, the message is for humans. Errors cost nothing.
| HTTP | Type | What to do |
|---|---|---|
400 | bad_request | invalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend |
401 | missing_key · invalid_key · key_revoked | no key, wrong key, or a key replaced by a newer one |
402 | no_credit | out of credit; add credit and retry |
403 | content_blocked | refused by the content policy |
404 | not_found | only /v1/chat/completions and /v1/models exist |
413 | request_too_large | body over 8 MB |
429 | rate_limited · concurrency | slow down: rate or parallel limit reached |
503 | upstream_busy | model busy — retry in a few seconds |
Questions and answers
What is the context window and output limit?
The context window is 100,000 tokens for the prompt and completion combined. There is no separate output cap. If you do not set max_tokens, the response can run to the end of the window.
How do I top up my credit?
Top up by crypto (USDT on TRC20, USDC on Base). Accepted amounts are whole dollars from $20 to $500. You receive a +5% bonus for top-ups of $50 or more, a +10% bonus for $100 or more, and a +15% bonus for $200 or more. Credit never expires.
Is this the official Kimi API?
No. This is an independent service providing an OpenAI-compatible endpoint. We serve a single uncensored model. We are not affiliated with Moonshot AI or any other vendor. Check the respective vendor documentation for their official APIs.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.