EN ▾
Create key

AI UncensoredAPI reference

OpenAI-compatible API for uncensored text generation

Integrate the Uncensored AI in Minutes

Get the uncensored AI running in your stack with standard OpenAI SDK compatibility. We provide a single uncensored model via the openai compatible API path, so you skip complex routing and start generating immediately.

Install the Standard OpenAI SDK

Start by installing the official client library for your preferred language. This ensures you use the exact same request structures as major providers while we handle the uncensored backend. No custom wrappers or legacy HTTP calls are required. You can proceed with pip or npm depending on your environment.

Configure Base URL and API Key

Point your client to our endpoint to route requests correctly. You must set the base URL to HTTPS://api.aiuncensoredthe.com/v1 and provide your key from the dashboard. This configuration ensures all calls hit the uncensored LLM API instead of the default OpenAI servers.

  • Base URL: HTTPS://api.aiuncensoredthe.com/v1
  • Model ID: uncensored
  • Auth: Bearer token via API key

Send Your First Chat Completion

Make a standard POST request to /v1/chat/completions with your prompt. The uncensored AI API responds with text without applying standard content filters. You can send any topic, including adult or controversial subjects, as long as it does not involve minors. The response returns immediately with the generated token stream.

curl https://api.aiuncensoredthe.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Return current UTC timestamp in ISO format"}]
  }'

Enable Streaming for Real-Time Output

Set the stream parameter to true for lower latency perception. This sends tokens one by one via Server-Sent Events (SSE). You can display output instantly while the model continues generating. The uncensored models handle high-throughput streams efficiently without dropping connections. This approach reduces perceived wait times significantly.

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)

Use Tool Calling and JSON Mode

Activate function calling to let the model execute external logic. Pass a tools array with your schema definitions in the request body. The API respects tool_choice parameters for precise control. You can also force JSON output using response_format json_object for structured data extraction. This flexibility supports complex integration patterns.

from openai import OpenAI

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

Manage Context and Parameters

Our uncensored AI supports a 100,000 token context window for prompt and completion combined. Max output is 16,000 tokens per request, or 2,048 if unspecified. You can adjust temperature and top_p for creativity. Rate limits are 300 requests per minute per key. Errors like 401 indicate invalid keys, 402 means no credit, and 429 signals rate limiting.

import OpenAI from "openai";

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

Common questions

What is the uncensored AI model ID?

The model ID is "uncensored". It is an open-weight model tuned for lawful adult use and controversial topics. It is not GPT, Claude, or any other vendor's model. You specify it directly in your SDK requests.

How do I handle errors in the uncensored LLM API?

Use standard HTTP status codes. A 401 error means your API key is invalid. A 402 error indicates your prepaid credit is exhausted. A 429 error signals you have exceeded the 300 requests per minute limit. Errors do not consume your token credit.

Does the uncensored AI support streaming?

Yes, set stream to true in your request body. The API returns tokens via Server-Sent Events (SSE). You receive usage stats in the final chunk. This feature works with all standard OpenAI-compatible SDKs for real-time output.

Unlock your API key

Register, retrieve your key, and update your endpoint. Minimal configuration required.

Create keyView documentation