UncensoredGPT API Base URL and Key Setup
Most setup problems come down to three strings: the base URL, the key and the model ID. Here are the right values, how to set them in code and in common tools, and what to check when a call fails.
Updated

Key points
- Base URL: https://api.uncensoredgpt.cc/v1, with the /v1 included.
- Model ID is uncensored; auth is a Bearer token in the Authorization header.
- Do not append /chat/completions yourself when an SDK asks for a base URL.
- GET /v1/models is the quickest way to test the key.
The three values you need
If you are looking for the uncensoredgpt api base url, it is https://api.uncensoredgpt.cc/v1. Together with your key and one model name, that is the whole configuration. The service is OpenAI-compatible, so any client that lets you override the OpenAI base URL will work.
| Setting | Value |
|---|---|
| Base URL | https://api.uncensoredgpt.cc/v1 |
| API key | The secret from your key page, sent as Authorization: Bearer <key> |
| Model | uncensored |
Two endpoints exist: POST /v1/chat/completions for chat and GET /v1/models for the model list. Nothing else from the OpenAI API is offered, so there are no image, audio or embedding routes to configure.
Step 1: get a key
Sign up with Google, or with an email address and a password, and open the key page. A new user can claim $0.50 of trial credit with one click. It is limited to one per person, needs no card and is valid for 7 days. The trial key allows 2 concurrent requests and 60 requests per minute, which is enough to verify your setup.
For real use, add credit. Any whole amount from $20 to $500 works, with a bonus of 5% from $50, 10% from $100 and 15% from $200. You can pay with crypto (USDT on TRC20, USDC on Base). The steps are on the API key page. Keep the key out of source control and out of front-end JavaScript, since anyone who reads it can spend your credit.
Step 2: test with curl
Start with the model list. It is a GET request that costs nothing and proves that the URL, the path and the header are all right.
curl https://api.uncensoredgpt.cc/v1/models \
-H "Authorization: Bearer $API_KEY"Then send a chat request. The body is the standard chat completions JSON.
curl https://api.uncensoredgpt.cc/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Say hello in five words."}],
"max_tokens": 30
}'Look at the response headers as well. X-Balance-USD shows your remaining credit, X-Request-Id identifies the request if you contact support, and X-RateLimit-Limit-Requests and X-RateLimit-Limit-Concurrency show the limits of your key.
Step 3: set it in your SDK
Python
from openai import OpenAI
client = OpenAI(
base_url="https://api.uncensoredgpt.cc/v1",
api_key="YOUR_KEY",
)
out = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Name three uses of a base URL."}],
)
print(out.choices[0].message.content)Node
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.uncensoredgpt.cc/v1",
apiKey: process.env.API_KEY,
});
const out = await client.chat.completions.create({
model: "uncensored",
messages: [{ role: "user", content: "Name three uses of a base URL." }],
});
console.log(out.choices[0].message.content);Environment variables
Recent versions of the official OpenAI libraries read OPENAI_BASE_URL and OPENAI_API_KEY when you do not pass them in code. That is the easiest way to redirect a tool you cannot edit.
export OPENAI_BASE_URL="https://api.uncensoredgpt.cc/v1"
export OPENAI_API_KEY="YOUR_KEY"Setting it in other tools
Chat front ends and agent frameworks usually have a settings screen with a few fields. The labels differ, but the mapping is stable.
- "API base URL", "Endpoint", "Custom OpenAI URL": the base URL above, including
/v1. - "API key": your key. Leave any organization field empty.
- "Model": type
uncensoredby hand if the dropdown does not list it. Some tools callGET /v1/modelsand fill the list for you.
Tools such as SillyTavern let you add a custom OpenAI-compatible endpoint, and the same pattern applies to most clients that advertise "OpenAI-compatible" support. If a tool only offers a fixed list of vendors and no custom URL, it cannot use this service.
A few tools ask for a "provider type" before they show the URL field. Choose the generic OpenAI or "OpenAI-compatible" option, not a vendor-specific one, because vendor-specific options often hard-code their own address and ignore yours. After saving, use the tool's "test connection" or "fetch models" button if it has one. A successful model fetch means the base URL and key are both right, and anything that fails after that is down to the model name or the request body.
The docs page has a short quickstart for moving an existing GPT-based project over, including streaming and tool calling.
When a call fails: a checklist
Work through these in order. They cover nearly every setup failure.
- Missing
/v1. The base URL ends in/v1. Leaving it off sends the request to a path that does not exist, and the typical symptom is a not-found response. - Doubled path. SDKs add
/chat/completionsthemselves. If you paste the full path into a base URL field, the request goes to a doubled path and fails. Use the base URL only. In raw curl you do write the full path. - Wrong or stale key. A key with an extra space or a line break from copying will be rejected. Print its length and compare with the key page.
- Wrong model name. The ID is
uncensored, in lowercase. Names like a vendor model will not match, since this is not a router. - HTTP 429. The error code
rate_limitedmeans too many requests per minute;concurrencymeans too many at the same time; aRetry-After: 5header marks a temporary overload. Wait and retry. A streamed request holds its slot until the stream ends. - A proxy or VPN in the way. Corporate proxies sometimes strip headers or buffer streamed responses, which makes streaming look frozen. Test the same curl command from a plain network to rule this out.
- Request too large. The body limit is 8 MB, and the context window is 100,000 tokens including the completion.
If the key works against /v1/models but a chat call fails, the cause is almost always the model name or the body. If nothing works, test the same key from curl on another network to rule out a proxy or firewall.
After the basics: headers, keys and streaming
Reading balance and limits from code
Every response carries the numbers you care about in its headers. The Python SDK exposes them through a raw-response wrapper, which returns the headers and still lets you parse the normal object.
from openai import OpenAI
client = OpenAI(
base_url="https://api.uncensoredgpt.cc/v1",
api_key="YOUR_KEY",
)
raw = client.chat.completions.with_raw_response.create(
model="uncensored",
messages=[{"role": "user", "content": "ping"}],
max_tokens=5,
)
print(raw.headers.get("X-Balance-USD"))
print(raw.headers.get("X-RateLimit-Limit-Requests"))
print(raw.headers.get("X-RateLimit-Limit-Concurrency"))
print(raw.headers.get("X-Request-Id"))
completion = raw.parse()
print(completion.choices[0].message.content)Logging X-Balance-USD after each call is a cheap way to build a low-credit alert. The two rate limit headers tell you which kind of key you are holding: 60 requests per minute and 2 concurrent means a trial key, 300 and 8 means a full key.
Keeping the key safe
A leaked key spends your credit. Treat it like a database password. Keep it in an environment variable or a secrets manager, never in a front-end bundle, a mobile app binary or a public repository. If your web page needs to call the model, put a small server between the browser and the API, and let the server add the header.
Use one key per project when you can, so that you can replace a single exposed key without breaking everything else. If you committed a key by mistake, assume it is public from that moment: replace it first, then clean the history. Also remember that error logs and screenshots of terminal sessions often contain the full command line, including the Authorization header, so scrub them before you share them.
Streaming once a plain call works
After a plain call succeeds, switch to streaming so users see words as they are generated. The base URL stays the same. Pass stream=True and read the chunks, which end with a final chunk that carries usage.
from openai import OpenAI
client = OpenAI(
base_url="https://api.uncensoredgpt.cc/v1",
api_key="YOUR_KEY",
)
stream = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Write a four-line poem about proxies."}],
stream=True,
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
print()Remember that a streamed request holds its concurrency slot until the stream ends, so a client that stops reading without closing the connection can use up slots. Close streams you abandon. JSON mode and tool calling use the same base URL and the same model ID; the docs show their request shapes.
What it costs once you are connected
Billing is per token and prepaid: $0.15 per 1M input tokens and $0.50 per 1M output tokens, with no subscription. For a first test of 500 input tokens and 200 output tokens, the cost is 500 × $0.15 / 1,000,000 = $0.000075 plus 200 × $0.50 / 1,000,000 = $0.0001, which is $0.000175 in total. The $0.50 trial credit therefore covers thousands of small test calls. Failed or refused requests are not charged, and the credit never expires. See the pricing page for the top-up table.
More guides
Questions and answers
What is the base URL?
It is https://api.uncensoredgpt.cc/v1, including the /v1 at the end. SDKs append /chat/completions themselves.
What do I put in the model field?
Use uncensored. It is the only model ID, and GET /v1/models lists it.
Why do I get a 429 error?
You hit a limit. The code rate_limited means too many requests per minute, concurrency means too many at once, and a Retry-After header of 5 seconds means temporary overload.
Can I use it with tools that only support OpenAI?
Yes, if the tool lets you set a custom base URL and API key. Set the base URL, the key and the model name, and it behaves like the OpenAI API for chat requests.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.