Get API key

Kimi API Key: an independent guide and a drop-in alternative

The Kimi API key is the authentication token required to access Moonshot AI's conversational model, enabling programmatic access to its long-context capabilities. This guide explains how to obtain and use that key, while offering an independent, uncensored alternative that runs the exact same OpenAI-compatible client code without model routing overhead.

Updated

Key points

  • Obtain the Kimi API key via the Moonshot AI developer portal to access their specific long-context model.
  • Our uncensored API uses the identical OpenAI SDK structure, allowing a simple base_url and key swap.
  • Our service charges only for actual token usage with no monthly subscription or expiration on prepaid credit.
  • Our uncensored model runs on dedicated infrastructure, ensuring predictable latency and full prompt fidelity for adult content.

What is the Kimi API Key?

The Kimi API key is the primary credential that authenticates your requests to Moonshot AI's large language model. It serves as the unique identifier for your account, allowing you to programmatically send prompts and receive text completions. Without this key, your client cannot distinguish your usage for billing or rate-limiting purposes.

Obtaining this key typically involves creating an account on the Moonshot developer portal. Once generated, you embed the key in the authorization header of your HTTP requests. It is crucial to keep this key secure, as anyone with the key can consume your credits. The key grants access to Moonshot's specific model architecture, which is optimized for handling very long context windows, making it distinct from generic API offerings.

Cost Comparison: Kimi vs. Uncensored API

Understanding the pricing structure is essential for budgeting your LLM integration. Moonshot AI charges based on token consumption, with distinct rates for input and output tokens. Their pricing model is standard for the industry, but it may include overhead costs if you are using a proxy or aggregator service.

Our uncensored API offers a transparent, direct pricing model. We charge $0.25 per 1 million input tokens and $1.00 per 1 million output tokens. Unlike subscription-based services, we use a prepaid credit system where funds never expire. Errors and refusals do not consume your credit, ensuring you only pay for successful completions. This direct approach avoids the markup often found in third-party aggregators.

Pricing Breakdown

Token TypeKimi APIOur Uncensored API
InputVaries by model$0.25 / 1M tokens
OutputVaries by model$1.00 / 1M tokens
SubscriptionRequiredNone

Latency and Throughput Trade-offs

Latency in LLM APIs is influenced by model complexity, server load, and network routing. When using the Kimi API, your requests pass through Moonshot's infrastructure. During peak times, you may experience increased latency due to shared resources or model routing complexities if you are using an intermediate proxy.

Our uncensored API runs on dedicated servers, providing predictable latency. By avoiding proxy overhead, we ensure that your requests are processed directly by the model. This is particularly beneficial for applications requiring real-time responses or consistent throughput. Our infrastructure supports 300 requests per minute per key, with a concurrency limit of 8 simultaneous requests. This setup minimizes queuing delays and ensures stable performance for high-volume applications.

Content Filtering: Uncensored vs. Filtered

Standard LLM APIs often employ content filters to block sensitive, adult, or controversial topics. These filters operate at the application layer, meaning the model might still understand the context but refuses to generate the response. This can be problematic for creative writing, security research, or adult content applications where such restrictions are undesirable.

Our uncensored model is tuned to answer without these content refusals for lawful adult use. It does not block controversial or sexual topics, providing full prompt fidelity. The only hard limit is the prohibition of sexual content involving minors, which is always enforced. This ensures that your application receives the raw output of the model, giving you complete control over post-processing if needed. This makes our API ideal for use cases where strict adherence to content guidelines is not required.

SDK Compatibility: The OpenAI Advantage

One of the biggest advantages of the OpenAI API standard is its widespread adoption. Most modern LLM clients and SDKs are built to communicate using the OpenAI protocol. This means you can switch between different models and providers with minimal code changes.

Our uncensored API is fully OpenAI-compatible. You can use the official OpenAI SDKs for Python, Node.js, and other languages. The only changes required are updating the base URL to https://api.kimiapi.cc/v1 and replacing your Kimi API key with our uncensored API key. The model identifier is set to uncensored. This drop-in compatibility reduces development time and allows you to leverage existing codebases without rewriting the integration logic.

Use Cases for Uncensored LLMs

Uncensored LLMs are particularly useful in scenarios where content restrictions might hinder creativity or accuracy. Common use cases include adult fiction generation, where sexual themes are central to the narrative. They are also valuable in security research, allowing researchers to explore model behaviors without filter interference. Additionally, controversial topic analysis benefits from models that do not default to safe, generic responses.

Our API supports streaming via Server-Sent Events (SSE), function calling, and JSON mode. These features make it suitable for complex applications that require structured data output or interactive tool use. The 64,000 token context window allows for extensive document analysis, while the 16,000 token output limit supports detailed responses. This flexibility ensures that our API can handle a wide range of developer needs, from simple chatbots to complex data processing pipelines.

Getting Started: Your First Request

Getting started with our uncensored API is straightforward. First, sign up using your Google account or email and password. You will receive an API key immediately, along with $0.50 in trial credit valid for 7 days. No credit card is required to start.

To make your first request, configure your OpenAI SDK with our base URL and your new API key. Send a POST request to /v1/chat/completions with the model set to uncensored. The API will return a text response, which you can process in your application. For streaming responses, enable the stream parameter to receive tokens as they are generated. This allows for real-time user experiences, such as live chat interfaces.

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)

Frequently Asked Questions

Is the Kimi API key the same as the uncensored API key? No, they are distinct. The Kimi API key authenticates you to Moonshot AI's infrastructure, while our uncensored API key authenticates you to our dedicated servers. They use the same OpenAI-compatible protocol but point to different endpoints.

Do I need a credit card for the trial? No, the $0.50 trial credit is available with just an email or Google sign-in. You can start testing immediately without financial commitment.

What happens if I exceed the rate limit? Requests exceeding 300 per minute or 8 concurrent connections will receive a 429 error. You can request additional capacity or wait for the window to reset. Our prepaid credits never expire, so you can top up later.

Is my data used for training? No, prompts sent to our uncensored API are not used for training purposes. Your data remains private and is only used to generate the response for your request.

Questions and answers

How do I get the Kimi API key?

You can obtain the Kimi API key by signing up on the Moonshot AI developer portal. Once registered, navigate to the API section to generate your unique key. This key is then used in the authorization header of your requests to access their model.

Can I use the OpenAI SDK with the uncensored API?

Yes, our uncensored API is fully compatible with the official OpenAI SDKs. You only need to update the base URL to our endpoint and replace the API key. The model parameter should be set to 'uncensored' to ensure you are accessing the correct model.

What is the context window size?

Our uncensored API supports a context window of 64,000 tokens, which includes both the prompt and the completion. The maximum output per request is 16,000 tokens, or 2,048 tokens if the max_tokens parameter is not specified.

How is billing handled?

Billing is based on prepaid credit charged by real token usage. Errors and refusals are free. Credits never expire, and there are no monthly subscriptions. You can top up using USDT (TRC20) or USDC (Base) with amounts ranging from $10 to $500.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API key