EN ▾
Get API key

API documentation for uncensored models

Swap your base URL to HTTPS://api.unrestrictedgptchat.com/v1 and keep your existing SDK integration working with our uncensored LLM API.

uncensoredhttps://api.unrestrictedgptchat.com/v1

On this page
  1. Authentication and headers
  2. POST /v1/chat/completions
  3. GET /v1/models
  4. Streaming responses and token usage
  5. Function calling and JSON mode
  6. Rate limits and error handling
  7. Frequently asked questions
unrestrictedgptchat.com/docs/#text

Authentication and headers

Send your API key in the Authorization header for every request. Use the format Bearer YOUR_API_KEY and include it in the Authorization field. Your key is generated immediately after signup via Google or email. There is no phone number required for registration. Keep your key secure in environment variables to prevent unauthorized usage against your prepaid balance. The header ensures our servers identify your account for accurate token billing.

POST /v1/chat/completions

Make your first request to generate text responses. Use the POST /v1/chat/completions endpoint with the model set to uncensored. This endpoint accepts standard message arrays containing user and assistant roles. You can stream responses or receive full text based on your client configuration. The model processes your input and returns text without content refusals for lawful adult use. Check the rate limits page for concurrency constraints.

GET /v1/models

Retrieve available model information using the GET endpoint. This returns metadata about the uncensored model and its capabilities. You can verify the model ID before sending completion requests. The response confirms the API compatibility with standard OpenAI structures. Use this to debug client configurations quickly. It helps ensure your SDK is pointing to the correct service version. This endpoint does not consume token credits from your account.

Streaming responses and token usage

Enable streaming by setting the stream parameter to true. You receive server-sent events (SSE) as tokens are generated. The final chunk contains the total token usage for the request. This allows real-time display of responses in your application. Token counts help you monitor your prepaid balance accurately. Errors during streaming are handled by closing the stream normally. You can interrupt the stream without penalty if needed.

Function calling and JSON mode

Use the tools parameter for function calling capabilities. Set response_format to json_object for strict JSON output. The model supports structured data generation for your applications. You can define custom tools in the request body. The API validates the structure before sending it to the model. This ensures consistent parsing in your downstream code. JSON mode is ideal for automated workflows requiring specific formats.

Rate limits and error handling

Expect 429 errors if you exceed 300 requests per minute. The limit allows 8 concurrent requests per key. Request bodies must stay under 8 MB. If you receive a 401 error, check your API key validity. A 402 error indicates insufficient prepaid credit. Errors do not consume tokens from your balance. The context window supports 100,000 tokens for prompt and completion combined. Max output is 16,000 tokens unless specified otherwise. Handle these errors gracefully in your client code.

cURL

curl https://api.unrestrictedgptchat.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "what is the capital of france"}]
  }'

Python

from openai import OpenAI

client = OpenAI(base_url="https://api.unrestrictedgptchat.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

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.unrestrictedgptchat.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

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)
unrestrictedgptchat.com/docs/#s1

Frequently asked questions

Is this the same API as chat GPT unrestricted standard models?

No, we serve our own uncensored open-weight model, not GPT or other vendor models. You can use the same SDK code but point to our base URL. The model is tuned for fewer refusals on lawful adult topics. Check our pricing page for specific token costs.

How do I debug missing citations in parallel chat API responses?

Ensure you are setting the correct model ID to uncensored. Verify your headers include the valid API key. Check the response format for proper JSON structure. Streaming chunks should be aggregated correctly in your client.

What happens if I exceed the rate limit?

You receive a 429 status code indicating too many requests. You must wait before sending more requests to your key. The limit resets every minute. Concurrent requests are capped at 8 per key. Increase your key concurrency by generating a new key if needed.

Get your API key now

Sign up, copy your key, and update the base URL. That’s all.

Get API key