EN ▾
Get your key

Developer Documentation

Integrate our uncensored LLM API in minutes using standard OpenAI-compatible tools. Get started with direct token-based billing and no hidden subscriptions.

https://api.aitextgeneratoruncensored.com/v1uncensored

Base URL and Authentication

Our API uses standard OpenAI-compatible endpoints. The base URL is HTTPS://api.aitextgeneratoruncensored.com/v1. You authenticate with a Bearer token in the Authorization header. This approach lets you use existing clients without custom logic.

curl https://api.aitextgeneratoruncensored.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Return json with keys name and age"}]
  }'

Chat Completions Endpoint

Send text to the 'uncensored' model via POST /v1/chat/completions. The model generates text without refusing lawful adult or controversial topics. It is an open-weight model run on our servers, not GPT or Claude. Responses are plain text with no extra wrappers.

from openai import OpenAI

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

Use the official Node SDK to connect quickly. Set the base URL to our endpoint and provide your API key. The model ID is 'uncensored'. This setup works for scripts, bots, or web apps. It handles JSON serialization automatically.

import OpenAI from "openai";

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

Enable streaming by setting stream to true. You receive Server-Sent Events for each token. Token usage data appears in the final chunk. This method reduces perceived latency for long responses. It is ideal for chat interfaces.

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 Concurrency

Each key allows 300 requests per minute. You can run 8 concurrent requests. The request body must be under 8 MB. Exceeding these limits returns a 429 error. Manage your concurrency to avoid delays. The limit resets every minute.

Error Handling and Refusals

A 401 error means your key is invalid. A 402 error indicates no prepaid credit remains. A 429 error signals rate limit exhaustion. We also refuse requests involving minors. Errors do not consume your token balance. Check the response body for details.

Frequently asked questions

Is the AI text generator uncensored API compatible with standard OpenAI SDKs?

Yes, it works with any OpenAI-compatible client. You only need to change the base URL and API key. The model ID is 'uncensored'. This ensures easy integration with existing code.

What is the context window and max output length?

The context window is 100,000 tokens. The maximum output is 16,000 tokens per request. If you do not set max_tokens, the default is 2,048 tokens. This allows for long document processing.

How do I top up my prepaid credit?

Top up with crypto only. We accept USDT on TRC20 or USDC on Base. Minimum top-up is $20. Bonus credit applies for larger amounts. Credit never expires.

Access your API key

Register, copy the token, and update your base URL. That’s it.

Get your key