Authentication and Base URL
To begin, you need an API key from the dashboard. Our API is fully compatible with the OpenAI SDK ecosystem, requiring only a change to the base URL and your unique key. The base URL is https://api.uncensoredmodel.cc/v1. Your key authenticates all requests, allowing up to 300 requests per minute with a maximum of 8 concurrent requests per key. Keep your key secure; a new key replaces the old one if you generate a new one.
Each account uses one active key at a time. Ensure your client library is configured to point to our specific base URL rather than the default OpenAI endpoint. This ensures your requests are routed to our uncensored model infrastructure.
First Chat Request
Send a standard chat-completions request to generate text. The model ID is uncensored. You can specify a system message to define behavior or keep it simple with user prompts. The model does not refuse lawful adult, fictional, or controversial topics, making it ideal for unrestricted content generation.
Below is a basic cURL example. Replace YOUR_API_KEY with your actual key. This request demonstrates a simple text generation task.
Python SDK Integration
Using the official OpenAI Python library is the most straightforward way to integrate. Set the base_url and api_key attributes before making calls. This approach allows you to leverage existing OpenAI code patterns while benefiting from our uncensored model capabilities.
The example below shows how to initialize the client and send a simple prompt. Ensure you have the openai package installed. This method handles JSON serialization and HTTP transport automatically.
Node SDK Integration
For JavaScript and TypeScript developers, the OpenAI Node SDK works identically. Configure the client with our base URL and your API key. This allows you to integrate uncensored generation directly into your web or backend services without custom HTTP handling.
The following snippet demonstrates initializing the client and sending a request. This is suitable for both server-side Node.js environments and compatible edge runtimes.
Streaming Responses
Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) chunks. Each chunk contains partial text, allowing you to display results in real-time. The final chunk includes the total token usage for the request, which is essential for billing accuracy.
Streaming is useful for user interfaces where immediate feedback is required. Handle the stream events in your client to update the UI incrementally. This reduces perceived latency for long-form generation tasks.
Limits, Errors, and Context
The context window supports 100,000 tokens total (prompt + completion). There is no separate output cap per request, and if max_tokens is unset, the response can run to the end of the window. Requests exceeding 8 MB in body size will be rejected.
Common errors include 401 (invalid key), 402 (insufficient credit), and 429 (rate limit). Credit is charged only for successful token usage; errors and refusals are free. Prepaid credit never expires. If you encounter a double charge, use the Support page for a fix. Credit is not refunded for general use.
cURL
curl https://api.uncensoredmodel.cc/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."}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoredmodel.cc/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.uncensoredmodel.cc/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)