Uncensored ai API Reference
Start generating uncensored text with our OpenAI compatible API in minutes. Use prepaid crypto credit to pay strictly per token without monthly subscriptions.
Authentication & Base URL
Connect to our dedicated uncensored LLM API by updating your client configuration. Set the base URL to HTTPS://api.uncensoredaipremium.com/v1 and provide your API key in the Authorization header. This endpoint works with any standard OpenAI-compatible SDK, ensuring you can switch providers without changing your code structure. You receive one active key per account, and you can generate a new key immediately if needed via the dashboard.
Quickstart: First Request
Make your first call to the chat completions endpoint to verify connectivity. Send a POST request to /v1/chat/completions with your model ID set to "uncensored". The API returns text responses that do not refuse lawful adult or controversial topics. Use the following example to test your integration quickly.
curl https://api.uncensoredaipremium.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Summarize the previous three messages in one line"}]
}'
Python SDK Integration
Use the official OpenAI Python library to interact with our uncensored AI API. Initialize the client with your API key and the correct base URL. This approach allows you to leverage existing libraries for parameter management and response handling. It is the preferred method for backend services and indie developers building NSFW applications.
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoredaipremium.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 Setup
Integrate the API into your Node.js applications using the official SDK. Configure the base URL and API key in your environment variables. This setup supports both synchronous calls and streaming responses. It is ideal for serverless functions or real-time chat interfaces requiring low latency.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncensoredaipremium.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 & SSE Usage
Enable streaming by setting stream to true in your request parameters. The API returns Server-Sent Events (SSE) tokens in real-time. Token usage and final completion data appear in the last chunk. This feature reduces perceived latency for end-users in roleplay or chat applications.
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 & Context
Our API supports a 100,000 token context window for both prompt and completion. You are limited to 300 requests per minute and 8 concurrent requests per key. Errors include 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. Requests that result in refusals due to minor content laws still consume no tokens.
Frequently asked questions
How does prepaid crypto credit work with the uncensored AI premium API?
You top up with USDT (TRC20) or USDC (Base) in amounts between $20 and $500. Credit never expires and is charged only for actual token usage, with errors being free. You receive bonus credit based on your top-up amount.
What is the difference between this uncensored LLM online service and others?
We use a single dedicated open-weight model on our own servers, avoiding routing delays. Unlike subscription platforms, we charge strictly per token with no monthly fees. The model is tuned for lawful adult content without unnecessary refusals.
Can I use this uncensored AI API for function calling?
Yes, the API supports function calling, JSON mode, and standard parameters like temperature and top_p. You can define tools in your request and receive structured JSON responses directly from the uncensored model.
Get your API key now
Register, copy the token, update your base URL. That is all you need to do.