Key points
- Three values change: base URL, API key and model ID uncensored.
- Streaming, tool calling and JSON mode work through standard parameters.
- A full key allows 8 concurrent requests and 300 requests per minute.
- Handle HTTP 429 with a short wait and retry, and read X-Balance-USD to track credit.
The three values you change
| Setting | Value |
|---|---|
| Base URL | https://api.unfilteredchatgpt.com/v1 |
| API key | Your key, sent as Authorization: Bearer YOUR_KEY |
| Model | uncensored |
Everything else in your OpenAI-style code stays as it is. The service implements POST /v1/chat/completions and GET /v1/models. If a library asks for a "provider", pick the OpenAI-compatible or custom option, then fill in those three values.
You need a key first. Sign up with Google or with email and password, open the API key page, and create one. New accounts can claim $0.50 of trial credit with one click there, valid for 7 days and without any payment details.
Test the connection with curl
Before touching application code, confirm the key and endpoint work. List the models first:
# model id to look for: uncensored
curl https://api.unfilteredchatgpt.com/v1/models \
-H "Authorization: Bearer YOUR_KEY"
You should see uncensored in the list. Then send a chat request and print the headers with -i:
curl -i https://api.unfilteredchatgpt.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"uncensored","messages":[{"role":"user","content":"Reply with the word ready."}],"max_tokens":10}'
Look at the response headers. X-Request-Id identifies the call if you ever contact support, X-Balance-USD shows your remaining credit, and X-RateLimit-Limit-Requests and X-RateLimit-Limit-Concurrency show the limits that apply to your key. A 401 means the key is wrong or missing; check for stray spaces or a missing Bearer prefix.
OpenAI SDK in Python and Node
The official OpenAI libraries accept a base URL in the constructor. Reading the key from an environment variable keeps it out of your repository.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.unfilteredchatgpt.com/v1",
api_key=os.environ["UNCENSORED_KEY"],
)
stream = client.chat.completions.create(
model="uncensored",
messages=[
{"role": "system", "content": "You are a direct, unsentimental assistant."},
{"role": "user", "content": "Draft a ruthless negotiation scene."},
],
stream=True,
stream_options={"include_usage": True},
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")
Streaming runs over SSE and ends with a usage chunk, which is handy for logging cost per request. In Node the pattern is the same:
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.unfilteredchatgpt.com/v1",
apiKey: process.env.UNCENSORED_KEY,
});
const res = await client.chat.completions.create({
model: "uncensored",
messages: [{ role: "user", content: "Give me three plot twists." }],
temperature: 0.9,
top_p: 0.95,
});
console.log(res.choices[0].message.content);
The sampling parameters temperature, top_p, stop, seed and the frequency and presence penalties are passed through to the model.
LangChain
LangChain's OpenAI chat class takes the same three values. Install langchain-openai and build the model object once, then use it in chains and agents as usual.
import os
from langchain_openai import ChatOpenAI
from langchain_core.prompts import ChatPromptTemplate
llm = ChatOpenAI(
base_url="https://api.unfilteredchatgpt.com/v1",
api_key=os.environ["UNCENSORED_KEY"],
model="uncensored",
temperature=0.7,
)
prompt = ChatPromptTemplate.from_messages([
("system", "You write morally grey characters for adult fiction."),
("human", "{brief}"),
])
chain = prompt | llm
print(chain.invoke({"brief": "A smuggler who lies for a living."}).content)
Tool calling goes through the standard OpenAI tools and tool_choice fields, so LangChain's tool binding works as documented. Tool results go back as messages with role: "tool". For structured output, set response_format to {"type":"json_object"} and say in the prompt that you want JSON; the model needs that hint as much as the flag.
Tool calling, JSON mode and a launch checklist
Agents and structured pipelines need the model to call functions or return parseable output. Both work through the standard fields. You describe a function in tools, the model replies with a tool_calls entry, your code runs the function, and you send the result back as a message with role: "tool".
import json
from openai import OpenAI
client = OpenAI(base_url="https://api.unfilteredchatgpt.com/v1", api_key="YOUR_KEY")
tools = [{
"type": "function",
"function": {
"name": "lookup_order",
"description": "Find an order by its number",
"parameters": {
"type": "object",
"properties": {"order_id": {"type": "string"}},
"required": ["order_id"],
},
},
}]
messages = [{"role": "user", "content": "Where is order 4812?"}]
first = client.chat.completions.create(model="uncensored", messages=messages, tools=tools)
call = first.choices[0].message.tool_calls[0]
messages.append(first.choices[0].message)
messages.append({
"role": "tool",
"tool_call_id": call.id,
"content": json.dumps({"status": "shipped"}),
})
final = client.chat.completions.create(model="uncensored", messages=messages, tools=tools)
print(final.choices[0].message.content)
Two habits save debugging time. Always parse call.function.arguments with a try block, because models occasionally produce malformed JSON, and on failure send the error back as the tool result so the model can correct itself. And set tool_choice to a specific function when you need exactly one call rather than a free choice. For plain structured output without tools, use response_format with json_object and describe the keys you expect in the prompt.
Checklist before you ship
- Store the key in an environment variable or secrets manager, never in client-side code. Anyone who finds it can spend your credit.
- Call the models endpoint once at startup so a wrong key fails loudly.
- Set a worker limit of 8 and a retry wrapper for 429.
- Log
X-Request-Id, token usage andX-Balance-USDfor each call. - Write a system prompt that states the role and the output format, and test it on the prompts that your previous provider refused.
- Keep a moderation step of your own if your product is public, and keep the audience to adults.
If something behaves oddly, the support page explains how to get help, and the request ID from the header makes the report much easier to trace.
Cursor and other editors
Several editors and coding assistants let you override the OpenAI base URL and supply your own key. Cursor is one of them: its model settings include an option to use your own OpenAI-compatible key and to change the base URL. Menu names move between versions, so look for a field labelled "Override OpenAI Base URL" or similar, paste the endpoint from the table above, add your key, and add a custom model named uncensored.
Two practical notes. First, some editor features are built around specific hosted models, so a custom endpoint may cover chat but not every feature; test the parts you rely on. Second, a coding assistant sends large prompts that include file contents. Those tokens are billed at the input rate of $0.15 per 1M, which is inexpensive, but keep an eye on X-Balance-USD if you let an agent loop.
The same approach works for any tool with a custom OpenAI endpoint field: chat front ends, note-taking plugins, automation platforms and your own scripts. The quickstart lists the fields in one place.
Handling limits and errors in production
A full key allows 8 concurrent requests and 300 requests per minute. A trial key is limited to 2 concurrent and 60 per minute. The request body can be up to 8 MB. When you cross a limit you get HTTP 429 with the code rate_limited for requests per minute or concurrency for too many requests at once. If the service is briefly overloaded it also returns 429, with a Retry-After: 5 header.
A streamed request holds its concurrency slot until the stream finishes, so a client that opens streams and never reads them will starve itself. Close streams you abandon. Here is a small retry wrapper that respects the header:
import time
from openai import OpenAI, RateLimitError
client = OpenAI(base_url="https://api.unfilteredchatgpt.com/v1", api_key="YOUR_KEY")
def ask(messages, tries=4):
for attempt in range(tries):
try:
return client.chat.completions.create(model="uncensored", messages=messages)
except RateLimitError as err:
wait = int(err.response.headers.get("Retry-After", 5))
time.sleep(wait * (attempt + 1))
raise RuntimeError("still rate limited")
Failed or refused requests are not charged, so retrying does not double your bill. Cap your own worker pool at 8 to stay under the concurrency limit instead of relying on retries. More on pricing and top-ups is on the pricing page.
What this setup does not cover
Keep expectations clear. This is a text endpoint with one open-weight model run by an independent provider. There are no image, audio or video endpoints, no embeddings and no fine-tuning, so a retrieval pipeline needs embeddings from somewhere else. The model is not an official product of OpenAI or any other vendor, and it is not a router across several models.
It is tuned to answer without content refusals for lawful adult use. Sexual content involving minors is never allowed. Prompts are not used for training. With a 100,000-token window you can pass long documents or chat histories, but you pay for every token sent, so trim context you do not need.
More guides
- Unfiltered ChatGPT Alternative: Uncensored LLM API
- Is There an Unfiltered Version of ChatGPT?
- Uncensored LLM API: OpenAI-Compatible Integration
FAQs
- Is the API really uncensored? Yes, the model is tuned to answer without content refusals for lawful adult use. It will not refuse typical mature or controversial topics, though it will block sexual content involving minors.
- Do I need a credit card? No, you can sign up with just an email or Google account. Payments are made by crypto (USDT on TRC20, USDC on Base), so no card is needed for the trial or top-ups.
- Can I use this with the OpenAI Python SDK? Yes, the API is OpenAI-compatible. You just need to change the base URL and API key in your SDK configuration.
- What happens if I get an error? Errors are free, so you do not pay for failed requests. If you experience a billing issue, contact support for a fix.
