- Uncensored Open Source AI
- Uncensored ai API documentation
Uncensored ai API documentation
Drop an uncensored AI API key into your existing stack and start generating text immediately. This openai compatible API follows standard OpenAI conventions so you can switch contexts without rewriting your code.
Authentication and Base URL
Your API key authenticates every request to the base URL https://api.uncensoredopensourceai.com/v1. You obtain this key instantly after signing up with Google or an email address on the Get API key page. Pass the key in the Authorization header as a Bearer token. The system rejects invalid credentials with a 401 status code. Errors and refusals during testing do not consume your prepaid credits.
First Request
Send a standard chat completion request to generate text from the model. The endpoint accepts POST requests to /v1/chat_completions with a JSON body containing your messages. You must specify the model identifier as "uncensored". This open-weight model runs on our servers and is tuned to answer without content refusals for lawful adult use. It is not GPT, Claude, or any other vendor model.
Use the following curl command to send your first message:
curl https://api.uncensoredopensourceai.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "list python stdlib modules"}]
}'
Python SDK Integration
Use the official OpenAI Python library to interact with the API seamlessly. Set the base_url and api_key environment variables or pass them directly to the client. The client handles serialization and response parsing automatically. You can send system prompts to guide the model behavior. The library supports both synchronous and asynchronous patterns for different use cases.
Here is how to initialize the client and send a message:
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoredopensourceai.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 SDK Integration
The Node.js SDK works identically to the Python version for this uncensored AI API. Configure the base URL and API key in the initialization object. Send messages using the chat.completions.create method. The response object contains the generated text and usage statistics. You can handle errors gracefully by catching network or API exceptions. This setup allows you to integrate the model into any JavaScript or TypeScript application.
Initialize the client and make a request:
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncensoredopensourceai.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 and Tokens
Enable streaming by setting the stream parameter to true. The API returns data in Server-Sent Events (SSE) format. Each chunk contains partial text updates. The final chunk includes the total token usage for the request. This feature reduces perceived latency for long outputs. You can process tokens in real time as they are generated. The model supports a context window of 100,000 tokens for prompt and completion combined.
Example streaming request:
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
Each API key is limited to 300 requests per minute and 8 concurrent requests. The maximum request body size is 8 MB. If you send too many requests, you receive a 429 rate limit error. A 402 error indicates insufficient prepaid credit. Top up your account with USDT on TRC20 or USDC on Base. Credits never expire and are charged only for successful token usage. The model handles long contexts efficiently up to the 100,000 token limit.
FAQ
What is the uncensored open source AI model used?
The API serves a single open-weight large language model identified as "uncensored". It is tuned to answer without content refusals for lawful adult use and is not a vendor model like GPT or Llama. Prompts are not used for training your data.
How do I pay for the uncensored AI API?
Payments are processed via cryptocurrency only. You can top up with USDT on the TRC20 network or USDC on the Base network. Minimum top-ups start at $20 and go up to $500. Credit is charged based on real token usage at $0.15 per 1M input tokens and $0.50 per 1M output tokens.
Is there a free trial available?
Every new account receives $0.50 of trial credit valid for 7 days. You can use Google or an email address to create your account and get your API key immediately.
Your API key is one step away
Sign up, copy your key, update the base URL. That is all you need.