API for Open LLM: Open-Weight Model Over HTTP
An API for open LLM models lets you call an open-weight model over HTTP without running GPUs yourself. This page covers the endpoint, working code, limits and what the service does not do.
Updated

What a hosted open-weight endpoint gives you
An api for open llm use is a hosted endpoint that serves an open-weight model, so you send JSON and get text back. You skip the GPU purchase, the inference server setup and the driver problems, and you keep the freedom to use tools written for the OpenAI API.
This service serves one open-weight model under the ID uncensored. An independent provider runs it, and it is tuned to answer without content refusals for lawful adult use. It is not the official API of any model vendor and not a router across several. If you need a specific named model or a catalog to switch between, this is the wrong tool; if you want one dependable model with no refusal layer, it fits.
Two methods are available: POST /v1/chat/completions and GET /v1/models. Auth is a bearer token in the Authorization header.
Connection details
| Setting | Value |
|---|---|
| Base URL | https://api.fluxnsfw.top/v1 |
| Model ID | uncensored |
| Auth header | Authorization: Bearer YOUR_KEY |
| Context window | 100,000 tokens, prompt plus completion |
| Max request body | 8 MB |
Create a key on the API key page. Sign-up is with Google or with email and password. First check that the key works by listing models:
curl https://api.fluxnsfw.top/v1/models \
-H "Authorization: Bearer YOUR_KEY"
Then send a first chat request:
curl https://api.fluxnsfw.top/v1/chat/completions \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Describe a rain-soaked neon alley in three sentences."}]
}'
The response carries an X-Request-Id and an X-Balance-USD header. Log the first when you report a problem and watch the second to see your remaining credit.
Python and Node
Any OpenAI SDK works once you override the base URL. In Python:
from openai import OpenAI
client = OpenAI(base_url="https://api.fluxnsfw.top/v1", api_key="YOUR_KEY")
resp = client.chat.completions.create(
model="uncensored",
temperature=0.8,
messages=[
{"role": "system", "content": "You write concise, vivid prompts for image models."},
{"role": "user", "content": "A cyberpunk market at night, wet pavement, hanging lanterns."},
],
)
print(resp.choices[0].message.content)
print(resp.usage)
In Node, using the official openai package:
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.fluxnsfw.top/v1",
apiKey: process.env.API_KEY,
});
const stream = await client.chat.completions.create({
model: "uncensored",
stream: true,
messages: [{ role: "user", content: "Write a short scene set on a night train." }],
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}
Streaming uses server-sent events and reports usage at the end. Tools that accept a custom OpenAI endpoint, such as SillyTavern, take the same base URL and key in their connection settings.
Features you can rely on
- Streaming with
stream: true. - JSON mode with
response_format: {"type": "json_object"}. Mention JSON in the prompt as well so the model knows the shape you want. - Tool calling with
toolsandtool_choice. Streamedtool_callsare supported, and tool results go back as messages withrole: "tool". - Sampling controls: temperature, top_p, stop, seed and the frequency and presence penalties are passed through.
max_tokensis optional; the completion can use whatever remains of the window.
A short tool-calling example:
import json
from openai import OpenAI
client = OpenAI(base_url="https://api.fluxnsfw.top/v1", api_key="YOUR_KEY")
tools = [{
"type": "function",
"function": {
"name": "save_prompt",
"description": "Store a finished image prompt",
"parameters": {
"type": "object",
"properties": {"prompt": {"type": "string"}, "style": {"type": "string"}},
"required": ["prompt"],
},
},
}]
resp = client.chat.completions.create(
model="uncensored",
tools=tools,
tool_choice="auto",
messages=[{"role": "user", "content": "Write and save a prompt for a lantern-lit harbor at dusk."}],
)
msg = resp.choices[0].message
if msg.tool_calls:
args = json.loads(msg.tool_calls[0].function.arguments)
print(args["prompt"])
Parameter details are in the docs.
Limits and error handling
| Key type | Concurrent requests | Requests per minute |
|---|---|---|
| Full key | 8 | 300 |
| Trial key | 2 | 60 |
Past a limit the API answers HTTP 429. The error code rate_limited means too many requests per minute, and concurrency means too many at once. A temporary overload also returns 429, with a Retry-After: 5 header. A streamed request holds its concurrency slot until the stream ends, so a client that forgets to close streams will hit concurrency quickly.
import time
from openai import OpenAI, RateLimitError
client = OpenAI(base_url="https://api.fluxnsfw.top/v1", api_key="YOUR_KEY")
def ask(messages, tries=5):
for attempt in range(tries):
try:
return client.chat.completions.create(model="uncensored", messages=messages)
except RateLimitError:
time.sleep(5 * (attempt + 1))
raise RuntimeError("still limited after retries")
Response headers X-RateLimit-Limit-Requests and X-RateLimit-Limit-Concurrency show the ceilings for your key. Failed or refused requests are not charged.
Hosted or self-hosted: how to choose
Running an open-weight model yourself and calling a hosted endpoint solve the same problem with different trade-offs.
| Question | Hosted API | Self-hosted |
|---|---|---|
| Time to first response | Minutes | Hours to days |
| Upfront cost | None, prepaid credit | GPU hardware or rental |
| Cost when idle | Zero | Still paying for the hardware |
| Control over weights and settings | Fixed model, sampling parameters only | Full |
| Data leaves your machine | Yes, prompts go to the provider | No |
Choose hosted when you are prototyping, when usage is uneven, or when you do not want to maintain inference software. Choose self-hosted when you need a specific model, offline operation or complete control over the data path. You can prototype against a hosted endpoint and decide later, since the OpenAI-compatible interface makes the code portable: moving to your own vLLM or llama.cpp server later means changing the base URL again.
Moving existing OpenAI code over
If you already have an application that talks to the OpenAI API, the move is mostly configuration:
- Set the base URL to
https://api.fluxnsfw.top/v1. Most SDKs read an environment variable such asOPENAI_BASE_URL, or take abase_urlargument. - Replace the key with the one from the API key page.
- Change the model name to
uncensored. Hard-coded model names in config files are the usual thing people miss. - Remove calls the service does not offer, such as embeddings or image endpoints, and point them at another provider.
- Test with a short prompt, then check the
X-Balance-USDheader to confirm billing behaves as expected.
Prompts written for other models may need small changes. A system prompt tuned to force refusals, or one that apologizes constantly, is no longer needed here, and shorter instructions often work better. Test a handful of your real prompts before you switch everything over.
Cost and payment
Billing is per token from prepaid credit, with no subscription: $0.15 per 1M input tokens and $0.50 per 1M output tokens. A prompt-writing call with 500 tokens in and 300 tokens out costs 500 × $0.15 / 1M + 300 × $0.50 / 1M = $0.000075 + $0.00015 = $0.000225. One dollar covers roughly 4,400 such calls.
Top up any whole amount from $20 to $500, with a bonus of +5% from $50, +10% from $100 and +15% from $200. Payment is in crypto only: USDT on TRC20 or USDC on Base. Credit never expires. New users can claim $0.50 of trial credit with one click on the API key page, with no payment needed, valid for 7 days. Current rates are on the pricing page.
What this API does not do, and where it fits
Be clear about the edges before you build on it:
- Text only. There is no image, audio or video generation, no embeddings and no fine-tuning.
- One model. You cannot pick between several.
- No sexual content involving minors, in any framing. This limit is fixed.
Where it works well is the text work around visual pipelines and fiction tools for lawful adult use: writing prompts for image models, expanding character and scene notes, roleplay and story apps, and structured output through JSON mode. Prompts are not used for training.
If you would rather run a model on your own hardware, that gives full control and no per-token bill, at the cost of setup and a capable GPU. A hosted endpoint is the quicker route when you want to test an idea today.
More guides
Questions and answers
Is this the official API of an open model's creator?
No. It serves one open-weight model run by an independent provider, and it is not the official API of any model vendor or a router across vendors.
Can I use the OpenAI SDK?
Yes. Set the base URL to https://api.fluxnsfw.top/v1, use your key, and set the model to uncensored. Chat completions and the models list are supported.
Does it support embeddings or image generation?
No. It is a text-only chat completions API, without embeddings, image, audio or video generation, or fine-tuning.
How do I pay?
With crypto: USDT on TRC20 or USDC on Base. Top-ups are any whole amount from $20 to $500, with bonuses from $50.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.