The API for uncensored AI models
KiApi Documentation: Integration in 5 minutes
Get immediate access to a powerful, uncensored LLM via an OpenAI-compatible interface with KiApi. Start with a few lines of code and seamlessly integrate the model into your applications.
https://api.kiapis.com/v1uncensored
Getting started: Base URL and authentication
The KiApi is fully compatible with the OpenAI API. You can use the existing ecosystem of SDKs and clients by adjusting the base_url. The base URL for all requests is https://api.kiapis.com/v1. Authentication is done exclusively via an API key, which you receive after registration on your dashboard page. This key must be sent in the HTTP header Authorization: Bearer <IHR_API_SCHLÜSSEL>. You can generate a new key at any time, which invalidates the old one.
Unlike other services, we do not offer complex endpoints for embeddings or fine-tuning. Our focus is on pure text generation. KiApi is your direct connection to a model optimized for uncensored responses. Make sure to configure your environment correctly before sending your first request.
POST /v1/chat/completions: Text generation
The core of the API is the POST /v1/chat/completions endpoint. Here you send a list of messages (system, user, assistant) and receive a text response. The model ID parameter must be set to uncensored. The response is synchronous and immediately contains the generated text fragment along with token usage metadata.
The request structure follows the standard format. You can define roles to clearly structure the context. The system processes the input and generates a response based on the model's learned behavior. This is the primary method for almost all text applications, from chatbots to text analysis.
curl https://api.kiapis.com/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."}]
}'The response contains a JSON object with the generated content. Make sure to extract the content field from the response to use it in your application. No additional metadata such as cost per request is returned in the standard response; you can find this in the dashboard.
Streaming with Server-Sent Events (SSE)
For applications requiring immediate output, KiApi supports streaming via Server-Sent Events (SSE). Enable this by setting "stream": true in the request body. Instead of waiting for a complete response, you receive a stream of JSON patches containing the generated text incrementally.
This is particularly useful for chat interfaces where immediate feedback improves the user experience. KiApi as a streaming API allows you to reduce latency and create the feeling of a real-time conversation. The client must parse the stream and concatenate the fragments until the stream end is signaled.
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)When streaming, token usage statistics are often returned at the end of the stream in the last event. This allows for accurate billing based on the actual generation length. Make sure your client code handles the stream end to release resources correctly.
Tool calling and function calling
The model supports tool calling, also known as function calling. This allows the LLM to return structured JSON data representing specific functions or actions in your application. You define the available tools in the request body, and the model decides based on the user input when to call a tool.
The structure of the tool definitions follows the OpenAI standard. You can specify multiple tools, and the model selects the most appropriate one. The response contains a list of tool calls that you can then execute in your backend logic. This expands the capabilities of KiApi far beyond pure text generation.
from openai import OpenAI
client = OpenAI(base_url="https://api.kiapis.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)Use tool calling to automate complex workflows. The model provides the parameters for the tool directly in JSON format. You do not need to use external parsers for the response, as the structure comes directly from the model. This makes integration into existing systems significantly easier and more reliable.
GET /v1/models: Available models
The GET /v1/models endpoint lists the available models that can be accessed via the API. This is useful for dynamically checking which models are available or confirming the model ID. Typically, you will receive a list containing the uncensored model.
The response contains metadata about the model, such as ID, owner, and creation date. Unlike some other APIs, the standard response does not directly include the maximum context length or specific prices. This information must be taken from the documentation or the dashboard. However, this endpoint is indispensable for automatic client configuration.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.kiapis.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);Use this endpoint to adapt your application to future changes. If new models are added, they will automatically appear in this list. The current uncensored model is the only available model and is characterized in the description as a large language model optimized for uncensored content.
Rate limits and error codes
To ensure service stability, certain limits apply. 300 requests per minute are allowed per API key. The maximum request body size is 8 MB. If you exceed these limits, you will receive the HTTP status code 429 Too Many Requests. Plan your application accordingly to implement retries with exponential backoff.
Other common error codes are 401 Unauthorized if the API key is invalid, and 402 Payment Required if your credit is exhausted. KiApi uses a prepaid model, so requests without credit are rejected immediately. Make sure to check your account balances regularly.
The context window is 100,000 tokens for input and output combined. If you exceed this limit, an error message is returned. KiApi is a reliable solution for developers who appreciate clear rules and transparent limits.
Technical specifications
Before you integrate, here is exactly what you get with a key.
| Spec | Value |
|---|---|
| Protocol | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Authentication | Authorization: Bearer YOUR_KEY |
| Model | uncensored |
| Base URL | https://api.kiapis.com/v1 |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Completion length | up to the rest of the 100,000-token window; max_tokens optional (no separate cap) |
| Context window | 100,000 tokens (prompt + completion together) |
| Streaming | Supported (stream: true), usage included at the end |
| Structured output | JSON object mode via response_format json_object |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Sampling parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| 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 |
| Max body | 8 MB request body |
| Requests per minute | 300/min per key |
| Volume bonus | +5% on $50+, +10% on $100+ |
| How you pay | pay as you go from prepaid credit; nothing is charged for failed or refused requests |
| Subscription | no monthly fee; paid credit does not expire |
| Price | $0.25 per 1M input tokens · $1.00 per 1M output tokens |
| Top-up | USDT (TRC20) or USDC (Base), any whole amount from $10 to $500 |
| 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 |
| Content policy | uncensored for adults; the only hard rule: no sexual content involving minors |
| Sign-in | Google or e-mail and password |
| Keys | one active key per account; a new key replaces the old one |
When a request fails
Errors come back as JSON with a stable type; failed and refused requests are not billed.
| HTTP | Type | What to do |
|---|---|---|
400 | bad_request | malformed request or too long for the context window |
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 | sexual content involving minors — refused, not billed |
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 |
Frequently asked questions
Is KiApi an OpenAI-compatible API?
Yes, KiApi follows the OpenAI API format for chat completions. You can use the official OpenAI SDKs by adjusting only the base_url and the API key. The request and response structure is identical to OpenAI's.
How does the prepaid model work and when does the balance expire?
You top up your account with credit that is used immediately for requests. There are no monthly fees or subscriptions. The prepaid credit never expires. You can top up from $10, with higher amounts receiving bonus credit.
What kind of censorship is there in KiApi?
The model is trained not to refuse even on controversial or adult topics. However, one hard limit always applies: sexual content involving minors is blocked. This is the only system-wide content restriction.
Your key is one click away
Create an account, copy the key, adjust the base URL. That's it.