Why a hosted endpoint instead of running the model
Search for an unrestricted chatbot GitHub repository and you will find two kinds of projects. The first kind bundles a model runner, which means downloading weights, owning a GPU and tuning memory settings. The second kind is a chat interface or bot framework that sends requests to any server speaking the OpenAI format. The second kind is much easier to run, and it is the one this article is about.
If the project accepts a custom base URL, you can point it at a hosted API and skip the hardware. You pay per token from prepaid credit, and the model stays on someone else's servers. The endpoint here is OpenAI-compatible, so a project written for the OpenAI SDK needs very little change.
The three values every project needs
Whatever the repository looks like, you are filling in the same three fields:
| Field | Value |
|---|---|
| Base URL | https://api.chatbotunrestricted.com/v1 |
| API key | Your key, sent as Authorization: Bearer <key> |
| Model | uncensored |
To get a key, sign up with Google or with email and password, then open the API key page. One click there claims $0.50 of trial credit, which is valid for 7 days and needs no payment. It is enough to test a repository before you decide to top up.
Many projects read the standard OpenAI environment variables. The official OpenAI SDKs look at OPENAI_API_KEY and OPENAI_BASE_URL, and older code sometimes uses OPENAI_API_BASE. A typical .env file looks like this:
OPENAI_API_KEY=paste-your-key-here
OPENAI_BASE_URL=https://api.chatbotunrestricted.com/v1
# name differs per project; check the README
DEFAULT_MODEL=uncensoredChat front ends that accept a custom endpoint
Several well-known self-hosted chat interfaces let you add an OpenAI-compatible connection from their settings screen, so you never touch the code. SillyTavern, for example, lets you add an OpenAI-compatible endpoint, and Open WebUI and LibreChat both document custom OpenAI-style connections. Menu names change between versions, so follow the README or docs of the version you installed.
The pattern is the same everywhere: choose the "custom" or "OpenAI-compatible" option, paste the base URL, paste the key, and type uncensored as the model name if the app does not list it. If the app has a "fetch models" button, it calls GET /v1/models, which this API supports.
Test the endpoint before you touch the repo
Settle one question first: does your key work at all? A single request from the terminal separates key problems from repository problems. If this call succeeds and the project fails, the bug is in the project's configuration, not in the account.
curl https://api.chatbotunrestricted.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "uncensored", "messages": [{"role": "user", "content": "Say hello in one sentence."}]}'
A healthy reply is a JSON object with a choices array and a usage block. The response headers include X-Balance-USD, so you can watch the remaining credit shrink as you test. Failed or refused requests are not charged, which makes experimenting with a broken config cheap.
If you want a quick look at what the project will see, call GET /v1/models with the same bearer header. The list should include uncensored.
Patching a repository with hard-coded values
Smaller bots and tutorial repositories often hard-code the OpenAI address or a model such as a GPT name. Find every spot before you run anything:
grep -rnE "api\.openai\.com|gpt-|OPENAI_|openai\.com" --include="*.py" --include="*.js" --include="*.ts" --include="*.env*" .
Then change the client construction. In Python:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.chatbotunrestricted.com/v1",
api_key=os.environ["API_KEY"],
)
MODEL = "uncensored"
And in Node:
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.chatbotunrestricted.com/v1",
apiKey: process.env.API_KEY,
});
const MODEL = "uncensored";
Replace every model string with the constant. A leftover GPT model name is the most common cause of a "model not found" error on the first run.
A small chatbot to start from
If the repository you cloned is too tangled, this script is a clean base. It keeps the conversation history, streams the reply and runs in a terminal:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.chatbotunrestricted.com/v1",
api_key=os.environ["API_KEY"],
)
history = [{"role": "system", "content": "You are a witty storyteller. Stay in character."}]
while True:
user = input("you> ").strip()
if user in ("exit", "quit"):
break
history.append({"role": "user", "content": user})
stream = client.chat.completions.create(
model="uncensored",
messages=history,
stream=True,
)
reply = ""
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
piece = chunk.choices[0].delta.content
print(piece, end="", flush=True)
reply += piece
print()
history.append({"role": "assistant", "content": reply})
Run it with API_KEY=your-key python chat.py. The system message is where you set persona and tone. With a model tuned to answer without content refusals, that message is the main control you have, so spend time on it.
What breaks and how to fix it
Open-source chatbots are written for the OpenAI API, and a few of their habits do not carry over. This table covers what you are most likely to hit:
| Symptom | Likely cause | Fix |
|---|---|---|
| 401 on every call | Wrong key, or the app still sends the key to the OpenAI address | Check the base URL setting and the key |
| Model not found | A GPT model name is still configured | Set the model to uncensored |
429 with concurrency | The app opens too many requests at once (limit: 8 on a full key, 2 on a trial key) | Lower the worker count or queue calls |
429 with rate_limited | More than 300 requests per minute (60 on a trial key) | Add a delay or a retry with backoff |
| Feature calls fail | The repo uses embeddings, image generation or voice | These are not available here; use another service for them |
| Long chats suddenly error | History plus answer passed 100,000 tokens | Trim or summarise old messages |
Only /v1/chat/completions, /v1/responses and /v1/models exist, so a project that depends on any other endpoint needs a code change. Streaming, tool calling and JSON mode all work, which covers most agent-style repositories.
Keep your key out of the repository
When you fork a project and push your changes, a key pasted into a source file becomes public. Put it in an environment variable or a .env file, add .env to .gitignore before your first commit, and publish only a .env.example with a placeholder. If a key does leak, regenerate it on the API key page; the old key stops working at once. Accounts that have topped up can also hold up to 5 labelled keys, so you can give each project its own and revoke one without touching the others.
Before you share a bot with other people, read the production checklist for the uncensored AI chatbot, check the per-token rates on the pricing page, and skim the API documentation for request options. Credit is prepaid and does not expire, so a hobby bot costs only what it actually uses.
