UnsensoredGPTOpenAI-Compatible API Documentation
OpenAI-Compatible API Documentation
Get started with the unsensored GPT API in minutes by pointing your existing OpenAI SDK to our base URL. This documentation covers authentication, request formats, and handling streaming responses for your uncensored AI applications.
https://api.unsensoredgpt.com/v1
Base URL and Authentication
The first step is to configure your client to use our base URL. Point your SDK to https://api.unsensoredgpt.com/v1 and pass your API key in the Authorization header. You receive this key immediately after signing up via Google or email on the dashboard.
Our authentication is straightforward: no complex scopes or OAuth flows. Just use the key you generated.
The model identifier you must send in every request is uncensored. This is an open-weight model tuned for adult use, distinct from GPT or Claude. It is not a resold vendor model.
First Request
Send a standard chat completion request to test connectivity and token usage. Use the uncensored model ID to ensure you are hitting our specific tuning.
This example demonstrates a simple text generation task. If you receive a JSON response with content, your integration is working correctly.
curl https://api.unsensoredgpt.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Generate the API status response"}]
}'Check the usage field to verify token counts against our prepaid credit balance.
Python SDK Integration
Use the official openai Python library to interact with our API. Set the base URL to our endpoint and provide your API key.
This approach allows you to reuse existing codebases without rewriting HTTP clients. The library handles serialization automatically.
from openai import OpenAI
client = OpenAI(base_url="https://api.unsensoredgpt.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)Remember to specify the model explicitly as uncensored in your client initialization or request payload.
Node SDK Integration
For JavaScript developers, the Node.js SDK works identically to the Python version. Initialize the client with your base URL and key.
Pass the uncensored model ID to ensure correct routing. The SDK manages connection pooling and retries.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.unsensoredgpt.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);This setup supports both synchronous and asynchronous calls depending on your application architecture.
Streaming Responses (SSE)
Enable streaming by setting stream: true in your request. Our API returns Server-Sent Events (SSE) for real-time token delivery.
Parse the delta.content field from each chunk to assemble the final response. Token usage statistics are included in the final chunk.
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)Streaming reduces perceived latency for long outputs. It is ideal for chat interfaces.
Limits, Errors, and Context
Your context window is 100,000 tokens total. The maximum output per request is 16,000 tokens. Exceeding these limits returns a 400 error.
Common errors include 401 for invalid keys, 402 for insufficient prepaid credit, and 429 for rate limits. The rate limit is 300 requests per minute per key.
Prompts are not used for training. Your credit never expires. Handle 402 errors by topping up via crypto to resume service.
Common questions
What is the base URL for the unsensored GPT API?
The base URL is HTTPS://api.unsensoredgpt.com/v1. You must set this in your OpenAI-compatible client configuration.
Does this API support streaming?
Yes, set stream: true to receive Server-Sent Events. Token usage is reported in the final chunk.
What happens if I run out of credit?
Requests return a 402 error. You can top up with USDT or USDC anytime. Credit never expires.
Unlock your API key
Sign up, retrieve your key, and point to the new base URL. That is the entire configuration.
Get API key