Authentication and base URL
Your API key grants access to the endpoint. Use the base URL HTTPS://api.gptchatunrestricted.com/v1 for all requests. The service is OpenAI-compatible, so you can swap your existing base_url in any SDK.
- Send your key in the
Authorizationheader. - Use the model ID
uncensoredfor all completions.
We do not offer subscriptions. Your prepaid credit is charged based on real token usage. Errors and refusals do not consume your balance.
Sending your first request
Make a POST request to the chat completions endpoint with your message. This endpoint accepts text input and returns text output. You do not need to specify complex parameters for a basic test.
- Set the
modelfield touncensored. - Include a
messagesarray with your content.
The API returns a standard JSON object containing the generated text. You can use this response directly in your application logic.
curl https://api.gptchatunrestricted.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "List all required headers for a POST request"}]
}'
Using the Python SDK
Install the official OpenAI Python package. Configure it to point to our base URL and use your API key. This allows you to use familiar methods like chat.completions.create().
- Initialize the client with your base URL.
- Call the chat completion method with the
uncensoredmodel.
This approach works with any Python project that already uses the OpenAI SDK. You can pass parameters like temperature to control randomness.
from openai import OpenAI
client = OpenAI(base_url="https://api.gptchatunrestricted.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)
Using the Node SDK
Install the OpenAI Node.js package. Set the base URL to our endpoint. This enables you to use the same code structure you would use for other OpenAI-compatible services.
- Import the
OpenAIclass. - Set the
baseUrlandapiKeyin the constructor.
You can then call chat.completions.create() just like you would for GPT-4. The response structure remains consistent with standard OpenAI outputs.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.gptchatunrestricted.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 and usage data
Enable streaming by setting stream: true in your request. The API sends a series of Server-Sent Events (SSE). Each event contains a partial chunk of the response.
- Parse the SSE stream to handle partial text.
- The final chunk contains the token usage data.
This is useful for real-time displays. You can update the UI as tokens arrive. The last chunk includes the total input and output token counts for billing transparency.
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)
Rate limits and constraints
The API enforces a limit of 300 requests per minute per key. You can have up to 8 concurrent requests simultaneously. The maximum request body size is 8 MB.
- Monitor your usage to avoid 429 errors.
- Use exponential backoff for retries.
Your context window is 100,000 tokens for both prompt and completion combined. The maximum output per request is 16,000 tokens. If you do not set max_tokens, the default output limit is 2,048 tokens.