What Is the uncensored.chat api?
The uncensored.chat api is a hosted service designed for developers who need reliable text generation without content filters. It serves a single open-weight large language model through standard OpenAI-compatible endpoints. This means you can use existing SDKs and client libraries with minimal changes, simply by updating the base URL and API key.
Unlike multi-model marketplaces, this service focuses on one thing: delivering uncensored responses for lawful adult use, fictional content, or security research. The model is tuned to avoid refusals for controversial or NSFW topics, though it does enforce a hard limit on sexual content involving minors.
The API supports text-in, text-out interactions, making it suitable for chatbots, content generation tools, and research applications. It does not offer embeddings, image, audio, or video generation, keeping the focus purely on text completion. This simplicity reduces complexity and ensures consistent performance for your application.
Why Choose an Uncensored API for NSFW?
Standard LLMs often refuse content that is legal but falls outside mainstream norms, such as explicit fiction, adult themes, or edgy humor. The uncensored chat api addresses this by serving a model specifically tuned to answer without these refusals. This is important for applications where content filtering disrupts the user experience or limits creative freedom.
By using a dedicated uncensored model, you avoid the unpredictability of routing through multiple vendors with varying filter strengths. The service provides a consistent output style, ensuring that your application behaves uniformly regardless of traffic spikes or model updates. This reliability is key for production environments where content consistency matters.
Additionally, the prepaid token billing model means you only pay for what you use, with no subscription fees. Errors and refusals (like the minor content limit) are free, so you are not charged for every request. This transparency helps you control costs while building NSFW-tolerant applications.
Setting Up Your First Request
Getting started requires an API key, which you can obtain by signing up with Google or an email address on the 'Get API key' page. No phone number is needed, and the key is shown immediately. Use the base URL https://api.unfilteredchat.top/v1 and set the model ID to 'uncensored' in your requests.
The API supports standard OpenAI endpoints like POST /v1/chat/completions and GET /v1/models. You can test connectivity with a simple curl command:
curl https://api.unfilteredchat.top/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Write a blunt product review of a cheap VPN."}]
}'Ensure your SDK is configured to use the new base URL. The model accepts text input and returns text output, supporting parameters like temperature, top_p, and stop sequences. This setup allows you to integrate uncensored capabilities into your existing workflow with minimal code changes.
Configuring Parameters for Better Output
The API supports several parameters to control text generation, including temperature, top_p, stop, seed, presence_penalty, and frequency_penalty. Adjusting these allows you to fine-tune the creativity and determinism of the model's responses.
- Temperature: Controls randomness. Lower values make outputs more focused, while higher values increase creativity.
- Top_p: Limits the model to consider only the top percentage of probability mass.
- Stop: Specifies sequences where the API will stop generating further tokens.
- JSON Mode: Use
response_format: {"type": "json_object"}to ensure structured output.
The context window is 100,000 tokens, combining prompt and completion. There is no separate output cap, and if max_tokens is not set, the response can run to the end of the window. These limits help manage costs and performance.
Handling Streaming Responses
The API supports streaming responses via Server-Sent Events (SSE). This allows you to receive tokens as they are generated, improving perceived latency for end-users. Streaming is particularly useful for chat applications where real-time feedback is expected.
Each chunk in the stream contains partial text and metadata. The final chunk includes token usage details, allowing you to track costs accurately. Ensure your client handles SSE correctly to avoid buffering delays.
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)Streaming does not change the billing model; you are still charged based on total tokens used. This feature enhances user experience without adding complexity to your billing logic.
Implementing Function Calling
The API supports function calling, allowing the model to invoke tools based on user input. You can provide a list of functions with their schemas, and the model will return a structured response indicating which function to call and with what arguments.
Use the tools parameter to define available functions and tool_choice to control whether the model must call a function or can respond directly. This is useful for building assistants that can interact with external services or perform specific tasks.
from openai import OpenAI
client = OpenAI(base_url="https://api.unfilteredchat.top/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)Function calling works within the same context window limits. Ensure your function schemas are well-defined to maximize the model's accuracy. This feature adds versatility to your application without requiring additional endpoints.
Understanding Rate Limits
The API enforces rate limits to ensure fair usage: 300 requests per minute per key and 8 concurrent requests per key. The request body size is limited to 8 MB. These limits are designed to prevent abuse while allowing high-throughput applications.
If you exceed these limits, you will receive a 429 error. Plan your application's concurrency accordingly, especially if you are processing large batches of requests. The 100k context window means that larger prompts may consume more of your rate limit budget.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.unfilteredchat.top/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);Rate limits are per key, and each account has one active key. If you need to replace a key, the old one becomes inactive. Monitor your usage to stay within these bounds and avoid service interruptions.
Billing and Token Costs
Billing is prepaid and token-based. The cost is $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. You are charged for real token usage, with errors and refusals being free. There are no subscription fees or monthly charges.
Top-ups are by crypto (USDT on TRC20, USDC on Base) in whole amounts from $20 to $500. Bonus credit is available: +5% for $50+, +10% for $100+, and +15% for $200+. Paid credit never expires, providing flexibility for long-term projects.
curl https://api.unfilteredchat.top/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Write a blunt product review of a cheap VPN."}]
}'New accounts receive $0.50 in trial credit valid for 7 days, with no card needed. This allows you to test the API before committing to a top-up. Claim this credit with one click on your API key page. Credits are not refunded, but double charges can be resolved via the Support page.
Troubleshooting Common Issues
If you encounter errors, check the following:
- 401 Unauthorized: Verify your API key and ensure it is active.
- 429 Too Many Requests: You have exceeded the rate limits. Reduce concurrency or wait.
- 400 Bad Request: Check your payload for syntax errors or invalid parameters.
- Content Refusal: Requests involving sexual content with minors are always refused.
Ensure your client handles streaming and function calling correctly. If issues persist, use the Support page for assistance. The API does not offer SLAs or certifications, so plan for potential variability in uptime.
