Get API key

Uncensored Kimi API Quickstart

Connect your existing code to our uncensored API in minutes. This guide shows you how to configure your base URL, authenticate with your API key, and send requests using standard OpenAI-compatible clients.

Base URL and Authentication

Configure your client to point at our dedicated endpoint. Replace the standard OpenAI base URL with https://api.kimiapipricing.com/v1 to route requests through our uncensored infrastructure. You must set your API key in the authorization header or client configuration object. This base URL works with any standard OpenAI SDK without modifying the request structure. Your API key is generated immediately after signup on the Get API key page. We support Google login or standard email authentication without requiring a phone number. Keep your key secure since it identifies your account and prepaid credits.

Send Your First Request

Execute a basic chat completion to verify connectivity. Send a POST request to the /v1/chat/completions endpoint with the model ID uncensored. This model responds to lawful adult content without standard refusals. The request body requires a messages array containing your prompt. Our API returns standard OpenAI JSON responses including token usage statistics. Errors like invalid keys or insufficient credits are returned as standard HTTP status codes. You can verify your base URL and key configuration before sending complex prompts. This step confirms your client is properly authenticated.

curl https://api.kimiapipricing.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "fetch my usage stats from the api endpoint"}]
  }'

Python SDK Configuration

Initialize the OpenAI Python client with our custom base URL. Pass your API key and the base_url parameter to override the default endpoint. Set the model to uncensored for text generation. This approach allows you to use familiar SDK methods like chat.completions.create(). The client handles streaming and JSON formatting automatically. You do not need to modify the message structure compared to standard OpenAI usage. This compatibility ensures you can swap your provider without rewriting application logic. Configure the client once and reuse it across your application. The SDK manages the connection pooling and retry logic for you.

from openai import OpenAI

client = OpenAI(base_url="https://api.kimiapipricing.com/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 SDK Setup

Import the OpenAI package and instantiate the client with our base URL. Set the apiKey and baseURL properties to route traffic correctly. Use the uncensored model ID in your completion calls. This setup works with both CommonJS and ES module imports. You can send text prompts and receive structured JSON responses. The Node SDK handles stream processing efficiently for large outputs. Configure the client in your environment variables for secure key management. This method integrates easily into existing Express or standalone scripts. Verify the connection by sending a simple test message. The SDK supports both synchronous and asynchronous request patterns.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.kimiapipricing.com/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);

Handle Streaming Responses

Enable streaming by setting stream: true in your request parameters. The API returns a Server-Sent Events (SSE) stream containing partial responses. Each chunk includes token usage data in the final chunk. This feature is ideal for real-time user interfaces and chat applications. You can process tokens as they arrive without waiting for full generation. The stream ends with a completion chunk containing the total token count. Handle network interruptions by reconnecting to the stream. This approach reduces perceived latency for end users. Configure your client to buffer chunks efficiently. Streaming works with all standard parameters like temperature and top_p.

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)

Limits, Errors, and Context

Monitor your usage against strict rate limits and context constraints. You are allowed 300 requests per minute and 8 concurrent requests per key. The context window is 100,000 tokens including both prompt and completion. Maximum output per request is 16,000 tokens, or 2,048 if unspecified. Requests exceeding these limits return a 429 status code. A 401 error indicates an invalid or missing API key. A 402 error means your prepaid credit is exhausted. Errors and refusals do not consume your credits. Your prepaid credit never expires, so you can top up later. The request body size limit is 8 MB. Use function calling and JSON mode within these constraints.

Frequently asked questions

How much does the uncensored API cost compared to other options?

Our pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens. You pay only for actual token usage with prepaid crypto credits. There are no monthly fees or subscription tiers required to access the service.

What crypto payment methods are accepted for topping up credits?

We accept USDT on the TRC20 network and USDC on the Base network. Minimum top-up amounts start at $20. Credits never expire, and you receive bonus credit for larger deposits ranging from +5% to +15%.

Does the uncensored model block adult or controversial content?

The model is tuned to answer without content refusals for lawful adult use. It does not block controversial or security research topics. The only hard limit is sexual content involving minors, which is always refused.