EN ▾
Get API key

OpenRouter NSFW: Uncensored LLM API Quickstart

This guide connects a Chat Completions client to one public text-model ID. Start with authentication and a saved request, then check the response format, streaming and errors.

Authentication

Pass the current account key in the Authorization header. Keep it on your server. If you regenerate the key, update affected clients because the old key is revoked. Check available credit before making requests.

Chat Completions Endpoint

Send requests to the base URL https://api.nsfwllmrouter.com/v1 using the standard POST /v1/chat/completions endpoint. This is a text-only interface; we do not support embeddings, images, audio, or video generation. Specify the model as uncensored to ensure you are using our dedicated open-weight model optimized for adult content. Test saved prompts and handle refused or unsuitable replies in your application. It is not GPT, Claude, or any other vendor's model.

curl https://api.nsfwllmrouter.com/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."}]
  }'

The request body must not exceed 8 MB. You can define system, user, and assistant messages just as you would with any OpenAI-compatible client. The model will return text output directly in the response stream.

Python SDK

Use the official OpenAI Python library to integrate quickly. Point the client to our base URL and provide your API key. This approach works for any OpenAI-compatible SDK, allowing you to swap the base URL without changing your application logic. The uncensored model ID ensures you are interacting with our specific uncensored LLM.

from openai import OpenAI

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

Remember that this is a dedicated uncensored api, so you do not need to manage complex routing or select between multiple models. The system handles the inference on our infrastructure. If you need multi-model routing, you would need to build that yourself, but here the choice is fixed to our single optimized model.

Node SDK

For Node.js environments, initialize the OpenAI client with the custom base URL and your API key. This allows you to use standard JavaScript/TypeScript patterns for building AI applications. The client will communicate with our endpoints exactly as expected by the OpenAI specification.

import OpenAI from "openai";

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

Read the generated reply from the choices array, then validate the content or requested structure before use. The HTTP client handles transport; your application handles output checks and unsuccessful requests.

Streaming Responses

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) containing partial chunks of the response. This is useful for real-time interfaces where you want to display text as it is generated. The model supports standard streaming protocols, so you can use existing SSE parsers.

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)

Each chunk contains the incremental text. Aggregate these chunks in your application to construct the full response. Streaming does not affect the token billing; you are charged for the total input and output tokens processed. This feature is supported on the chat/completions endpoint.

Rate Limits and Constraints

Full keys allow 300 requests per minute and 8 concurrent requests; trial keys allow 60 and 2. Handle 429 for rate limiting, 401 for invalid credentials and 402 for insufficient credit. Request bodies are limited to 8 MB; combined input and output must fit within 100,000 tokens.

What the API supports

Use this table to decide whether the API fits your project before you buy credit.

FeatureSupport
CompatibilityOpenAI Chat Completions schema; official openai SDKs work unchanged
EndpointsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.nsfwllmrouter.com/v1
API keyAuthorization: Bearer YOUR_KEY
Model IDuncensored
Completion lengthprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Structured outputresponse_format: {"type": "json_object"}
SSE streamingYes — server-sent events; the last chunk carries token usage
Sampling parameterstemperature, top_p, stop, seed and the two penalties are passed through
Context window100,000 tokens (prompt + completion together)
Function callingSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Request size8 MB request body
Requests per minute300/min per key
Concurrency8 requests at the same time per key
Credit expiryno monthly fee; paid credit does not expire
Paymentcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Volume bonus+5% on $50+, +10% on $100+, +15% on $200+
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Trial credit$0.50 of credit valid 7 days, no card needed · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
Billingpay as you go from prepaid credit; nothing is charged for failed or refused requests
Sign-insign in with Google or with e-mail + password
Keysone key per account, regenerate any time (the old one stops working)
Contentadult content allowed; sexual content involving minors is refused

HTTP errors

Every error is JSON with a type you can switch on. You are never charged for an error.

CodeTypeMeaning
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedno key, wrong key, or a key replaced by a newer one
402no_creditout of credit; add credit and retry
403content_blockedsexual content involving minors — refused, not billed
404not_foundunknown endpoint
413request_too_largebody over 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busytemporary overload, retry shortly

Questions and answers

Is this an OpenRouter reseller?

No, we are an independent service running our own uncensored model on our own GPU servers. We are not an official partner or reseller of OpenRouter, though our API is OpenAI-compatible. We do not route between other vendors' models.

What is the context window size?

The context window is 100,000 tokens, which includes both the input prompt and the output completion. This allows for long conversations or large document processing within a single request.

Do you support JSON mode?

JSON object mode is supported through response_format. It controls the output format, not factual accuracy or conformance to your application’s schema. Parse the response and validate required fields before using it.

Your key is one form away

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

Get API key