Uncensored AI API Documentation
Integrate our uncensored LLM with a single API call. This guide shows developers how to send requests and receive streaming text using standard OpenAI-compatible tools.
Quickstart: First Request to Uncensored AI
Send your first prompt immediately using the standard chat endpoint. Point your client to the base URL https://api.aiunrestrict.com/v1 and include your API key in the header. The model identifier is strictly uncensored. This configuration works with any OpenAI-compatible SDK without modification.
- Base URL:
https://api.aiunrestrict.com/v1 - Model ID:
uncensored - Auth: Bearer token in
Authorizationheader
We charge only for tokens consumed. Errors do not cost credit. Refusals are free.
Most developers find this setup works out of the box with existing pipelines.
curl https://api.aiunrestrict.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Send me the current weather in Tokyo"}]
}'
Authentication and API Key Management
Use your single API key for all requests to the uncensored AI endpoint. You generate this key on the dashboard after signing up via Google or email. Each account holds exactly one active key. Generating a new key invalidates the previous one immediately. This simplifies credential rotation for long-running agents.
Keep your key secure. It grants full access to your prepaid credit. Crypto tops up your account. USDT on TRC20 or USDC on Base works. Minimum top-up is $20. Maximum is $500. You receive bonus credit on larger deposits. Your data stays private. Prompts are not used for training. We do not track your identity beyond the email address. Privacy matters for NSFW content pipelines. Use this key to authenticate every call. The header format is standard. Bearer tokens are familiar. Security is straightforward. No complex setup steps. No phone numbers required. Just sign up and start coding. The key appears instantly. Copy it now. Store it securely. Use it in your headers. That is all you need to begin.
Endpoints: Chat Completions and Models
Interact with two endpoints: POST /v1/chat/completions and GET /v1/models. The chat endpoint processes text input and returns text output. The models endpoint lists available models. We host one model. It is tuned for uncensored responses. No embeddings. No image generation. No audio or video processing. Just text completion. This keeps the service focused. Speed remains high. Latency stays low. You pay only for tokens used. Input tokens cost $0.15 per million. Output tokens cost $0.50 per million. Credit never expires. Errors are free. Refusals are free. This pricing model favors heavy usage. Long context windows fit within 100,000 tokens. Max output is 16,000 tokens per request. Set max_tokens to avoid hitting the limit. Default output is 2,048 tokens. Adjust this value based on your use case. Streaming helps manage large responses. JSON mode ensures structured output. Function calling allows tool use. Temperature controls randomness. Top-P controls diversity. Stop sequences halt generation. Seed ensures reproducibility. Presence penalty reduces repetition. Frequency penalty adjusts word usage. These parameters give you full control. Fine-tune your agent behavior. Test different settings. Find the right balance. Document your preferred configurations. Share them with your team. Iterate quickly. Deploy confidently. The API supports standard OpenAI formats. Migration is easy. Code reuse is high. Efficiency is maximized. Focus on your product logic. Let the API handle the rest.
from openai import OpenAI
client = OpenAI(base_url="https://api.aiunrestrict.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)
Streaming Responses and Token Usage
Enable streaming by setting stream: true in your request. Receive tokens incrementally via Server-Sent Events. This reduces perceived latency for users. You can display text as it generates. The final chunk contains the total token usage. Read this value to track costs accurately. Streaming works with all parameters. Function calling streams tool calls. JSON mode streams partial objects. Temperature and top-p apply per chunk. Stop sequences end the stream. Errors interrupt the stream. Handle these cases gracefully. Retry logic should account for partial responses. Store intermediate states if needed. This approach suits chat interfaces. It feels responsive. Users see progress. They wait less. The API supports concurrent streams. Rate limits apply per key. Monitor your usage. Adjust concurrency as needed. Balance speed with cost. Optimize your pipeline. Test under load. Ensure stability. Stream efficiently. Deliver value quickly.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.aiunrestrict.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);
Parameters: Temperature, Top-P, and JSON Mode
Control generation behavior with standard parameters. Set temperature for randomness. Lower values produce deterministic output. Higher values increase creativity. Use top_p for nucleus sampling. This limits vocabulary diversity. Combine these for fine-grained control. Enable JSON mode with response_format: {"type": "json_object"}. The model returns valid JSON. Parse this directly in your code. This suits function calling. It structures data cleanly. Avoid parsing errors. Validate outputs when needed. Use stop sequences to halt generation. Define custom terminators. Use seed for reproducibility. Set the same seed for identical outputs. This aids debugging. Track presence_penalty and frequency_penalty to reduce repetition. Adjust these for stylistic consistency. Test different combinations. Document your settings. Share configurations with your team. Iterate rapidly. Deploy confidently. The API supports all standard OpenAI parameters. Migration is straightforward. Code reuse is high. Efficiency is maximized. Focus on your product logic. Let the API handle the rest.
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)
Error Handling and Refusal Behavior
Handle errors gracefully. Return 401 for invalid keys. Check your API key. Ensure it is active. Return 402 for insufficient credit. Top up your account. Use crypto. USDT on TRC20 or USDC on Base. Minimum $20. Maximum $500. Return 429 for rate limits. Wait and retry. Limit is 300 requests per minute. Concurrency is 8 requests simultaneously. Request body max is 8 MB. Context window is 100,000 tokens. Max output is 16,000 tokens. Errors are free. Refusals are free. Pay only for tokens. Credit never expires. Mistakes like double charges are fixed via Support. Refunds are not issued. Credit remains in your account. Use it wisely. Monitor your usage. Adjust concurrency as needed. Balance speed with cost. Optimize your pipeline. Test under load. Ensure stability. Handle errors programmatically. Log responses. Retry with backoff. Alert on critical failures. Maintain service reliability. Deliver value consistently.
Technical support
How do I top up my uncensored AI credit?
Send crypto to the addresses provided in your dashboard. We accept USDT on TRC20 and USDC on Base. Minimum deposit is $20. Maximum is $500. Bonuses apply for larger amounts.
Is this uncensored AI suitable for NSFW chatbot development?
Yes. The model is tuned to return adult content without filtering for lawful use. It does not refuse controversial or fictional topics. The only hard limit is sexual content involving minors. This makes it ideal for unrestricted roleplay agents.
What is the context window for the uncensored AI model?
The context window is 100,000 tokens for prompt and completion combined. You can output up to 16,000 tokens per request. If you do not set max_tokens, the default output is 2,048 tokens.
Secure your API key
Register, retrieve your key, and point your base URL. Zero configuration.