EN ▾
Get API key
https://api.sdxlnsfw.cc/v1 $0.15 per 1M input tokens$0.50 Output tokens / 1M100,000 token context

Prompts and scripts over one endpoint

Integrate our uncensored text model into your SDXL NSFW pipeline with this quickstart guide. Use the OpenAI-compatible API to generate, refine, and structure prompts without content refusals.

Base URL & Authentication

Our API follows the OpenAI chat-completions standard, making it easy to drop into existing pipelines. The base URL is https://api.sdxlnsfw.cc/v1. You authenticate using a Bearer token passed in the Authorization header. Generate your key on the Get API key page via Google or email. Keep this key secure; it provides access to your prepaid credit. We support streaming, JSON mode, and tool calling out of the box.

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

Start by testing connectivity. Replace YOUR_API_KEY with your actual key. If you receive a JSON response with model details, your integration is working. The endpoint is strictly for text generation, not image creation.

The /v1/chat/completions Endpoint

Send your text requests to POST /v1/chat/completions. The model ID is uncensored. This model is tuned to answer without refusals for lawful adult content. It is not GPT or Claude; it is an open-weight model hosted on our servers. Send a messages array with your prompt engineering instructions. The API returns text completions that you can feed into your SDXL workflow.

from openai import OpenAI

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

Use the official OpenAI Python SDK or any compatible client. Set the base_url to our endpoint. Pass your API key in the header. This approach ensures you can use familiar libraries while leveraging our uncensored model for NSFW prompt generation.

Sending Prompts for SDXL

Structure your requests using the messages array. Define a system prompt that sets the tone, such as "You are an expert NSFW prompt engineer." Then add user messages with your raw ideas or tags. The model will refine these into detailed SDXL prompts. This is ideal for post-processing or extracting structured data from text. Avoid sending large images; this is a text-only API.

import OpenAI from "openai";

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

Integrate with Node.js applications by configuring the OpenAI client with our base URL. Use the model parameter set to uncensored. Send your prompt engineering tasks as messages. The response will contain the refined text ready for your image generation pipeline.

Using JSON Mode for Structured Data

For reliable data extraction, enable JSON mode by setting response_format to {"type": "json_object"}. This ensures the model returns valid JSON, which is essential for parsing tags, styles, and parameters programmatically. Use this for automating captioning or converting natural language instructions into structured SDXL inputs. It reduces parsing errors in your pipeline.

Streaming is also available for real-time UI updates. Set stream to true to receive tokens via Server-Sent Events (SSE). This allows you to display progress or partial results as they generate. Token usage statistics are included in the final chunk.

Streaming Responses for Real-Time UI

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)

Enable streaming by setting the stream parameter to true in your request. The API will send a series of SSE chunks. Each chunk contains part of the generated text. This is useful for building responsive interfaces that show prompt generation in progress. The final chunk includes usage statistics, such as input and output token counts. This helps you track costs accurately without extra API calls.

Streaming works with JSON mode and tool calling. Ensure your client handles SSE events correctly. This approach provides a smoother user experience for long prompt generation tasks.

Token Limits & Context Window

The context window is 100,000 tokens, covering both prompt and completion. There is no separate output cap, and if max_tokens is unset, the response can run to the end of the window. Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens. Errors and refusals are free. Prepaid credit never expires. Rate limits are 300 requests per minute and 8 concurrent requests per key. Request bodies must be under 8 MB. Use these limits to design efficient batch processing for your NSFW pipeline.

API specifications

The numbers below are the real limits of this API, not marketing. Compare them with what your app needs.

ParameterDetails
API formatOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
API keyBearer token in the Authorization header
EndpointsPOST /v1/chat/completions · GET /v1/models
Modeluncensored
Base URLhttps://api.sdxlnsfw.cc/v1
Context window100,000 tokens (prompt + completion together)
JSON modeJSON object mode via response_format json_object
Tools / tool callsYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
SSE streamingYes — server-sent events; the last chunk carries token usage
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Completion lengthup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
Requests per minute300/min per key
Max bodyup to 8 MB per request
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Parallel requestsup to 8 in parallel per key
Subscriptionpaid credit never expires, no subscription
How you payprepaid credit, charged by real token usage; errors and refusals are free
Paymentcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Bonus credit+5% from $50, +10% from $100, +15% from $200
Price$0.15 per 1M input tokens · $0.50 per 1M output tokens
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
Sign-insign in with Google or with e-mail + password
Key managementone active key per account; a new key replaces the old one
Contentadult content allowed; sexual content involving minors is refused

Error reference

Errors come back as JSON with a stable type; failed and refused requests are not billed.

CodeTypeMeaning
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
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_foundonly /v1/chat/completions and /v1/models exist
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busytemporary overload, retry shortly

Questions and answers

What happens if my API key is invalid?

You will receive a 401 Unauthorized error. Check that your key is correct and active. Keys are generated immediately upon signup via Google or email. Ensure you are using the correct base URL.

Why do I get a 402 error?

This indicates your prepaid credit is exhausted. Top up using USDT (TRC20) or USDC (Base). Credits are charged by real token usage, and errors are free. No card is needed for the trial, but crypto is required for top-ups.

What content is refused?

The model is uncensored for lawful adult, fictional, and controversial topics. However, sexual content involving minors is always refused. This hard limit applies regardless of other settings. Requests containing this content will be blocked.

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.