Uncensored ai chatgpt API Quickstart
Swap your OpenAI base URL to enable uncensored inference with zero code changes. This drop-in API accepts adult content and supports standard SDK integrations immediately.
Install your SDK
Start by installing the official client library for your preferred language. The standard OpenAI SDKs work perfectly because we use the same protocol. Install the package using your usual package manager to get ready for configuration.
Configure the base URL
Point your client to our specific endpoint to enable uncensored responses. You must set the base_url to https://api.uncensoredaichatgpt.com/v1 and provide your API key. This small change directs traffic to our servers while keeping your existing integration logic intact.
curl https://api.uncensoredaichatgpt.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Generate a list of ten unique features for a new streaming platform."}]
}'
Make your first request
Send a standard chat/completions request using the model ID uncensored. Our model does not refuse lawful adult, fictional, or controversial topics by default. The response returns text directly, allowing you to verify that content filters are inactive in your output.
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoredaichatgpt.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)
Handle streaming responses
Enable streaming by setting stream: true to receive tokens in real-time. This approach reduces perceived latency for long-form generation or roleplay. Each chunk includes usage data only in the final response, ensuring you can track token consumption accurately without waiting for the full completion.
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)
Use tools and JSON mode
Utilize function calling and strict JSON formatting for structured data extraction. Pass response_format with {"type": "json_object"} to enforce consistent schema output. This capability works alongside standard parameters like temperature and top_p to control creativity while maintaining programmatic reliability.
Monitor token usage
Track your prepaid credit balance through usage metrics returned in the response headers. Errors and refusals do not consume tokens, so you only pay for successful content generation. Your context window supports 100,000 tokens total, with a maximum output limit of 16,000 tokens per request.
Node.js
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncensoredaichatgpt.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);Common questions
What is the uncensored AI chatgpt API context limit?
The context window supports 100,000 tokens for both prompt and completion combined. You can request up to 16,000 tokens per output, or 2,048 tokens if you do not specify a max_tokens value.
Why do I get a 402 error?
A 402 error indicates that your prepaid credit balance is insufficient for the requested generation. Since we charge per token used, you must top up your account using USDT or USDC to resume service.
What happens if I hit the rate limit?
You are limited to 300 requests per minute and 8 concurrent requests per key. Exceeding these limits returns a 429 error; wait briefly or use a different API key to continue processing.
Get your API key
Sign up, grab the key, and update your base URL. That is it.