EN ▾

Uncensored text API for SDXL NSFW pipelines

https://api.sdxlnsfw.top/v1uncensored

Text API quickstart

Get your uncensored LLM API key and start generating prompts for SDXL NSFW pipelines in under two minutes. This guide covers the base URL, authentication, and core SDK integrations for text-only workflows.

Base URL & Authentication

Our API follows the OpenAI compatibility standard, meaning you can use existing SDKs with minimal changes. The base URL is https://api.sdxlnsfw.top/v1. You authenticate using a Bearer token in the Authorization header. Unlike many competitors, we do not require a phone number for signup; you can create an account via Google or email and receive your key immediately.

Each account supports one active key at a time. If you generate a new key, the old one is revoked instantly. Ensure your Authorization header is set to Bearer YOUR_API_KEY for all requests. This endpoint handles all text processing, from prompt generation to captioning, without interfering with your image or audio pipelines.

Send Your First Request

Start by sending a simple text completion request to verify connectivity. The model ID is uncensored. This model is tuned to answer without content refusals for lawful adult use, making it ideal for NSFW prompt engineering. You can send up to 100,000 tokens in the context window, with no separate output cap per request.

Below is a basic cURL example to test the endpoint. Replace YOUR_API_KEY with your key. If you receive a JSON response with content, your integration is working. Errors like 401 indicate an invalid key, while 402 means you need to top up your credit.

Prompt Generation for sdxl nsfw

Use the API to generate detailed prompts for your SDXL NSFW pipelines. The uncensored model handles specific tags, anatomy descriptions, and artistic styles without filtering. You can pass a system prompt to define the model's role, ensuring consistent output for your workflow. For example, ask it to expand a simple concept into a full prompt with lighting and camera details.

The API is text-only, so it does not generate the image itself. It provides the text infrastructure that powers your generation step. This ensures your metadata and prompts remain uncensored, preserving the exact intent of your creative direction. Use the temperature parameter to control creativity; higher values yield more varied prompts.

Function Calling & Tools

Integrate structured data extraction or tool use into your pipeline. The API supports function calling, allowing you to define tools that the model can invoke. This is useful for parsing unstructured text or triggering specific actions in your script. Set tool_choice to control whether the model must use a tool or can choose freely.

Define your functions in the tools array. The model will return a response with tool calls if appropriate. This feature is available for all requests, enabling complex logic in your NSFW detection or captioning workflows. Ensure your function definitions are valid JSON to avoid parsing errors.

Streaming Responses

For real-time applications, use Server-Sent Events (SSE) to stream token-by-token responses. This reduces perceived latency and allows you to display progress as the model generates text. Streaming is enabled by setting stream: true in your request. Each chunk contains partial content, and the final chunk includes token usage statistics.

This is particularly useful for long prompt generation or script writing. You can process tokens as they arrive, building the final text incrementally. Remember that errors during streaming may still return a final chunk with error details. Handle network interruptions gracefully, as streaming connections can drop.

JSON Mode for Structured Data

Ensure consistent output for automated pipelines by using JSON mode. Set response_format to {"type": "json_object"} to force the model to return valid JSON. This is critical for parsing responses in your code without complex regex or post-processing. The model will adhere to the structure you define in your system prompt or few-shot examples.

Use this for generating metadata, extracting tags, or formatting prompts for downstream tools. JSON mode ensures reliability, reducing the chance of malformed responses breaking your pipeline. Note that JSON mode may slightly increase latency due to validation overhead. Always validate the output in your code, as the model can still produce invalid JSON in edge cases.

cURL

curl https://api.sdxlnsfw.top/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

from openai import OpenAI

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

Technical specifications

A quick checklist for developers: format, limits, features, billing.

FeatureSupport
API formatOpenAI Chat Completions schema; official openai SDKs work unchanged
MethodsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.sdxlnsfw.top/v1
API keyAuthorization: Bearer YOUR_KEY
Model IDuncensored
Completion lengthprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Structured outputJSON object mode via response_format 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
Max context100,000 tokens, input and output combined
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Concurrencyup to 8 in parallel per key
Requests per minute300 requests per minute per key
Request size8 MB request body
Paymentcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Volume bonus+5% from $50, +10% from $100, +15% from $200
How you paypay as you go from prepaid credit; nothing is charged for failed or refused requests
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
Token prices$0.15 per 1M input tokens · $0.50 per 1M output tokens
Subscriptionno monthly fee; paid credit does not expire
AccountGoogle or e-mail and password
Content policyuncensored for adults; the only hard rule: no sexual content involving minors
Key managementone key per account, regenerate any time (the old one stops working)

Error reference

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

StatusTypeReason
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_blockedrefused by the content policy
404not_foundunknown endpoint
413request_too_largebody over 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busytemporary overload, retry shortly

Questions and answers

What happens if I exceed the rate limit?

You will receive a 429 Too Many Requests error. The limit is 300 requests per minute per key, with a concurrency limit of 8 simultaneous requests. Upgrade your usage or spread requests over time to avoid delays.

How do I pay for the API?

We accept crypto only: USDT (TRC20) or USDC (Base). Top-ups range from $20 to $500. You can get $0.50 in trial credit with no card needed. Claim this credit with one click on your API key page. Credit never expires, and errors are free.

Is my data used for training?

No. Prompts sent to the API are not used for training the model. We prioritize privacy for NSFW workflows, ensuring your creative content remains yours. Your account only requires an email, with no phone number needed.

Your key is one form away

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

Get API key