NSFW Flux: Prompts and scripts over one endpoint
Integrate our uncensored text API into your NSFW Flux workflows using standard OpenAI-compatible endpoints. This quickstart covers authentication, basic requests, streaming, and structured output.
Prerequisites and Authentication
Start by creating an account at nsfwflux.top using Google or email. You receive a single API key immediately; generating a new key replaces the previous one. The base URL for all requests is https://api.nsfwflux.top/v1. Pass your key in the Authorization header as a Bearer token. If the key is invalid, the API returns a 401 error. If you lack sufficient prepaid credit, it returns a 402 error. Ensure your client library is configured to use the OpenAI-compatible format.
Basic Text Generation
Send a standard chat-completions request to generate text. Use the model ID uncensored to access the model tuned for adult content without refusals. The API accepts a list of messages in the messages array. The response contains the generated text in choices[0].message.content. You can control generation behavior using parameters like temperature and top_p. Requests are charged based on token usage, with input tokens at $0.15/1M and output at $0.50/1M.
Streaming Responses
Enable streaming by setting stream: true in your request. The API returns a Server-Sent Events (SSE) stream. Each chunk contains partial content updates. The final chunk includes token usage statistics for the request, allowing you to track costs in real-time. This is useful for displaying progress in web interfaces or logging detailed usage data. Set max_tokens to control the maximum output length; if unspecified, the response can run to the end of the window.
Structured Output (JSON Mode)
For predictable data structures, use JSON mode by setting response_format to {"type": "json_object"}. The model will return a valid JSON string in the response content. Parse this string in your client code to extract specific fields. This is ideal for generating scripts, captions, or metadata for your NSFW Flux pipelines. Ensure your prompt instructs the model to output valid JSON to avoid parsing errors.
Function Calling (Tools)
Define tools in the tools parameter to enable function calling. The model can decide which tool to call based on the user's input. Specify tool_choice to enforce a specific tool or allow the model to choose. This feature supports complex workflows where the API needs to trigger specific actions or extract structured data. Pass the tool definitions in the standard OpenAI format.
Limits and Context Window
The model supports a 100,000 token context window, including both prompt and completion. There is no separate output cap. You are limited to 300 requests per minute and 8 concurrent requests per key. The request body must not exceed 8 MB. These limits ensure stable performance for high-volume NSFW text generation. Monitor your usage to avoid rate-limiting, which returns a 429 error.
cURL
curl https://api.nsfwflux.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.nsfwflux.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.nsfwflux.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)Capabilities and limits
Everything the endpoint can and cannot do, in one place — check it before you top up.
| Feature | Support |
|---|---|
| Compatibility | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Base URL | https://api.nsfwflux.top/v1 |
| Authentication | Authorization: Bearer YOUR_KEY |
| Endpoints | POST /v1/chat/completions · GET /v1/models |
| Model ID | uncensored |
| Context window | 100,000 tokens, input and output combined |
| SSE streaming | Yes — server-sent events; the last chunk carries token usage |
| Structured output | response_format: {"type": "json_object"} |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Max output | up to the rest of the 100,000-token window; max_tokens optional (no separate cap) |
| Sampling parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| Concurrency | 8 requests at the same time per key |
| Response headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Rate limit | 300 requests per minute per key |
| Request size | up to 8 MB per request |
| Credit expiry | paid credit never expires, no subscription |
| Top-up | USDT (TRC20) or USDC (Base), any whole amount from $20 to $500 |
| How you pay | prepaid credit, charged by real token usage; errors and refusals are free |
| Token prices | input $0.15 / 1M tokens, output $0.50 / 1M 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 |
| Volume bonus | +5% from $50, +10% from $100, +15% from $200 |
| Content policy | adult content allowed; sexual content involving minors is refused |
| Sign-in | sign in with Google or with e-mail + password |
| Keys | one key per account, regenerate any time (the old one stops working) |
HTTP errors
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 | balance is empty — top up, requests resume at once |
403 | content_blocked | sexual content involving minors — refused, not billed |
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
How do I top up my credit?
You can top up using USDT (TRC20) or USDC (Base). Minimum amounts start at $20. You receive a 5% bonus for deposits of $50 or more, and a 10% bonus for $100 or more. Credit never expires.
Is there a trial available?
Yes, new accounts receive $0.50 in trial credit valid for 7 days. Claim this credit with one click on your API key page. No credit card is required to sign up. This allows you to test the API before purchasing prepaid credit.
What happens if I exceed the rate limit?
If you exceed 300 requests per minute or 8 concurrent requests, the API returns a 429 error. You can retry after a short delay. Ensure your client handles rate limits gracefully to avoid interrupted workflows.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.
Get API key