Base URL and Authentication
Use https://api.fluxuncensored.com/v1 as your base URL. The API is fully OpenAI-compatible, so you can swap in existing clients by changing the base_url and providing your API key. Authenticate by passing your key in the Authorization: Bearer <key> header. Sign up via Continue with Google or email + password on the Get API key page to receive your key immediately. No phone number is required.
Basic Completion Request
Send a standard chat completion to the /v1/chat/completions endpoint. The model ID is uncensored. This returns raw, refusal-free text for your pipeline logic.
curl https://api.fluxuncensored.com/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."}]
}'Remember that errors and refusals are free, but paid credit is charged by real token usage. The model does not replace your image or video generators; it handles the text steps.
Python SDK Integration
Install the official openai library and point it to our base URL. This allows you to use familiar Python patterns for your flux uncensored workflows.
from openai import OpenAI
client = OpenAI(base_url="https://api.fluxuncensored.com/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)The API key is provided during initialization. Ensure your requests stay within the 8 MB body limit. You can send up to 300 requests per minute per key.
Node SDK Integration
Use the Node.js OpenAI SDK to interact with the flux api. Configure the client with the correct base URL and your API key.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.fluxuncensored.com/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);This setup works with any OpenAI-compatible client. You can process prompts or generate captions for your creative stack without waiting for external services.
Streaming Responses (SSE)
Enable streaming by setting stream: true. The API returns Server-Sent Events (SSE). Token usage details are provided in the last chunk of the stream.
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)This allows you to display output in real-time. The context window supports up to 100,000 tokens for prompt + completion together.
Limits, Errors, and Context
You have a 100,000 token context window (prompt + completion) and no separate output cap. Requests are limited to 8 MB. You can make 300 requests per minute and have 8 concurrent requests per key. A 401 error indicates an invalid key, while a 429 error means you hit the rate limit. Errors and refusals are free. Credit never expires, but mistakes like double charges are fixed via Support.