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.
| Parameter | Details |
|---|---|
| API format | OpenAI Chat Completions schema; official openai SDKs work unchanged |
| Model ID | uncensored |
| Base URL | https://api.sdxlnsfw.com/v1 |
| API key | Bearer token in the Authorization header |
| Endpoints | POST /v1/chat/completions · GET /v1/models |
| Max context | 100,000 tokens, input and output combined |
| Max output | up to the rest of the 100,000-token window; max_tokens optional (no separate cap) |
| Other parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| JSON mode | response_format: {"type": "json_object"} |
| SSE streaming | Yes — server-sent events; the last chunk carries token usage |
| Tools / tool calls | Yes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool |
| Requests per minute | 300 requests per minute per key |
| Parallel requests | 8 requests at the same time per key |
| Max body | 8 MB request body |
| Response headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Price | input $0.15 / 1M tokens, output $0.50 / 1M tokens |
| Credit expiry | no 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 pay | pay as you go from prepaid credit; nothing is charged for failed or refused requests |
| Top-up | crypto: USDT on TRON or USDC on Base, $20–$500, any whole sum |
| Content | uncensored for adults; the only hard rule: no sexual content involving minors |
| Key management | one active key per account; a new key replaces the old one |
| Sign-in | sign 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.
| Status | Type | Reason |
|---|---|---|
400 | bad_request | invalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend |
401 | missing_key · invalid_key · key_revoked | check the Authorization header or use your current key |
402 | no_credit | out of credit; add credit and retry |
403 | content_blocked | refused by the content policy |
404 | not_found | unknown endpoint |
413 | request_too_large | request body larger than 8 MB |
429 | rate_limited · concurrency | slow down: rate or parallel limit reached |
503 | upstream_busy | model 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.