Get Started with the Uncensored API
Start using the uncensored API in minutes. This quickstart guides you through authentication, sending your first request, and handling real-time streaming with standard OpenAI-compatible tools.
Install the OpenAI SDK
Open source SDKs handle the HTTP details for you. Install the official package in your project environment. This library manages retries and JSON parsing automatically.
pip install openai
Configure Your Base URL and Key
Point your client to our specific endpoint. The base URL ensures your prompts reach our uncensored model cluster. Authentication relies on a simple bearer token.
- Base URL:
https://api.aimodelswithnorestrictions.com/v1 - Key: Your generated API key
from openai import OpenAI
client = OpenAI(base_url="https://api.aimodelswithnorestrictions.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)
Send a Basic Chat Completion
Send a standard message payload. The model returns raw text without filtering for adult or controversial topics. Errors and refusals do not consume your prepaid tokens.
curl https://api.aimodelswithnorestrictions.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Summarize the current weather conditions in Tokyo"}]
}'
Enable Streaming for Real-Time Output
Receive tokens as they are generated. This reduces perceived latency for long responses. You can parse the stream to display text incrementally in your application.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.aimodelswithnorestrictions.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);
Set Parameters: Temperature and Top P
Control creativity and randomness. Lower values make responses more deterministic. Higher values encourage diverse and varied phrasing.
temperature: Adjusts randomness.top_p: Filters vocabulary by probability.
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)
Handle JSON Mode and Function Calling
Force structured output for reliable parsing. Use response_format: {"type": "json_object"} for strict JSON. Function calling allows the model to execute tools dynamically.
curl https://api.aimodelswithnorestrictions.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Summarize the current weather conditions in Tokyo"}]
}'Frequently asked questions
What is the context window and rate limit?
The context window supports 100,000 tokens total. You are limited to 300 requests per minute per key. Each key allows eight concurrent requests.
Why do I get a 402 error?
A 402 status indicates your prepaid credit is exhausted. Tokens are charged only for actual usage, not for errors or refusals. Top up via crypto to continue.
Is this an official OpenAI service?
No. We provide an uncensored LLM compatible with the OpenAI API format. The model is not GPT, Claude, or any other vendor's model. It is a distinct open-weight model.
Secure your API key
Register, copy your key, update the endpoint. That is all.