EN ▾
Get API key

How to Use the Uncensored API for NSFW LLM Integration

The uncensored API provides a straightforward, OpenAI-compatible endpoint for developers who need an LLM that answers without content filters. It serves a single uncensored model via standard chat-completions, making it easy to drop into existing codebases for NSFW or roleplay applications.

How to Use the Uncensored API for NSFW LLM Integration

Updated

per 1M input tokens
$0.15
Output tokens / 1M
$0.50
token context
100,000
trial credit
$0.50
requests per minute
300

Key points

  • The API uses a standard OpenAI-compatible endpoint, requiring only a base URL change for existing clients.
  • It serves a single uncensored model with a 100k context window, focusing on raw text generation without extra features.
  • Pricing is prepaid and transparent at $0.15/1M input tokens and $0.50/1M output tokens.
  • Top-ups via crypto (USDT on TRC20, USDC on Base) are the payment methods, with no subscription locks or monthly fees.

No card needed. After sign-up, claim $0.50 of free test credit with one click (once per person).

Get API key

What is the Uncensored API?

The uncensored API is a hosted service that exposes a single, large language model through a standard chat-completions interface. Unlike platforms that aggregate multiple models or offer web-based chat interfaces, this service focuses on providing one high-performance uncensored model for developers who need raw, unfiltered text generation. The model is tuned to answer without content refusals for lawful adult use, making it ideal for roleplay, creative writing, or applications where standard filters might interfere with the output.

It is not a wrapper around GPT, Claude, or Gemini; it is an independent open-weight model running on dedicated servers. This distinction matters because you are getting a consistent behavior profile rather than a routing layer that might switch models unpredictably. The API handles text in and text out, supporting streaming, function calling, and JSON mode, but it does not offer embeddings, image generation, or audio processing.

Why Choose an Uncensored LLM?

Standard LLMs are trained with reinforcement learning from human feedback (RLHF) that often results in over-refusal. They may decline benign prompts related to violence, sexuality, or controversial topics simply because they detect a pattern that triggers a safety filter. An uncensored LLM removes these artificial constraints, allowing the model to generate content based on its training data without arbitrary guardrails. This is particularly valuable for NSFW applications, where the core product is adult content, and for creative writing where the user wants the model to follow the story's logic rather than a corporate safety policy.

  • Consistency: The model does not randomly refuse prompts based on subjective content policies.
  • Raw Output: You get the full range of the model's vocabulary and style without sanitization.
  • Developer Control: You handle moderation yourself if needed, rather than relying on the provider's black-box filters.

OpenAI Compatibility Explained

The uncensored API adheres to the OpenAI Chat Completions specification. This means you can use the official OpenAI SDKs for Python, Node.js, or other languages, and simply change the base URL to https://api.uncensoredaichat.cc/v1. The request structure remains identical: you send a list of messages with roles like user and assistant, and the API returns a completion. This compatibility reduces the friction of integration, as you do not need to write a custom HTTP client or parse a unique JSON format.

The model ID is simply uncensored. You can also list available models via GET /v1/models. Because it follows the standard schema, features like streaming via Server-Sent Events (SSE), function calling (tools), and JSON mode (response_format: {"type": "json_object"}) work out of the box. This makes it a drop-in replacement for many OpenAI-based applications, provided they do not rely on specific model quirks unique to GPT-4 or similar.

Integration Steps

Integrating the uncensored API is straightforward if you are already familiar with OpenAI-compatible clients. First, sign up for an account using Google or an email address. You will receive an API key immediately, which is active upon creation. There is no need for phone verification or credit card entry for the trial, though paid usage requires crypto top-ups.

Next, configure your client. Set the base URL to https://api.uncensoredaichat.cc/v1 and set your API key in the authorization header. Then, make a POST request to /v1/chat/completions with your system prompt and user messages. The API supports standard parameters like temperature, top_p, and stop sequences.

from openai import OpenAI

client = OpenAI(base_url="https://api.uncensoredaichat.cc/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)

Finally, handle the response. The API returns a standard JSON object with the generated text in choices[0].message.content. For long-running tasks, use streaming to receive tokens as they are generated. Remember that the API has a rate limit of 300 requests per minute per key, so implement backoff strategies if you are processing bulk data.

Streaming and Performance

Streaming is supported via Server-Sent Events (SSE). When you set stream: true in your request, the API returns a series of chunks. Each chunk contains a partial response, and the final chunk includes the token usage statistics. This is important for real-time applications like chatbots, where you want to display text as it is generated rather than waiting for the full completion.

Performance is optimized for low latency. The model is hosted on dedicated servers, ensuring consistent response times. However, keep in mind that the uncensored API is a text-only service. It does not support image or audio generation, so if your application requires multimodal outputs, you will need to handle those separately. The streaming endpoint is efficient and does not consume extra tokens beyond what is used for the actual text generation.

Handling Context Windows

The uncensored API supports a context window of 100,000 tokens, which includes both the prompt and the completion. This is significantly larger than the standard 8k or 32k windows found in many other models, allowing you to pass longer conversations or documents without truncation. If you do not specify max_tokens, the response can run to the end of the window.

To manage long contexts effectively, you should implement a sliding window or summarization strategy in your application logic. Send the most recent messages to maintain context, and archive older parts if needed. The API does not automatically manage context for you; it is up to the developer to structure the messages array correctly. This gives you full control over what information the model sees, which is important for maintaining consistency in long-form roleplay or document analysis.

Pricing and Credits

The uncensored API uses a prepaid credit system. There are no monthly subscriptions or hidden fees. You top up your account by crypto, and credits are charged based on real token usage. The pricing is transparent: $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. Errors and refusals are free, so you do not pay for failed requests.

  • Crypto Payments: Top-ups are accepted by crypto (USDT on TRC20, USDC on Base). Minimum top-up is $20, maximum is $500.
  • Bonuses: Top up $50 or more for a 5% bonus, or $100 or more for a 10% bonus.
  • No Expiration: Credits never expire, so you can use them whenever you need them.

You can start with a free trial of $0.50 valid for 7 days, no card required. This allows you to test the API before committing to a crypto top-up. Claim this credit with one click on your API key page.

Common Use Cases

The uncensored API is ideal for applications that require raw, unfiltered text generation. Common use cases include:

  • NSFW Roleplay: Generate adult content without the model refusing based on content policies.
  • Creative Writing: Allow the model to explore darker or more complex themes without artificial constraints.
  • Content Generation: Produce articles, stories, or scripts that might be flagged by standard LLMs.
  • Data Augmentation: Generate diverse text samples for training or testing other models.

Since the API is text-only, it is not suitable for applications requiring image or audio generation. It is also not designed for high-frequency, low-latency tasks that require sub-second response times, as the model is optimized for quality and context length over speed. For most developer applications, however, the uncensored API provides a reliable and flexible foundation.

Questions and answers

Does the uncensored API support multiple models?

No, the uncensored API serves a single uncensored model. This ensures consistent behavior and performance, rather than routing requests to different models with varying capabilities. It is designed for developers who need a specific, filter-free output style.

How do I top up my account?

You can top up your account by crypto (USDT on TRC20, USDC on Base). Top-ups range from $20 to $500, and you can receive bonuses for larger amounts. Credit cards and PayPal are not supported.

Is the context window really 100k tokens?

Yes, the total context window is 100,000 tokens, including both the prompt and the completion. However, the output shares that window, and if you do not specify a limit, the response can run to the end of the window. This allows for long conversations or document processing.

What happens if I make a mistake with my top-up?

Credits do not expire, so you can use them whenever you need them. If you make a mistake, such as a double charge, you can contact support through the Support page to resolve the issue. The credit itself is not refunded, but the error can be corrected.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Start with trial credit

Email and password, key on screen right away.