EN ▾
Get your key
chatunrestricted.com

API Documentation

Connect your Python or Node.js app to an uncensored LLM in under a minute. Use the standard OpenAI-compatible endpoints to generate text without content refusals.

Quickstart: First request with Python or JS

Send your first prompt and get raw text output immediately. The API accepts standard chat-completion payloads, so you can swap in our base URL and key to start generating uncensored content without rewriting your logic. Use the following cURL command to verify connectivity and model availability before integrating into your codebase.

This initial request confirms that the endpoint is reachable and that your authentication token is valid. You can then proceed to build your application logic using the provided SDK wrappers.

curl https://api.chatunrestricted.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "List the three main endpoints for user authentication"}]
  }'

Authentication & Base URL

Authenticate by passing your API key in the HTTP header. All requests must target the base URL https://api.chatunrestricted.com/v1 to ensure compatibility with OpenAI SDKs. You can generate your key instantly via the dashboard using Google or email credentials, with no phone number required.

The API key identifies your account and tracks token usage against your prepaid balance. Keep this key secure, as it provides direct access to your credit. A single active key is allowed per account; generating a new one automatically invalidates the previous key.

POST /v1/chat/completions

Generate text by sending a POST request to the chat completions endpoint. The model ID is uncensored, which runs an open-weight model tuned to answer without content refusals for lawful adult use. You can control output length, randomness, and stopping conditions via standard parameters.

This endpoint supports streaming, function calling, and JSON mode responses. It does not support embeddings, images, or fine-tuning. Use the Python SDK to handle the request asynchronously for better performance in web applications.

from openai import OpenAI

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

GET /v1/models

Retrieve the list of available models to confirm the API structure. The response includes the uncensored model ID, which you must specify in your completion requests. This endpoint helps you verify that the service is online and that the model ID has not changed.

Use this endpoint to debug connectivity issues before sending expensive generation requests. It returns standard OpenAI-compatible model metadata, including the model ID and object type.

import OpenAI from "openai";

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

Parameters: Temperature, Top P, Seed

Control the randomness and determinism of your outputs using standard sampling parameters. Set temperature between 0 and 2 to adjust creativity, and use top_p to limit the nucleus sampling. The seed parameter allows you to reproduce specific outputs for debugging or consistent roleplay scenarios.

These parameters directly influence how the model generates text. Higher temperatures produce more diverse responses, while lower temperatures make the output more focused and predictable. Use stop sequences to halt generation at specific markers.

Streaming, Tools, and JSON Mode

Stream responses in real-time using Server-Sent Events (SSE) for lower latency. Enable JSON mode by setting response_format to json_object for structured data extraction. Tool calling is supported for function execution, allowing the model to invoke external APIs.

Streaming is essential for building chat interfaces that display tokens as they are generated. The final chunk of a stream contains the total token usage for the request, enabling accurate billing tracking. Use the following example to implement streaming in your application.

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 Billing

Monitor your rate limits to avoid service interruptions during high-volume usage. The API enforces a limit of 300 requests per minute and a concurrency limit of 8 simultaneous requests per key. The maximum request body size is 8 MB.

Billing is prepaid and based on real token usage. Errors and refusals do not consume credit. If you encounter a 401 error, your API key is invalid. A 402 error indicates insufficient credit, while a 429 error means you have exceeded the rate limit. The context window supports 100,000 tokens for prompt and completion combined.

Frequently asked questions

How do I handle API errors in my application?

Check the HTTP status code to determine the issue. A 401 error means your API key is invalid or missing. A 402 error indicates that your prepaid credit has been exhausted. A 429 error signifies that you have exceeded the rate limit of 300 requests per minute.

What is the context window limit?

The context window supports 100,000 tokens for the combined prompt and completion. The maximum output per request is 16,000 tokens, or 2,048 tokens if the max_tokens parameter is not explicitly set.

Does the API support streaming responses?

Yes, the API supports streaming via Server-Sent Events (SSE). Each chunk contains partial text, and the final chunk includes the total token usage for the request. This allows for real-time display of generated text in your application.

Generate your API key

Sign up, copy your key, and update your base URL. That is all you need to do.