Direct uncensored LLM API for devs

Begin with trial credits

Enter email and password; your key appears immediately.

Try with trial credit
Base URL
https://api.nsfwopenrouter.com/v1
Model
uncensored

API Quickstart: Chat Completions

Start building with our uncensored LLM API in minutes. This guide covers authentication, request structures, and streaming for your NSFW chatbot or roleplay app.

Base URL
https://api.nsfwopenrouter.com/v1
Model
uncensored

Authentication & Base URL

Your API key authenticates every request. Use the Authorization header with the Bearer scheme. Your base URL is https://api.nsfwopenrouter.com/v1. This URL works with any OpenAI-compatible SDK. You do not need a subscription. You pay only for tokens used. Errors and refusals incur no charge. Sign up via Google or email to receive your key instantly.

Sending a Chat Completion Request

Send a POST request to /v1/chat/completions. The model ID is always uncensored. Provide your system prompt to define behavior. Include user messages in the messages array. The API returns text output directly. No complex routing occurs. Traffic goes straight to our servers. This ensures consistent NSFW handling without upstream filters.

Handling Streaming Responses

Enable streaming by setting stream to true. The API returns Server-Sent Events (SSE). Each chunk contains partial text. Token usage details appear in the final chunk. This reduces perceived latency for users. It allows real-time display of generated content. Handle errors within the stream logic. Discard incomplete chunks on failure.

Configuring Model Parameters

Adjust temperature for creativity. Use top_p for nucleus sampling. Set max_tokens to limit output length. The default max is 2,048 tokens. You can request up to 16,000 tokens per request. The context window supports 100,000 tokens total. This includes both prompt and completion. Fine-tune these settings for your specific roleplay needs.

Enforcing JSON Mode

Use response_format with {"type": "json_object"}. The model guarantees valid JSON output. This structure is essential for programmatic integration. Parse the response directly into your application objects. Avoid regex parsing for reliability. This feature ensures consistent data extraction. It works seamlessly with standard SDKs.

Understanding Tool Calls

Define tools in the request body. The model can return structured function calls. Use tool_choice to force specific behaviors. This enables dynamic agent workflows. The API supports standard OpenAI tool formats. Parse the tool_calls array in the response. Execute functions and feed results back. This allows complex multi-step interactions.

cURL

curl https://api.nsfwopenrouter.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Run my unit tests and show results"}]
  }'

Python

from openai import OpenAI

client = OpenAI(base_url="https://api.nsfwopenrouter.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.js

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.nsfwopenrouter.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

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)

Common questions

What is the NSFW openrouter alternative for direct uncensored access?

Our API provides direct access to an uncensored model without OpenRouter’s routing layers. You get consistent NSFW output without upstream filters interfering. This is ideal for roleplay apps needing reliable adult content generation.

Why am I getting 402 errors?

A 402 error indicates insufficient prepaid credit. Tokens are charged only after successful processing. Add crypto credit to your account to resume service. Credit never expires, so you can top up later.

How does the 100,000 token context window work?

The 100,000 token limit applies to the sum of input and output tokens. You can send large prompts and receive long responses. The max single response is 16,000 tokens. Manage your history to stay within this window for optimal performance.

Get your API key instantly

Sign up, retrieve your key, update the base URL. That is it.

Try with trial credit