API Documentation for the uncensored model
Get your uncensored AI API key and start generating text in seconds. This documentation covers the base URL, authentication, and all endpoints you need to integrate our LLM into your projects.
Base URL and authentication
Start by setting your base URL to HTTPS://api.storyuncensored.com/v1 and adding your API key to the Authorization header.
Sign up with Google or email to receive a key instantly. Use the header Authorization: Bearer YOUR_API_KEY for every request.
First request
Make a POST request to /v1/chat/completions with the model set to uncensored.
Send your system prompt and user messages to get started.
curl https://api.storyuncensored.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Generate a summary of chapter five focusing on plot points"}]
}'
Python SDK example
Use the official OpenAI Python SDK to interact with the API.
Set the base_url to our endpoint and the API key in your client configuration.
from openai import OpenAI
client = OpenAI(base_url="https://api.storyuncensored.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 SDK example
Initialize the OpenAI client in Node.js with our base URL.
Pass the uncensored model ID to the chat.completions.create method.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.storyuncensored.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 responses with SSE
Enable streaming by setting stream: true in your request body.
Receive token-by-token updates via Server-Sent Events. The final chunk includes usage data.
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)
Limits, errors, and context window
The context window supports 100,000 tokens total. Handle 401 for invalid keys, 402 for no credit, and 429 for rate limits.
Max output is 16,000 tokens per request. Rate limit is 300 requests per minute.
Common questions
What is the uncensored story API?
It is a hosted, OpenAI-compatible chat-completions API serving one uncensored large language model. You send text in and receive text out, with no content refusals for lawful adult use.
How do I pay for the uncensored AI API?
You top up with crypto only, specifically USDT (TRC20) or USDC (Base). Prepaid credit is charged by real token usage, and errors are free.
Can I use the uncensored AI online for roleplay?
Yes, the model is tuned to answer without content refusals for lawful adult use. It supports streaming and function calling for robust integration.
Get your key now
Register, copy your key, update the endpoint URL. Done.