Uncensored gpt API Documentation
Get started with the uncensored GPT API by sending a simple request. This guide covers authentication, SDK integration, streaming, and error handling for immediate use.
Base URL and Authentication
Connect using the official base URL and your API key. The endpoint is https://api.uncencoredgpt.com/v1. Pass your key in the Authorization header. This works with any OpenAI-compatible client.
- Key format:
Bearer sk-... - No subscription fees apply.
curl https://api.uncencoredgpt.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "List the top five open source models."}]
}'
First Chat Request
Send a prompt and get a response. Use the model ID uncensored. The API accepts standard chat completion parameters. Responses are text-only.
from openai import OpenAI
client = OpenAI(base_url="https://api.uncencoredgpt.com/v1", api_key="YOUR_KEY")
resp = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Summarise this thread without softening it."}],
)
print(resp.choices[0].message.content)
Node.js Integration
Integrate with JavaScript projects easily. Set the base URL and model ID. The SDK handles serialization automatically.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncencoredgpt.com/v1", apiKey: process.env.API_KEY });
const resp = await client.chat.completions.create({
model: "uncensored",
messages: [{ role: "user", content: "Draft a villain monologue for my game." }],
});
console.log(resp.choices[0].message.content);
Streaming Responses
Receive tokens as they generate. Enable streaming by setting stream: true. Read chunks to display partial output. This reduces perceived latency significantly.
stream = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Tell the story in second person."}],
stream=True,
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
Parameters: Temperature and Top-P
Control randomness with temperature and top_p. Higher values increase creativity. Lower values improve determinism. Use seed for reproducible outputs. Adjust these to fit your use case.
Limits, Errors, and Context
Watch for rate limits and context windows. The context window is 100,000 tokens total. Errors include 401 for invalid keys and 429 for rate limits. Refusals are free.
Common questions
Is this the uncensored GPT model?
No, it is an open-weight uncensored model. It is not GPT, Claude, or any other vendor's model. It accepts the same API format.
How do I pay?
Pay with crypto. USDT (TRC20) or USDC (Base) only. Minimum top-up is $20. Credits never expire.
What is the context window?
The context window is 100,000 tokens. This includes both prompt and completion. Max output is 16,000 tokens per request.
Get your API key
Register, copy the key, update the base URL. That is all the setup needed.