EN ▾
Start now

Quickstart: Integrate the Uncensored LLM API

Integrate the uncensored LLM API in minutes with our OpenAI-compatible endpoint. This quickstart guides you through authentication, streaming, and handling responses without subscription locks.

Authentication and Base URL

Start by pointing your client to our base URL and passing your key in the header. The endpoint lives at https://api.kiohnegrenzen.com/v1 and accepts standard OpenAI headers. You need an API key, which you generate instantly on the Get API key page. Use Google or email authentication to get started. No phone number is required. The key grants access to the uncensored model.

Required Header: Authorization: Bearer YOUR_API_KEY

Errors like 401 indicate an invalid key. Check your account dashboard. 402 errors mean your prepaid credit is exhausted. Top up via crypto to resume. 429 responses signal you hit the rate limit of 300 requests per minute.

Sending Your First Request

Make a POST request to /v1/chat/completions with your model ID and prompt. Use uncensored as the model ID. This model is tuned to answer without refusals for lawful adult content. It handles text input and returns text output. You can specify parameters like temperature or top_p to control creativity. The system supports function calling and JSON mode for structured data.

Model: uncensored

Keep requests under 8MB. You can send up to 8 concurrent requests per key. Each request counts against your prepaid balance. Errors and refusals are free. Your credit never expires.

Python SDK Integration

Use the official openai Python package to interact with the API. Set the base URL to our endpoint and provide your key. This allows you to leverage existing code structures. You can pass messages as a list of dictionaries. The response object contains the generated text and token usage statistics. Streaming is supported via async generators.

Key Parameters: temperature, top_p, stop, seed.

Install the package with pip. Import the client class. Initialize it with your base URL. Send a chat completion request. The SDK handles the JSON serialization and HTTP transport for you.

Node.js SDK Integration

Initialize the Node.js OpenAI SDK with our base URL. This ensures compatibility with your JavaScript or TypeScript projects. Pass the API key and base URL in the constructor. Send a chat completion request with the model ID uncensored. The SDK returns a response stream or a single object. You can configure parameters like presence_penalty and frequency_penalty.

Configuration: Set baseURL and apiKey.

The SDK supports both synchronous and asynchronous requests. Use async/await for non-blocking operations. Handle errors gracefully. Catch network errors and API errors. Log token usage for cost tracking.

Streaming Responses with SSE

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE). Each chunk contains partial text. The final chunk includes the total token usage. This is ideal for real-time applications. You can display tokens as they arrive. The model supports up to 16,000 tokens per request. Set max_tokens to control output length. Default is 2,048 tokens if not specified.

Streaming: Enable via client library or raw HTTP.

Parse the SSE stream. Handle each chunk. Accumulate the text. Close the stream when finished. Token usage is reported in the last chunk. This helps you track costs accurately.

Token Limits and Error Handling

The context window supports 100,000 tokens for prompt and completion combined. This allows for large documents. Monitor token usage to avoid exceeding limits. Errors include 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. Refusals are free. Credit is prepaid and never expires. Top up with USDT or USDC. Bonuses apply for larger top-ups. Use JSON mode for structured output. Function calling is supported. Privacy is maintained; prompts are not used for training.

cURL

curl https://api.kiohnegrenzen.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Generate a 300 word technical blog post about vector databases."}]
  }'

Python

from openai import OpenAI

client = OpenAI(base_url="https://api.kiohnegrenzen.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

import OpenAI from "openai";

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

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)

Frequently asked questions

What is the context window limit for the uncensored model?

The context window supports 100,000 tokens for prompt and completion combined. This allows for large documents. Monitor token usage to avoid exceeding limits.

How do I top up my prepaid credit?

Top up with USDT (TRC20) or USDC (Base). Any whole amount from $20 to $500 is accepted. Bonuses apply for larger top-ups. Credit never expires.

Does the uncensored model refuse content?

The model does not refuse lawful adult, fictional, or controversial topics. It is tuned for uncensored responses. Exceptions include sexual content involving minors. Requests of that kind are refused.

Retrieve your API key

Register, copy the key, update your base URL. That is all.

Start now