EN ▾
Get API key

Quickstart: Integrate uncensored AI in minutes

Integrate an uncensored LLM API into your application in minutes using standard OpenAI protocols. This quickstart guides you through authentication, requests, streaming, and billing.

Prerequisites and SDK installation

The uncensored llm api requires standard OpenAI SDKs for your preferred language. Install the library via your package manager before proceeding. We support Python, Node.js, and direct HTTP requests. No special drivers or local model downloads are needed. You only need an internet connection and your API key.

Setting the base URL and API key

Configure your client to point to our hosted inference layer. Use the base URL https://api.aiuncensoredchat.com/v1 and your unique API key. This ensures all requests route correctly to our uncensored model. The model identifier is simply uncensored. Do not use other model names like GPT-4 or Claude.

Sending your first completion request

Send a POST request to /v1/chat/completions with your message. The endpoint accepts standard parameters. You will receive a text response immediately. This confirms your integration is working. Test with a simple prompt to verify connectivity.

Handling streaming responses

Enable streaming by setting stream: true. The API returns chunks via Server-Sent Events (SSE). Each chunk contains partial text. The final chunk includes token usage details. This approach reduces perceived latency for end users. Process chunks sequentially in your application logic.

Configuring parameters (temperature, top_p)

Adjust temperature for creativity or top_p for diversity. These parameters control the model's output behavior. Default values work for most use cases. You can also set stop sequences or seed for reproducibility. Function calling and JSON mode are supported.

Understanding token usage and billing

Billing is usage-based with no monthly fees. Prepaid credit covers token consumption. Errors and refusals are free. The context window is 100,000 tokens. Max output is 16,000 tokens. Crypto payments include bonus credits. Top-ups start at $20. Credit never expires. Monitor usage via the dashboard.

cURL

curl https://api.aiuncensoredchat.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "fetch current date and time in utc"}]
  }'

Python

from openai import OpenAI

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

FAQ

What is the uncensored AI API base URL?

The base URL is HTTPS://api.aiuncensoredchat.com/v1. Use this for all requests. It is compatible with standard OpenAI SDKs. No additional routing is required.

How do I handle errors?

Common errors include 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. Check your API key first. Then verify your prepaid balance. Finally, respect the 300 requests per minute limit.

What is the context window size?

The context window is 100,000 tokens for prompt and completion combined. You can send up to 16,000 tokens in the output. Set max_tokens if you need a shorter response.

Get your API key now

Sign up, copy the key, update your base URL. That’s it.

Get API key