EN ▾

fluxuncensored.comQuickstart for Flux pipelines

Quickstart for Flux pipelines

Get your uncensored text API key and integrate the Flux Uncensored endpoint into your pipeline with these OpenAI-compatible code samples.

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.

Questions and answers

How do I get my API key?

Sign up on the 'Get API key' page using 'Continue with Google' or email + password. Your key is shown immediately after signup. No phone number is needed.

What is the context window size?

The context window is 100,000 tokens, which includes both the prompt and the completion. There is no separate output cap per request.

Does my prepaid credit expire?

No, your paid credit never expires. It is charged based on real token usage, and errors or refusals are free. If you make a mistake like a double charge, contact Support.

Your key is one form away

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

Get API keyRead the docs

Specs at a glance

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

SpecValue
CompatibilityOpenAI Chat Completions schema; official openai SDKs work unchanged
EndpointsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.fluxuncensored.com/v1
Modeluncensored
AuthenticationBearer token in the Authorization header
Function callingYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
JSON modeJSON object mode via response_format json_object
Completion lengthprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
SSE streamingSupported (stream: true), usage included at the end
Other parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Max context100,000 tokens (prompt + completion together)
Request size8 MB request body
Parallel requestsup to 8 in parallel per key
Rate limit300/min per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
How you paypay as you go from prepaid credit; nothing is charged for failed or refused requests
PaymentUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Volume bonus+5% from $50, +10% from $100, +15% from $200
Token prices$0.15 per 1M input tokens · $0.50 per 1M output tokens
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
Subscriptionpaid credit never expires, no subscription
Content policyadult content allowed; sexual content involving minors is refused
AccountGoogle or e-mail and password
Keysone key per account, regenerate any time (the old one stops working)

When a request fails

The type field is stable, the message is for humans. Errors cost nothing.

HTTPTypeWhat to do
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedcheck the Authorization header or use your current key
402no_creditbalance is empty — top up, requests resume at once
403content_blockedrefused by the content policy
404not_foundunknown endpoint
413request_too_largebody over 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busymodel busy — retry in a few seconds