EN ▾
Get API key
per 1M input tokens$0.15
Output tokens / 1M$0.50
token context100,000
trial credit$0.50
requests per minute300

https://api.sdxlnsfw.com/v1uncensored

Quickstart for SDXL NSFW pipelines

Integrate uncensored text generation into your SDXL NSFW pipeline with this OpenAI-compatible API. Use standard SDKs to handle prompt writing, captioning, and post-processing without content refusals.

Authentication & Base URL

Our API follows the OpenAI standard, making integration straightforward. The base URL is https://api.sdxlnsfw.com/v1. You must include your API key in the Authorization header as a Bearer token. If the key is invalid, you will receive a 401 Unauthorized error. If your prepaid credit is exhausted, you will receive a 402 Payment Required error. Sign up on the Get API key page to obtain your token instantly via Google or email.

Sending a Request

Send text-completion requests to the /v1/chat/completions endpoint. The model ID is uncensored. This endpoint handles prompt writing and captioning for your SDXL NSFW workflows. Ensure your requests stay within the 8 MB body limit. Errors during processing do not consume your credit.

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

Python SDK

Use the official OpenAI Python SDK to interact with our API. Set the base URL to our endpoint and provide your API key. This approach is ideal for backend scripts that generate prompts or process text outputs for NSFW image pipelines. The client handles authentication and JSON serialization automatically.

from openai import OpenAI

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

For JavaScript/TypeScript environments, the OpenAI Node SDK works seamlessly. Configure the base URL and API key in the client initialization. This is useful for serverless functions or Node-based pipelines that need to generate text captions or scripts for NSFW content. The SDK manages the HTTP requests and response parsing.

import OpenAI from "openai";

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

Enable streaming by setting stream: true. The API returns Server-Sent Events (SSE) for real-time token delivery. Token usage details are included in the final chunk. Streaming is efficient for long outputs, though the total context window remains limited to 100,000 tokens. This feature supports dynamic text generation for post-processing tasks.

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)

Limits & Context Window

Each key allows 300 requests per minute and 8 concurrent requests. The context window is 100,000 tokens (input + output). There is no separate output cap, and if max_tokens is unset, the response can run to the end of the window. Rate limits return 429 Too Many Requests. One active key replaces the old one if generated again. Credit never expires, and errors are free.

API facts in one table

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

ParameterDetails
API formatOpenAI Chat Completions schema; official openai SDKs work unchanged
Model IDuncensored
Base URLhttps://api.sdxlnsfw.com/v1
API keyBearer token in the Authorization header
EndpointsPOST /v1/chat/completions · GET /v1/models
Max context100,000 tokens, input and output combined
Max outputup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
Other parameterstemperature, top_p, stop, seed and the two penalties are passed through
JSON moderesponse_format: {"type": "json_object"}
SSE streamingYes — server-sent events; the last chunk carries token usage
Tools / tool callsYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Requests per minute300 requests per minute per key
Parallel requests8 requests at the same time per key
Max body8 MB request body
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Credit expiryno monthly fee; paid credit does not expire
Volume bonus+5% from $50, +10% from $100, +15% from $200
Free trial$0.50 for 7 days, no card · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
How you paypay as you go from prepaid credit; nothing is charged for failed or refused requests
Top-upcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Contentuncensored for adults; the only hard rule: no sexual content involving minors
Key managementone active key per account; a new key replaces the old one
Sign-insign in with Google or with e-mail + password

Error codes

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

StatusTypeReason
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
401missing_key · invalid_key · key_revokedcheck the Authorization header or use your current key
402no_creditout of credit; add credit and retry
403content_blockedrefused by the content policy
404not_foundunknown endpoint
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busymodel busy — retry in a few seconds

Questions and answers

Does this API generate images or video?

No. We provide a text-completion API only. It is used for prompt writing, captioning, and text post-processing within your SDXL NSFW pipeline. Image and video generation are handled by other tools in your workflow.

How do I top up my credit?

Payments are crypto-only via USDT (TRC20) or USDC (Base). Minimum top-up is $20, and maximum is $500. Credits do not expire. You can get $0.50 trial credit without a card after sign-up. Claim this credit with one click on your API key page.

Is the model uncensored?

Yes, the model does not refuse lawful adult, fictional, or controversial topics. However, sexual content involving minors is always blocked. The model is open-weight and runs on our servers, separate from major vendors like GPT or Llama.

Your key is one form away

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

Get API key