tr ▾
Open account
Open account

API Documentation

Start generating text with our uncensored AI app API in minutes. This guide covers authentication, endpoints, and streaming for your first request.

Base URL and Authentication

Use https://api.uncensoredaiapp.com/v1 as your base URL. Pass your API key in the Authorization header as a Bearer token. You get one key per account, replaced when you generate a new one. The key appears immediately after signup via Google or email.

First Request

Send a POST request to /v1/chat/completions with the model set to uncensored. The API returns text based on your prompt. Errors like 401 or 402 indicate auth or credit issues.

curl https://api.uncensoredaiapp.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "List three ways to optimize postgres queries"}]
  }'

Python SDK Integration

Use the official OpenAI Python library. Set the base URL and API key, then call chat.completions.create. This approach works for most standard text generation tasks without extra setup.

from openai import OpenAI

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

Initialize the OpenAI Node client with your base URL. Call chat.completions.create with model uncensored. This method handles standard JSON responses efficiently for web apps.

import OpenAI from "openai";

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

Set stream: true to receive Server-Sent Events. Each chunk contains partial text. Token usage details appear in the final chunk. This reduces latency for long 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)

Rate Limits and Errors

Limit is 300 requests per minute per key. Max concurrent requests: 8. Request body limit: 8 MB. Context window: 100,000 tokens. Max output: 16,000 tokens. Errors include 401 for invalid keys, 402 for no credit, and 429 for rate limits.

Frequently asked questions

How do I get started with the uncensored AI app API?

Sign up via Google or email on the Get API key page. Your key appears immediately. Use the base URL <code>https://api.uncensoredaiapp.com/v1</code> with the OpenAI SDK to send your first request.

What is the context window and max output?

The context window is 100,000 tokens for prompt plus completion. The maximum output per request is 16,000 tokens. If you do not set <code>max_tokens</code>, the default is 2,048 tokens.

Why am I getting a 402 error?

A 402 error means your prepaid credit is exhausted. You must top up using USDT (TRC20) or USDC (Base) to continue using the API. Credit is charged by real token usage.

Get your API key now

Sign up, grab your key, and point to the new base URL. That’s it.