it ▾

Uncensored ai chat API documentation

This is an uncensored AI chat API designed for developers who need reliable, OpenAI-compatible endpoints without content refusals. You can integrate this service into your applications using standard SDKs and pay with crypto on a transparent, pay-as-you-go basis.

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 Authorization header.
  • Use the model ID uncensored for 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 model field to uncensored.
  • Include a messages array 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 uncensored model.

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 OpenAI class.
  • Set the baseUrl and apiKey in 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.

Frequently asked questions

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

Check your request payload for the <code>response_format</code> parameter. Ensure you are using the correct model ID <code>uncensored</code>. Verify that your code handles the JSON structure returned by the API correctly.

What happens if I hit the rate limit?

You will receive a 429 status code. Your request is rejected without consuming your prepaid credit. Wait a few seconds before retrying. Implementing exponential backoff is recommended for robust client applications.

Does the API support function calling and JSON mode?

Yes, you can use the <code>tools</code> and <code>tool_choice</code> parameters for function calling. Set <code>response_format</code> to <code>{"type": "json_object"}</code> to enforce JSON output. This ensures structured data for your applications.

Access your API key

Sign up, copy the key, update the base URL. That’s all it takes.

Open account