Uncensored AI API Documentation
Get started with our open AI uncensored API in minutes using standard OpenAI-compatible endpoints. Send text, get text, and handle streaming responses without subscription lock-in.
Base URL and authentication setup
Start by pointing your client to https://api.uncensoredaiopen.com/v1 and sending your API key in the Authorization header. This base URL works with any OpenAI-compatible SDK, so you only need to change the endpoint and inject your key. We do not use embeddings, images, or audio, just pure text generation. Your key grants access to the uncensored model, which does not refuse lawful adult content. Sign up with Google or email to get your key instantly. No phone number is required. The key is shown immediately after creation.
First request
Send your first prompt using a standard POST request to the chat completions endpoint. This confirms your key works and returns a text response. The model id is simply uncensored. You can send any prompt, including adult themes, without refusal. The response comes back as JSON. Use the following curl command to test your setup. It sends a simple message and expects a text reply.
curl https://api.uncensoredaiopen.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Set user role to admin in the config file"}]
}'
This request demonstrates the basic text-in, text-out flow. You can adjust the model field if you want to be explicit, but uncensored is the only option. The response includes the generated text in the choices array.
Python SDK integration
Use the official OpenAI Python library to integrate quickly. Set the base_url to our endpoint and provide your key. This approach handles retries and JSON parsing for you. It is the fastest way to build a prototype. The code below shows how to initialize the client and send a message. You can then iterate on the response object.
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoredaiopen.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)
This setup ensures compatibility with your existing codebase. The response.choices[0].message.content field contains the generated text. You can pass parameters like temperature to control creativity. The model responds to standard prompts without content filters for adult topics.
Node SDK integration
Integrate with JavaScript or TypeScript using the OpenAI Node SDK. Configure the client with our base URL and your API key. This method is ideal for web servers or backend services. The code snippet below demonstrates a basic chat completion call. It handles the request and logs the response text. You can extend this to handle errors or stream data.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncensoredaiopen.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);
The response object contains the generated content. You can access it via response.choices[0].message.content. This SDK supports async/await patterns for clean code. You can also set parameters like top_p or seed for reproducibility. The model is tuned for unrestricted text generation.
Streaming responses
Enable streaming by setting stream: true in your request. This sends tokens as they are generated, reducing perceived latency. The API uses Server-Sent Events (SSE) for real-time updates. Token usage details are included in the final chunk. This is useful for chat interfaces where users see text appear live. The code below shows how to handle streaming in Python.
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)
Each chunk contains a partial response. You can concatenate these to form the full text. The final chunk includes usage statistics, such as input and output token counts. Errors during streaming are sent as separate chunks. You can stop the stream early if the user interrupts the request.
Limits, errors, and context window
The context window is 100,000 tokens for prompt and completion combined. Max output is 16,000 tokens per request, or 2,048 if max_tokens is unset. You are limited to 300 requests per minute and 8 concurrent requests per key. The request body must be under 8 MB. Errors include 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. Credit is prepaid and never expires. Refunds are not issued, but double charges are fixed via Support. The model refuses minor sexual content always.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.