API Documentation
Start sending requests to our uncensored LLM API in minutes using your prepaid token credit. The endpoint is OpenAI-compatible, so you can switch libraries without rewriting logic.
Quickstart: First request in Python
Send your first completion immediately with the official SDK. This setup connects to our base URL and handles token billing automatically. You only need your API key and the model identifier.
- Install the package via pip.
- Set the environment variable.
- Execute a simple text generation.
from openai import OpenAI
client = OpenAI(base_url="https://api.bestuncensoredaillm.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)
Authentication and Base URL
Authentication uses a standard Bearer token passed in the header. Your base URL points directly to our uncensored inference endpoint. This ensures you bypass generic proxy layers and talk to our specific model.
curl https://api.bestuncensoredaillm.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "list 5 linux commands to kill a process"}]
}'Keep your key secure. Each account supports one active key by default. Regenerate if you suspect exposure.
Chat Completions Endpoint
Use POST /v1/chat/completions for all text generation. The model ID is always uncensored. Input tokens cost $0.15 per million; output tokens cost $0.50 per million. Credit deducts only on successful generation.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.bestuncensoredaillm.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);Errors like missing credits do not consume your balance. This keeps your costs predictable during testing phases.
Parameters: Temperature, Top P, and Tools
Control creativity with temperature and top_p. Higher values yield more diverse outputs. Use tools for function calling. This allows structured data extraction or external API triggers. Set response_format to json_object for strict JSON output.
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)These parameters work exactly like the OpenAI spec. You can reuse your existing configuration logic.
Streaming Responses (SSE)
Receive tokens in real-time via Server-Sent Events. This reduces perceived latency for end-users. The final chunk contains the complete usage statistics. You can stop the stream early if the user interrupts.
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)Streaming does not affect token billing. You pay for the total tokens generated, regardless of how they are delivered.
Rate Limits and Error Codes
Each key allows 300 requests per minute. You can run 8 concurrent requests. If you exceed this, you get a 429 error. Invalid keys return 401. Empty credits return 402. The context window holds 100,000 tokens total. This includes both prompt and completion.
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)Monitor your usage via the dashboard. Credit never expires, so you can pause usage without losing funds.
Common questions
What is the best uncensored AI LLM for quick integration?
Our endpoint serves a single optimized uncensored model. It requires no complex routing logic. You get consistent latency and predictable billing. This makes it ideal for rapid prototyping.
Does the uncensored API support streaming?
Yes, streaming is fully supported via SSE. You receive tokens as they are generated. The final chunk includes usage data. This allows for responsive user interfaces.
How do I handle errors when credits run out?
The API returns a 402 status code. Your existing credit balance remains intact. You can top up via crypto at any time. Errors during generation do not consume tokens.
Get your API key instantly
Register, grab the key, update your base URL. That is the entire process.