EN ▾
Get API key

Flux Uncensored: Prompts and scripts over one endpoint

Get started with the flux uncensored API in minutes. Use the standard OpenAI-compatible endpoints to send text prompts and receive unrestricted completions for your adult content pipelines.

Authentication and Base URL

Start by creating an account on the Get API key page. You can sign in with Google or use an email and password. No phone number is required. Once you generate your key, it is displayed immediately. The API key is the only credential you need.

The base URL for all requests is https://api.fluxuncensored.cc/v1. This URL works with the official OpenAI SDKs and any OpenAI-compatible client. You only need to configure the base URL and set the Authorization header with your key. The API serves a single model, so you do not need to specify a model ID in the base URL configuration.

Your account allows one active key at a time. If you generate a new key, the previous one is replaced. This keeps access control simple. There is no subscription fee, and prepaid credit never expires.

First Request

To verify your setup, send a simple chat completion request. The endpoint is POST /v1/chat/completions. You must include the Authorization header with your Bearer token. The request body contains the messages array, where each message has a role and content. Use the model ID "uncensored" to access the open-weight model tuned for no refusals.

This request returns a text response. The model does not refuse lawful adult, fictional, or controversial topics. However, it strictly blocks sexual content involving minors. This hard limit always applies regardless of other settings. The API is text-only, so you cannot generate images or audio in this step.

If you receive an error, check your key or credit balance. Mistakes like double charges are fixed via the Support page. Credit is charged based on real token usage.

Python SDK Integration

Use the official OpenAI Python SDK for easy integration. Install the package and configure the client with your API key and base URL. This allows you to use familiar methods like chat.completions.create(). The library handles serialization and streaming automatically.

Pass the model name "uncensored" to specify the flux uncensored model. You can set parameters like temperature and top_p to control creativity. The SDK supports streaming responses, which are useful for large outputs. Set the stream parameter to True to receive tokens as they are generated.

This approach works for any OpenAI-compatible client. You can reuse existing code that targets OpenAI, just changing the base URL. The API is designed to drop into existing pipelines without major refactoring. It is ideal for prompt writing, script generation, or post-processing text.

Node.js SDK Integration

For JavaScript developers, the OpenAI Node SDK provides a straightforward interface. Install the library and initialize the client with your key and the flux uncensored base URL. The API follows the standard OpenAI format, so existing examples work with minor adjustments.

Create a completion request with the model "uncensored". The SDK handles the HTTP requests and parses the JSON response. You can use async/await patterns for clean code. Streaming is supported by iterating over the async iterator returned by the create method.

This integration is perfect for server-side text processing. You can extract data, write captions, or generate scripts. The API does not handle image or video generation, so use it for the text layer of your pipeline. The model runs on our servers, ensuring consistent performance.

Streaming Responses

Streaming is supported via Server-Sent Events (SSE). Set the stream parameter to True in your request. The API returns chunks of text as they are generated. This reduces latency for users, especially for long responses.

Each chunk contains partial content. The final chunk includes token usage statistics, allowing you to track costs accurately. Errors during streaming are returned as a final chunk with an error object. You can handle these events in your client code to update the UI in real time.

Streaming is efficient for chat interfaces and live text generation. It works with both the Python and Node SDKs. The API ensures that you only pay for tokens actually sent to the client. Refusals and errors are free, so streaming errors do not incur charges.

Rate Limits and Errors

The API enforces strict limits to ensure stability. You are allowed 300 requests per minute per key. You can have up to 8 concurrent requests at the same time. The request body size limit is 8 MB. These limits apply to all endpoints.

If you exceed the rate limit, the API returns a 429 status code. Authentication errors return 401, and insufficient funds return 402. These are standard HTTP codes for these conditions. Check your key validity and credit balance if you encounter these errors.

The context window is 100,000 tokens, including both prompt and completion. There is no separate output cap per request, and if max_tokens is not set, the response can run to the end of the window. Errors and refusals are free, so you can experiment without worrying about wasted credits.

JSON Mode and Function Calling

The API supports JSON mode for structured outputs. Set response_format to json_object in your request. The model will return valid JSON, which is useful for parsing data or feeding into other systems. This is reliable for extracting specific fields from text.

Function calling is also supported. You can define tools with their schemas and let the model decide which to use. The API handles tool_choice and provides the function name and arguments. This is ideal for building agents or complex workflows.

Use these features to enhance your text pipelines. You can generate code, parse logs, or create structured data. The flux uncensored model handles these tasks without refusing complex or niche topics. Combine JSON mode with streaming for efficient data processing.

cURL

curl https://api.fluxuncensored.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.fluxuncensored.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.fluxuncensored.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)

Technical reference

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

ItemValue
API formatOpenAI Chat Completions schema; official openai SDKs work unchanged
AuthenticationAuthorization: Bearer YOUR_KEY
MethodsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.fluxuncensored.cc/v1
Modeluncensored
Structured outputJSON object mode via response_format json_object
Completion lengthprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Max context100,000 tokens (prompt + completion together)
Other parameterstemperature, top_p, stop, seed and the two penalties are passed through
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 body8 MB request body
Parallel requests8 requests at the same time per key
Rate limit300 requests per minute per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Billingpay as you go from prepaid credit; nothing is charged for failed or refused requests
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
Price$0.15 per 1M input tokens · $0.50 per 1M output tokens
Paymentcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Subscriptionno monthly fee; paid credit does not expire
Volume bonus+5% from $50, +10% from $100, +15% from $200
Content policyuncensored for adults; the only hard rule: no sexual content involving minors
Accountsign in with Google or with e-mail + password
Keysone active key per account; a new key replaces the old one

When a request fails

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

HTTPTypeWhat to do
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_blockedrefused by the content policy
404not_foundunknown endpoint
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busytemporary overload, retry shortly

Questions and answers

What is the context window size?

The context window is 100,000 tokens, which includes both the prompt and the completion. If you do not specify max_tokens, the response can run to the end of the window.

How do I top up my credit?

You can top up by crypto (USDT on TRC20, USDC on Base). Acceptable amounts are whole numbers from $20 to $500. You receive a +5% bonus for deposits of $50 or more, +10% for deposits of $100 or more, and +15% for deposits of $200 or more.

Is there a free trial?

Yes, new users get $0.50 of trial credit valid for 7 days. Claim this credit with one click on your API key page. No card is needed to sign up. The trial is limited to one per person.

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.

$0.15per 1M input tokens

$0.50Output tokens / 1M

100,000token context

$0.50trial credit

300requests per minute