Key points
- Change three values: base URL, API key and model ID uncensored.
- Streaming, tool calling and JSON mode keep working through the same SDK calls.
- Handle HTTP 429 with a retry, and release streaming connections to free concurrency slots.
- Cost example: 3,000 input and 700 output tokens per call comes to $0.0008.
What you change in your existing integration
The fastest chat gpt unrestricted alternative is one that speaks the same protocol as the thing you already use. This API implements POST /v1/chat/completions and GET /v1/models in the OpenAI format, so the work is configuration, not a rewrite.
| Setting | Before | After |
|---|---|---|
| Base URL | The OpenAI default | https://api.unrestrictedgpt.top/v1 |
| Key | Your OpenAI key | Your key from this site |
| Model | A GPT model name | uncensored |
| Auth header | Authorization: Bearer ... | Same format |
Two things are different in kind. The backend is an open-weight model run by an independent provider, not a GPT model, so answers will not be identical. And it is text only. If your app calls image generation, audio or embeddings through the same client, those calls will not work here, and you should keep them on their current service.
Step 1: get a key and check it
Sign up with Google, or with an email and a password, then open the API key page. New users can claim $0.50 of trial credit there with one click. The trial is valid for 7 days, needs no payment details and is limited to one per person. The key page shows the key once you are signed in.
Before touching your app, test the key from a terminal:
curl https://api.unrestrictedgpt.top/v1/models \
-H "Authorization: Bearer YOUR_KEY"
A JSON list that includes uncensored means the key and the URL are right. A 401 means the key is wrong or has stray whitespace. Fix this now, because it is much easier to debug here than inside a framework.
Step 2: point the SDK at the new base URL
With the official Python SDK, the constructor takes both values. Nothing else in your calling code needs to change.
from openai import OpenAI
client = OpenAI(
base_url="https://api.unrestrictedgpt.top/v1",
api_key="YOUR_KEY",
)
def ask(history):
r = client.chat.completions.create(
model="uncensored",
messages=history,
temperature=0.7,
)
return r.choices[0].message.content
history = [
{"role": "system", "content": "You are a candid assistant for adults."},
{"role": "user", "content": "Summarise the plot of a political thriller in five lines."},
]
print(ask(history))
In Node the pattern is identical:
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.unrestrictedgpt.top/v1",
apiKey: process.env.UNRESTRICTED_KEY,
});
const r = await client.chat.completions.create({
model: "uncensored",
messages: [{ role: "user", content: "Give me a blunt critique of this opening paragraph." }],
});
console.log(r.choices[0].message.content);
Read the key from an environment variable rather than hard-coding it. If you use a framework that exposes an "OpenAI-compatible" provider option, the same three values go into its settings.
Step 3: streaming, tools and JSON mode
Most chat apps stream. Set stream: true and read the chunks as you would with any OpenAI-compatible server. The stream ends with a usage block, so you can record token counts per request.
stream = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Write a short toast for a retirement party."}],
stream=True,
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
Tool calling uses the standard fields: tools, tool_choice, streamed tool_calls, and tool results sent back as messages with role: "tool". JSON mode is switched on with response_format: {"type": "json_object"}. Because the model is not GPT, test your tool schemas on real inputs. Keep descriptions short and parameter names plain, and validate arguments in your own code before acting on them.
The sampling controls temperature, top_p, stop, seed and the penalties are passed through, so existing presets carry over.
Step 4: handle limits without surprises
A full key allows 8 concurrent requests and 300 requests per minute. The trial key allows 2 and 60. If you go over, the API returns HTTP 429 and the error code tells you which limit you hit: rate_limited for requests per minute, concurrency for too many at once. A temporary overload also gives a 429, with Retry-After: 5.
import time
from openai import OpenAI, RateLimitError
def safe_ask(client, messages, tries=4):
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 rate limited after retries")
A streamed request keeps its concurrency slot until the stream finishes. If a user closes the tab and your server keeps reading, that slot stays busy. Cancel the upstream request when the client disconnects.
The context window is 100,000 tokens for prompt plus completion, and the body limit is 8 MB. For long chats, trim old turns instead of resending everything. Every response includes X-Request-Id; quote it if you ever contact support.
What the swap costs
Billing is prepaid, per token: $0.15 per 1M input and $0.50 per 1M output. Suppose a typical call in your app sends 3,000 tokens and returns 700.
- Input: 3,000 / 1,000,000 x $0.15 = $0.00045
- Output: 700 / 1,000,000 x $0.50 = $0.00035
- Per call: $0.0008, so 10,000 calls come to $8.00
Top-ups start at $20 and go to $500, with +5% from $50, +10% from $100 and +15% from $200. Payment is crypto only here, USDT on TRC20 or USDC on Base. A $200 top-up gives $230 of credit. Credit never expires, and failed or refused requests are not charged. Check the pricing page for the flow, and the docs for a longer reference. Prompts are not used for training.
Migrating without breaking production
Do not flip every user at once. Put the base URL, key and model name behind configuration, then route a small share of traffic to the new endpoint. A simple approach is a percentage flag per user ID, so the same person always gets the same backend and their conversation does not change voice halfway through.
Log the X-Request-Id header with every call and keep the token counts from the usage block. Compare three numbers between old and new: the share of requests that fail, the average output length, and how often users retry or rephrase. A jump in rephrasing usually means the prompt needs tuning, not that the model is wrong.
Prompts written for a GPT model often contain workarounds: instructions that tell the assistant to ignore its own rules, long disclaimers, or role-play wrappers. Remove them. They cost input tokens on every call, and with a model that is not tuned to refuse they only add noise. A short system message that states role, tone and format is enough.
Keep a rollback path. Because the client code is the same, rolling back means changing three configuration values. Test that rollback once before you need it.
Common errors and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
| 401 on every call | Wrong key, or whitespace pasted with it | Copy the key again from the key page and trim it |
| 404 or HTML in the reply | Base URL missing /v1 | Use https://api.unrestrictedgpt.top/v1 exactly |
| Model not found | An old GPT model name left in config | Set the model to uncensored |
429 with concurrency | Too many open requests, often unfinished streams | Close streams, lower parallel workers |
429 with rate_limited | More than 300 requests per minute (60 on trial) | Queue and back off |
| Request rejected for size | Body above 8 MB | Send fewer or shorter messages |
If you see something not covered here, send the request ID to support and describe what you expected.
Limits of the swap
Be honest with yourself about fit. This is one model with no image, audio or embedding support. Responses will differ in style from GPT, so prompts tuned to a GPT model may need small edits. The model is tuned for lawful adult use and will not produce sexual content involving minors, which is a hard limit and not a setting.
If those terms suit you, run your own test prompts on the trial credit and compare. That takes an afternoon and costs a fraction of a cent per request.
