Quickstart: Uncensored LLM API
Start building with our uncensored prompt API in minutes using standard OpenAI-compatible tools. This guide covers client initialization, request structure, and streaming for rapid integration.
Prerequisites and Installation
Install the official SDK for your preferred language and configure your environment variables. Our API behaves exactly like the standard OpenAI endpoint, so you can swap libraries without rewriting logic. We use standard headers and do not require custom packages. You only need a valid API key from the dashboard.
Initialize the Client
Configure the base URL to point directly to our hosted service. The standard endpoint does not work here because we are an independent provider. You must specify the base URL explicitly in your client configuration. This ensures all requests route through our uncensored model infrastructure.
Python Configuration
Set the base URL and API key before making any calls. This setup works with Python 3.8+.
from openai import OpenAI
client = OpenAI(base_url="https://api.promptuncensored.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 Configuration
Use the official Node client to initialize the connection. Ensure you pass the correct base URL string.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.promptuncensored.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);
Make Your First Request
Send a standard chat-completions POST request with your model ID set to uncensored. This model accepts any lawful input without filtering adult or controversial topics. The response returns a complete text block. You can test connectivity with a simple curl command.
curl https://api.promptuncensored.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "What is the capital of France?"}]
}'
Handle Streaming Responses
Enable streaming by setting stream: true in your request body. This returns data via Server-Sent Events (SSE) as tokens are generated. Use this for real-time UI updates or to display progress. The final chunk contains the total token usage statistics. This approach reduces perceived latency for large outputs.
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)
Configure Parameters for Best Results
Adjust parameters like temperature, top_p, and seed to control creativity. Higher temperatures yield more diverse text, while lower values ensure consistency. The model supports standard function calling and JSON mode. You can enforce strict output formats using response_format. These controls help you fine-tune the uncensored behavior for your specific use case.
Understand Token Usage and Limits
The context window supports 100,000 tokens for prompt and completion combined. You can generate up to 16,000 tokens per request. Rate limits cap at 300 requests per minute per key. Errors like 401 indicate an invalid key, while 402 means you need more credit. 429 signals you hit the rate limit. Unused credit never expires.
Frequently asked questions
Is this an uncensored prompt API?
Yes, our API serves a single uncensored model that does not refuse lawful adult or controversial topics. It is not GPT, Claude, or any other vendor's model. You get direct access to an uncensored LLM API with transparent pricing.
What happens if I get a 402 error?
A 402 error indicates you have insufficient prepaid credit. You must top up using USDT or USDC to continue making requests. Errors during processing are free, so you only pay for successful completions.
Does the API support streaming?
Yes, you can enable streaming by setting the stream flag to true. The API returns token-by-token updates via SSE. This allows you to display text in real-time as it is generated. The final chunk includes the total token usage for billing.
Get your API key instantly
Sign up, copy the key, and update your base URL. That’s all it takes.
Claim trial key