EN ▾

Uncensored text API for NSFW pipelines

https://api.nsfwflux.cc/v1uncensored

Get API key

Quickstart for NSFW Flux pipelines

Get your text API key and start sending uncensored chat completions to your NSFW pipelines in minutes. This guide covers the base URL, authentication, and the four core request patterns: standard text, structured JSON, tool use, and streaming.

Authentication & Base URL

Our nsfw flux API is fully OpenAI-compatible. You interact with it using the standard POST /v1/chat/completions endpoint. To begin, sign up on the Get API key page using Google or an email address; your key appears immediately.

Set your base URL to https://api.nsfwflux.cc/v1 and pass your key in the Authorization: Bearer <key> header. This configuration works with any official OpenAI SDK or compatible client. The model identifier you must send is uncensored.

Unlike standard models, this open-weight LLM is tuned to answer without refusals for lawful adult, fictional, or controversial topics. It is not GPT, Claude, or any other vendor's model. Note that sexual content involving minors is strictly blocked.

Basic Chat Completion Request

Send a standard request to generate text. You provide a system prompt to define the persona and user messages for the conversation. The API returns the model's response in the choices array.

The uncensored model handles explicit language and mature themes natively. There is no separate moderation endpoint to call; the refusal logic is built into the model's behavior. If you need to extract data from text, this is where you would start your pipeline.

Remember that the total context window is 100,000 tokens. If you do not set a max_tokens limit, the response can run to the end of the window. You can adjust temperature for creativity or top_p for diversity.

Python SDK Implementation

Use the official OpenAI Python library to integrate quickly. Install the package and configure the client with our base URL and your API key. Pass your messages to the chat.completions.create method.

This approach is ideal for backend services processing scripts, captions, or post-generation edits. The SDK handles JSON serialization and retries automatically. You can access the raw response object if you need to inspect token usage or finish reasons.

Ensure you are using a recent version of the SDK to support all features like function calling. The code below demonstrates a simple text generation call.

Node.js SDK Implementation

For JavaScript or TypeScript environments, use the openai npm package. Configure the client with the same base URL and key as the Python example. The API returns a Promise that resolves to the completion object.

This is useful for real-time chat interfaces or serverless functions that generate NSFW AI text on demand. You can parse the response and stream it to the frontend if needed. The structure matches the OpenAI specification exactly.

You can also use the fetch API directly if you prefer not to add a dependency. The JSON payload remains the same. This flexibility allows you to choose the best fit for your pipeline architecture.

Streaming Responses via SSE

Set stream: true to receive Server-Sent Events (SSE). The API sends incremental chunks of text as they are generated. This reduces perceived latency for end-users in chat applications.

Each chunk contains a partial delta. The final chunk includes the full token usage statistics. You can accumulate the text parts to build the complete response. Streaming is essential for real-time interactions where waiting for the full completion would feel slow.

Handle the stream efficiently to avoid memory leaks. Close the connection once the done event is received or an error occurs. The uncensored model streams reliably, allowing you to display text token-by-token.

JSON Mode & Function Calling

Enforce structured output by setting response_format to {"type": "json_object"}. The model will return valid JSON instead of plain text. This is critical for parsing scripts, extracting entities, or feeding data into other tools.

Use function calling to let the model decide when to invoke specific tools. Define your tools in the request, and the model will output a function call if appropriate. You can then execute the tool and send the result back to the model for a final answer.

This enables complex NSFW AI workflows where text generation is combined with external data or actions. The uncensored model handles tool definitions well, allowing for creative and flexible pipeline designs without strict format constraints.

Rate Limits, Errors & Context

Your API key is limited to 300 requests per minute and 8 concurrent requests. If you exceed these, you receive a 429 error. The request body must be under 8 MB. Errors and refusals do not consume credit.

Common errors include 401 (invalid key), 402 (insufficient credit), and 429 (rate limit). Prepaid credit is charged only for real token usage. You can top up with USDT (TRC20) or USDC (Base) for amounts between $20 and $500.

The context window is 100,000 tokens total. Plan your prompt and completion lengths accordingly. If you run out of credit, you cannot make requests until you top up. Credit never expires, so you can add funds at your own pace.

cURL

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

Python

from openai import OpenAI

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

Node.js

import OpenAI from "openai";

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

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)

Under the hood: specs

Everything the endpoint can and cannot do, in one place — check it before you top up.

ParameterDetails
CompatibilityOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
EndpointsPOST /v1/chat/completions · GET /v1/models
Model IDuncensored
AuthenticationBearer token in the Authorization header
Base URLhttps://api.nsfwflux.cc/v1
Completion lengthup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
Sampling parameterstemperature, top_p, stop, seed and the two penalties are passed through
Context window100,000 tokens, input and output combined
SSE streamingSupported (stream: true), usage included at the end
JSON modeJSON object mode via response_format json_object
Function callingSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Rate limit300 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
Bonus credit+5% from $50, +10% from $100, +15% from $200
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
Top-upcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Subscriptionpaid credit never expires, no subscription
Billingpay as you go from prepaid credit; nothing is charged for failed or refused requests
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Keysone key per account, regenerate any time (the old one stops working)
Sign-insign in with Google or with e-mail + password
Content policyadult 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.

StatusTypeReason
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_foundunknown endpoint
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

Does the uncensored model block all adult content?

No, it is tuned to allow lawful adult, fictional, and mature themes without standard refusals. The only hard limit that always applies is content involving minors, which is blocked.

Can I use this API for image or video generation?

No. This is a text-only chat-completions API. It does not generate images, audio, or video. You use it for the text pipeline parts like prompt writing, script generation, or post-processing.

How do I top up my credit?

You can top up using crypto only: USDT (TRC20) or USDC (Base). Any whole amount from $20 to $500 is accepted. You receive a +5% bonus for deposits of $50 or more, +10% for $100 or more, and +15% for $200 or more.

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.