API Quickstart Guide
Start building with our uncensored AI chatbots API using standard OpenAI-compatible endpoints. This quickstart guides you from authentication to streaming responses with concrete examples.
Authentication: using your API key
Your API key authenticates every request to the endpoint. Generate it instantly via Google sign-in or email on the key page without phone verification. The key appears immediately after creation and remains your sole credential for the account.
Include the key in the Authorization header as a Bearer token. Keep it secure, as it grants full access to your prepaid credit. You may replace an old key with a new one, but only one key is active per account at any time.
Base URL and endpoint structure
The base URL points to our hosted service and mirrors the standard OpenAI structure for compatibility. Use https://api.unrestrictedaichatbots.com/v1 as your base and target /chat/completions for text generation. We do not offer embeddings, images, audio, or video endpoints, so direct your requests to the chat completion path only.
Query parameters like model are passed in the request body, not the URL. This structure ensures your existing OpenAI SDKs work with minimal configuration changes.
Sending your first chat completion
Send a POST request to /v1/chat/completions with the model ID uncensored. This model responds to lawful adult, fictional, and controversial topics without standard refusals. You can specify parameters like temperature and top_p to control creativity.
curl https://api.unrestrictedaichatbots.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "What is the output of 2 plus 2"}]
}'
Handling streaming responses (SSE)
Enable streaming by setting stream: true in your request body. The server returns Server-Sent Events (SSE) for each token generated, allowing real-time display. The final chunk contains the complete token usage statistics for billing accuracy.
This approach reduces perceived latency for users and is essential for interactive roleplay or code generation workflows. Configure your SDK to handle the stream events appropriately.
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)
Configuring parameters: temperature, top_p, and seed
Control the model's output behavior using standard LLM parameters. Set temperature for randomness, top_p for nucleus sampling, and seed for reproducible results. These parameters apply to the uncensored model just as they do to other major LLMs.
Use response_format with json_object to force structured output for reliable parsing. Function calling is also supported via the tools parameter for extensible applications.
from openai import OpenAI
client = OpenAI(base_url="https://api.unrestrictedaichatbots.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)
Understanding token usage and billing
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.unrestrictedaichatbots.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);You are charged based on real token consumption, with errors and refusals billed at zero. Input tokens cost $0.15 per million, and output tokens cost $0.50 per million. Your prepaid credit never expires, and you can top up with USDT or USDC starting at $20. Bonus credit ranges from +5% to +15% based on your top-up amount.
Technical FAQs
What is the context window size for the uncensored model?
The model supports a context window of 100,000 tokens, combining both prompt and completion. You can generate up to 16,000 tokens per request, or 2,048 if you do not specify a max_tokens value.
How do I handle rate limits and errors?
You are limited to 300 requests per minute and 8 concurrent requests per key. A 401 error indicates an invalid key, 402 means your prepaid credit is exhausted, and 429 signals that you have exceeded the rate limit.
Is the uncensored AI API compatible with OpenAI SDKs?
Yes, it is fully OpenAI-compatible. You can use the official OpenAI SDKs for Python, Node.js, or any other language by simply changing the base URL and API key in your configuration.
Generate your API key
Register, retrieve your key, and update the base URL. That is the complete configuration.
Try with trial credit