Authentication & Base URL
Our API uses standard bearer token authentication. You receive your API key immediately after signing up with Google or email on the Get API key page. One active key is permitted per account; generating a new key replaces the previous one.
All requests must target the specific base URL for this hosted service:
https://api.uncensoredllms.top/v1
Include your key in the Authorization header. The model identifier is simply uncensored. This setup works with any OpenAI-compatible client by updating the base URL and API key.
Basic Chat Completion
Send a POST request to /v1/chat/completions with your prompt and system instructions. The model returns text responses without content refusals for lawful adult use. You pay only for tokens processed; errors and refusals are free.
Here is a basic cURL example to get started:
curl https://api.uncensoredllms.top/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 the generated text in choices[0].message.content. Ensure you handle the response appropriately in your application logic.
Python SDK Integration
Using the official OpenAI Python SDK is the most straightforward way to integrate. Initialize the client with our base URL and your API key. The following snippet demonstrates a simple chat completion request.
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoredllms.top/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)Set parameters like temperature or top_p as needed. Remember that the total context window is 100,000 tokens, combining both prompt and completion. Keep your prompts concise to maximize output capacity.
Node SDK Integration
For JavaScript and TypeScript developers, the Node SDK works identically. Configure the base URL to point to our API endpoint. This ensures compatibility with existing OpenAI code structures.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncensoredllms.top/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);This approach allows you to reuse familiar patterns while accessing the uncensored model. Check your prepaid credit balance regularly, as usage is charged per token. No monthly subscription fees apply.
Streaming Responses
Enable streaming by setting stream: true in your request. The API returns a Server-Sent Events (SSE) stream. Each chunk contains partial text, allowing you to display responses in real-time.
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)The final chunk includes token usage statistics. This is useful for monitoring costs. Streaming reduces perceived latency for long responses, improving user experience in developer tools.
Rate Limits & Errors
Each API key is limited to 300 requests per minute and 8 concurrent requests. The request body must not exceed 8 MB. If you exceed these limits, you will receive a 429 status code. Wait briefly before retrying.
Common errors include 401 for invalid keys and 402 for insufficient credit. Context window errors occur if prompt + completion exceeds 100,000 tokens. If max_tokens is not set, the response can run to the end of the window.