NoFilter/No Filter AI Chatbot API: Python Quickstart
No Filter AI Chatbot API: Python Quickstart
If you want a no filter ai chatbot api you can call from Python in about five minutes, this is the path: install the OpenAI SDK, point it at our base URL and send a message to the model uncensored.
Last updated

Summary
- Four settings are all you change: base URL, key, model ID uncensored and your messages.
- Streaming, JSON mode and tool calling use the standard OpenAI parameters.
- Read X-Balance-USD from response headers to track credit in code.
- Trial credit of $0.50 is enough to run every example here.
The short version
A no filter ai chatbot api is a hosted model endpoint that answers lawful adult requests without the content refusals you get from heavily moderated assistants. Ours speaks the OpenAI protocol, so the quickstart is mostly about what you do not have to learn.
| Setting | Value |
|---|---|
| Base URL | https://api.nofilteraichatbot.com/v1 |
| Model ID | uncensored |
| Auth header | Authorization: Bearer <key> |
| Main endpoint | POST /v1/chat/completions |
| Context window | 100,000 tokens, prompt plus completion |
The model is one open-weight model run by an independent provider. It handles text only, so do not expect images, audio or embeddings. Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens from prepaid credit.
Get a key and install the SDK
Sign up with Google or with email and password, open the API key page, and claim the $0.50 trial credit with one click. It needs no card, is valid for 7 days and is limited to one per person. The trial key allows 2 concurrent requests and 60 requests per minute, which is fine for a quickstart.
Put the key in an environment variable instead of your source code, then install the package:
export NOFILTER_API_KEY="your-key-here"
python -m venv .venv && source .venv/bin/activate
pip install openai
If you ever paste the key somewhere by mistake, regenerate it on the same page. The old key stops working at once, and you do not need to contact anyone.
Your first request
Create hello.py:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.nofilteraichatbot.com/v1",
api_key=os.environ["NOFILTER_API_KEY"],
)
resp = client.chat.completions.create(
model="uncensored",
messages=[
{"role": "system", "content": "You are a blunt, helpful assistant."},
{"role": "user", "content": "Write a two-sentence villain monologue."},
],
)
print(resp.choices[0].message.content)
print(resp.usage)
Run python hello.py. You should see the text and a usage object with prompt and completion token counts. Multiply those by the two rates and you know exactly what the call cost. If you prefer curl, the same call is:
curl https://api.nofilteraichatbot.com/v1/chat/completions -H "Authorization: Bearer $NOFILTER_API_KEY" -H "Content-Type: application/json" -d '{"model":"uncensored","messages":[{"role":"user","content":"Say hello in three words."}]}'
You can list the available model with GET /v1/models. There is one entry, uncensored.
Turn it into a chatbot
A chatbot is the same call in a loop with the history attached. The API does not remember anything between requests, so you append each message yourself.
messages = [{"role": "system", "content": "You are a witty companion who keeps replies short."}]
while True:
user = input("you> ")
if user.strip().lower() in {"quit", "exit"}:
break
messages.append({"role": "user", "content": user})
stream = client.chat.completions.create(
model="uncensored",
messages=messages,
stream=True,
temperature=0.9,
top_p=0.95,
)
reply = ""
print("bot> ", end="")
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
piece = chunk.choices[0].delta.content
reply += piece
print(piece, end="", flush=True)
print()
messages.append({"role": "assistant", "content": reply})
Streaming gives you tokens as they are generated over server-sent events. The sampling parameters temperature, top_p, stop, seed and the frequency and presence penalties are passed through to the model. Lower the temperature for consistent answers, raise it for fiction.
Because every turn resends the history, long sessions get more expensive per message. Trim old turns once the list grows. The production checklist covers history limits and other things to settle before launch.
Run several chats at once
If you serve more than one user, use the async client and cap how many calls run together. A full key allows 8 concurrent requests, so a semaphore of 8 is the natural ceiling. For a trial key, use 2.
import asyncio, os
from openai import AsyncOpenAI
client = AsyncOpenAI(
base_url="https://api.nofilteraichatbot.com/v1",
api_key=os.environ["NOFILTER_API_KEY"],
)
sem = asyncio.Semaphore(2)
async def one(prompt):
async with sem:
r = await client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": prompt}],
max_tokens=150,
)
return r.choices[0].message.content
async def main():
prompts = [f"Give me character name idea number {i}." for i in range(6)]
for text in await asyncio.gather(*(one(p) for p in prompts)):
print(text)
asyncio.run(main())
Without the semaphore, six tasks would try to run at once and some would come back as HTTP 429 with the code concurrency. With it, the extra tasks wait their turn inside your program, which is faster than failing and retrying.
Same call with the Responses endpoint and Node
Some tools are built around the newer request shape, so the API also accepts POST /v1/responses. It talks to the same model. Pick whichever your client expects; if you are starting fresh, chat completions has the widest library support.
curl https://api.nofilteraichatbot.com/v1/responses -H "Authorization: Bearer $NOFILTER_API_KEY" -H "Content-Type: application/json" -d '{"model":"uncensored","input":"Give me three names for a grumpy dragon."}'
If your chatbot lives in a JavaScript project, the Node version of the first request is just as short. It needs Node 18 or later and the openai package:
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.nofilteraichatbot.com/v1",
apiKey: process.env.NOFILTER_API_KEY,
});
const resp = await client.chat.completions.create({
model: "uncensored",
messages: [{ role: "user", content: "Write a two-sentence villain monologue." }],
});
console.log(resp.choices[0].message.content);
Both languages use the same four settings from the table at the top, so moving a prototype from one to the other is a copy and paste job. A quick checklist before you call it done: the key comes from an environment variable, the base URL ends in /v1, the model is uncensored, and your code appends every assistant reply to the history before the next turn.
Structured output with JSON mode
When your code, not a person, reads the answer, ask for JSON. Set response_format and mention JSON in the prompt:
import json
resp = client.chat.completions.create(
model="uncensored",
response_format={"type": "json_object"},
messages=[
{"role": "system", "content": "Reply with a JSON object with keys name, mood and line."},
{"role": "user", "content": "Invent a tavern keeper for a fantasy story."},
],
)
npc = json.loads(resp.choices[0].message.content)
print(npc["name"], "-", npc["mood"])
Validate the parsed object anyway. JSON mode makes valid JSON likely, but your code still has to cope with a missing key. Tool calling is also available through the usual tools and tool_choice fields, with results sent back as role: "tool" messages.
Watch your balance and handle errors
Every response carries an X-Balance-USD header. With the Python SDK you reach headers through the raw response wrapper:
raw = client.chat.completions.with_raw_response.create(
model="uncensored",
messages=[{"role": "user", "content": "Ping."}],
)
print("balance:", raw.headers.get("x-balance-usd"))
completion = raw.parse()
print(completion.choices[0].message.content)
Other headers include X-Request-Id, which is worth logging for support, plus X-RateLimit-Limit-Requests and X-RateLimit-Limit-Concurrency. For a standalone balance check call GET /v1/balance.
The error you will meet first is HTTP 429. If the code is rate_limited you sent too many requests in a minute. If it is concurrency you have too many in flight, and a streaming request counts until the stream ends. If the response has Retry-After: 5, the service is briefly overloaded; wait five seconds and retry. Failed requests are not charged.
Common mistakes in the first hour
- Wrong base URL. It must end in
/v1. The SDK adds/chat/completionson its own. - A model name from another provider. There is only one model ID,
uncensored. - Forgetting the history. The bot seems to have amnesia because each request was sent alone. Append the previous turns.
- Hardcoding the key. It ends up in a repository. Use environment variables, and regenerate the key if it leaks.
- Expecting images. The API returns text. Image, audio and video generation are not offered.
A key that stops working after a rotation returns an authentication error. Check which key your shell is exporting before debugging anything else. Prices and top-up options are on the pricing page once the trial credit is spent.
Next steps
You now have a working no-filter chat backend. From here, read the documentation for the full parameter list, look at the pricing page before you plan traffic, and top up when the trial credit runs out. Top-ups are whole amounts from $20 to $500 in crypto (USDT on TRC20 or USDC on Base), and credit never expires. Lawful adult use is the intended scope, and sexual content involving minors is not allowed, without exception.
If you plan to serve other people, treat the quickstart as scaffolding. Move the key to a secret manager, add a request timeout, log the X-Request-Id value of every call, and keep a per-user message cap so one enthusiastic user cannot drain your credit overnight. Those four habits prevent most of the surprises that first deployments run into.
More guides
Common questions
Can I use the official OpenAI Python SDK?
Yes. Set base_url to https://api.nofilteraichatbot.com/v1, pass your key as api_key and use the model ID uncensored. No other change is needed.
Does it support streaming?
Yes. Set stream to true and you receive server-sent events, with usage data at the end of the stream.
How big can a prompt be?
The context window is 100,000 tokens, shared by the prompt and the completion. The request body can be up to 8 MB.
Is the model made by OpenAI?
No. It is an open-weight model run by an independent provider. Only the API format is compatible with OpenAI.
Secure your API key
Register, grab the key, update the endpoint. Simple integration.