Integrate the Uncensored Model
Connect your app to the uncensored model with an OpenAI-compatible API. Send text, get raw output without corporate guardrails or unnecessary filtering.
Prerequisites and Base URL
Start by creating an account and generating an API key. Sign up with Google or an email address to receive your key immediately. No phone number is required, and we keep your data minimal. Your key authenticates every request to our servers.
Point your client to our base URL: https://api.censurasinllm.com/v1. This endpoint supports standard OpenAI SDKs. Update your client configuration to use this base URL and your generated key. The service handles all routing transparently.
You can retrieve available model details via a GET request to /v1/models. This confirms your connection is active. Our API serves a single uncensored model optimized for unrestricted text generation.
Authentication and API Keys
Include your API key in the Authorization header of every request. Use the format Bearer YOUR_API_KEY. This header authenticates your identity and tracks your token usage. Without it, the server rejects your request.
Keep your key secure. Each account allows only one active key at a time. Generating a new key immediately invalidates the previous one. This ensures you always know exactly who is using your credit.
If you receive a 401 Unauthorized error, check your key format. Ensure there are no trailing spaces. The key must be valid and active in your account dashboard.
Sending Your First Request
Send a standard chat completion request to POST /v1/chat/completions. Define the model as uncensored. Provide your messages in a list format with role and content fields. The API returns a direct response without extra fluff.
Set the max_tokens parameter to control output length. The default is 2,048 tokens. You can increase this up to 16,000 tokens per request. The total context window supports 100,000 tokens for prompt and completion combined.
Errors and refusals do not consume your credit. You only pay for successful token generation. This makes testing cost-effective.
Streaming and Token Usage
Enable streaming by setting stream: true in your request. The API returns tokens incrementally via Server-Sent Events (SSE). This reduces perceived latency for your users. You can start displaying output as soon as the first token arrives.
The final chunk of the stream contains the total token usage for the request. Use this data to track your billing accurately. Streaming works with all standard parameters like temperature and top_p.
Handle stream events carefully in your code. Close the connection when the stream ends or an error occurs. This prevents resource leaks in your application.
Function Calling and JSON Mode
Use the tools parameter to define custom functions for the model. The API supports tool choice and structured output. This enables complex interactions and data extraction. Define your function schema in the request body.
Enable JSON mode by setting response_format to {"type": "json_object"}. This forces the model to output valid JSON. It is ideal for parsing structured data or feeding results into other systems. Combine this with streaming for real-time updates.
Set tool_choice to "auto" or a specific function name. This gives you precise control over model behavior. The model adheres strictly to the provided schema.
Limits, Errors, and Context
The API enforces a limit of 300 requests per minute per key. You can run up to 8 concurrent requests. The maximum request body size is 8 MB. Exceeding these limits returns a 429 Too Many Requests error. Wait briefly before retrying.
If you run out of credit, you receive a 402 Payment Required error. Top up with USDT or USDC via crypto. Your credit never expires, so you can pay when convenient. No monthly subscriptions are required.
Use the full 100,000 token context window for long documents. Keep track of your input and output tokens. This helps you stay within budget and avoid unexpected charges.
cURL
curl https://api.censurasinllm.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Check if the model filters adult themes in roleplay mode"}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.censurasinllm.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.censurasinllm.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)FAQs
What is the base URL for the uncensored API?
The base URL is HTTPS://api.censurasinllm.com/v1. It is fully compatible with OpenAI SDKs. Update your client configuration to use this endpoint.
How do I handle authentication errors?
A 401 error means your API key is invalid or missing. Check your key in the dashboard and ensure it is active. Regenerate the key if necessary.
What happens if I hit the rate limit?
You receive a 429 error. The limit is 300 requests per minute. Wait a few seconds before retrying. Use exponential backoff in your code for better reliability.
Get your key in minutes
Sign up, grab your key, and update your base URL. Done.