EN ▾
Try with trial credit
https://api.chataiunrestricted.com/v1

Uncensored LLM API for adults

Chat AI UnrestrictedStep-by-Step Guide to Uncensored AI Chat Integration

Step-by-Step Guide to Uncensored AI Chat Integration

Get your uncensored AI chat integration running in minutes with our OpenAI-compatible API. This guide walks you through configuring endpoints, streaming responses, and handling structured data without content refusals.

Last updated

Summary

  • Use the standard /v1/chat/completions endpoint with a custom base URL.
  • Streaming is enabled via Server-Sent Events for real-time token output.
  • Function calling and JSON mode are supported for structured data extraction.
  • Pricing is pay-as-you-go via crypto, with no monthly subscription fees.

Prerequisites: SDKs and API Keys

Start by obtaining your API key from the dashboard. You can sign up using Google or an email and password. No phone number is required. Your key appears immediately after creation.

  • Use the official OpenAI SDK for your language of choice.
  • Ensure your environment supports the required SDK version.
  • Keep your API key secure in your environment variables.
from openai import OpenAI

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

Step 1: Configure the Base URL

Point your SDK to our base URL. This ensures all requests route to our uncensored model. The standard OpenAI endpoint structure remains identical.

import OpenAI from "openai";

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

Do not change the endpoint path. Only the base URL differs. This keeps your code compatible with existing OpenAI clients.

Step 2: Sending Your First Chat Request

Send a POST request to /v1/chat/completions. Include your system prompt and user messages. The model responds without content refusals for lawful adult content.

curl https://api.chataiunrestricted.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Run the build script and show errors"}]
  }'

Set the model parameter to "uncensored". This ensures you get the specific model tuned for unrestricted output. Avoid setting max_tokens if you want the default 2,048 tokens.

Step 3: Enabling Streaming for Real-Time Output

Enable streaming by setting stream to true. You receive Server-Sent Events (SSE) for each token. This allows real-time display of responses.

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)

Token usage statistics appear in the final chunk. This helps you track costs accurately. Streaming reduces perceived latency for users.

Step 4: Using Function Calling with the Uncensored Model

Define functions in your request body. The model can call these functions based on user input. This is useful for extracting data or triggering actions.

from openai import OpenAI

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

Specify tool_choice to control how the model selects functions. This feature works seamlessly with our unrestricted model. You can use it for game logic or structured data extraction.

Step 5: Enforcing JSON Mode for Structured Data

Set response_format to json_object. This forces the model to output valid JSON. It reduces parsing errors in your application.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.chataiunrestricted.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 is ideal for generating structured data like game states or configuration files. Ensure your prompts clearly define the JSON schema. The model adheres to this format consistently.

Step 6: Handling Tokens and Context Windows

The context window is 100,000 tokens. This includes both prompt and completion. Manage your token usage carefully to stay within limits.

curl https://api.chataiunrestricted.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Run the build script and show errors"}]
  }'

Set max_tokens to control output length. The default is 2,048 tokens. You can increase this up to 16,000 tokens per request. Track token usage in the API response headers.

Step 7: Debugging Common Integration Errors

Check your API key validity first. Ensure the base URL is correct. Review error messages for specific details.

  • 401: Invalid or expired API key.
  • 429: Rate limit exceeded (300 requests per minute).
  • 400: Invalid request body or parameters.
from openai import OpenAI

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

Verify that your model parameter is set to "uncensored". Ensure you are not exceeding the 8 MB request body limit. Use the support page for double charges or credit issues.

Conclusion: Why Uncensored AI Chat is the Right Choice

Our API offers a straightforward, uncensored solution for developers. You get an OpenAI-compatible endpoint with no content filters for lawful adult content. Pricing is transparent and pay-as-you-go. No subscription locks or monthly fees. Credit never expires. Start integrating today with a free trial credit.

import OpenAI from "openai";

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

Common questions

Is the uncensored AI chat model truly unrestricted?

Yes, the model does not refuse lawful adult, fictional, or controversial topics. It is tuned for unrestricted output. The only hard limit is no sexual content involving minors.

What is the context window size?

The context window is 100,000 tokens. This includes both the prompt and the completion. You can set max_tokens up to 16,000 per request.

How do I pay for the uncensored AI bot API?

You pay with crypto only. We accept USDT (TRC20) or USDC (Base). Prepaid credit is charged by real token usage. Errors and refusals are free.

Does the uncensored AI chat API support streaming?

Yes, streaming is enabled via Server-Sent Events (SSE). You receive real-time token output. Token usage statistics appear in the final chunk.

Your API key is next

Sign up, grab the key, swap the endpoint URL. That is all there is to it.

https://api.chataiunrestricted.com/v1Try with trial credit