EN ▾
Get your key

Uncensored ai API Quickstart Guide

This guide shows developers how to integrate the uncensored AI roleplay API in minutes using standard OpenAI-compatible clients. You get immediate access to an unfiltered model with predictable token-based billing and no vendor lock-in.

https://api.uncensoredairoleplay.com/v1uncensored

Authentication & Base URL Setup

Start by generating your API key on the dashboard using Google or email credentials. The base URL for all requests is https://api.uncensoredairoleplay.com/v1, which works with any OpenAI-compatible SDK. You only need one active key per account, and it appears immediately after signup.

Set the OPENAI_API_KEY environment variable to your new key. This simple configuration allows your code to route requests to our servers without additional headers or complex setup steps.

Sending Your First Chat Completion Request

Send a POST request to /v1/chat/completions with the model ID set to uncensored. This endpoint accepts text input and returns text output, supporting standard parameters like temperature and top_p. You can test the integration quickly with a simple prompt to verify connectivity.

The response includes the generated text and token usage details. Errors during billing do not consume your credit, ensuring you only pay for actual content generation.

Python SDK Integration

Use the official OpenAI Python library to interact with the uncensored LLM API. Configure the client with the base URL and your API key. This approach ensures compatibility with existing codebases that already use OpenAI clients for other models.

Call the chat.completions.create method with the model name uncensored. The library handles serialization and deserialization automatically, reducing boilerplate code in your application.

Node.js SDK Integration

Initialize the OpenAI Node.js client with the custom base URL and your API key. This setup mirrors the Python configuration, allowing consistent behavior across different parts of your stack. Pass the model ID uncensored to ensure you are using the correct unfiltered model.

Make requests using the standard chat.completions methods. The SDK manages the HTTP connections efficiently, making it easy to scale your usage as needed.

Handling Streaming Responses (SSE)

Enable streaming by setting stream: true in your request parameters. The API returns Server-Sent Events (SSE) containing partial responses as they are generated. This feature is ideal for real-time applications where latency matters.

Parse the SSE stream to display tokens as they arrive. The final chunk includes the total token usage, allowing you to track costs accurately without waiting for the entire response to finish.

Rate Limits, Errors & Context Windows

The API allows 300 requests per minute and 8 concurrent requests per key. If you exceed these limits, you receive a 429 error. Requests are limited to 8 MB in body size. The context window supports 100,000 tokens total, with a max output of 16,000 tokens per request.

Handle 401 errors by verifying your API key. A 402 error indicates insufficient prepaid credit. Errors and refusals do not consume your credit balance, protecting your investment during testing phases.

cURL

curl https://api.uncensoredairoleplay.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "What is the capital of France?"}]
  }'

Python

from openai import OpenAI

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

import OpenAI from "openai";

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

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)

Frequently asked questions

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

Sign up with Google or email to receive an API key instantly. Add $20 or more in crypto credit to start making requests. Use the provided base URL with any OpenAI-compatible SDK to begin integration.

What happens if I run out of credit?

You receive a 402 error when your prepaid balance is depleted. Your credit never expires, so you can top up later without losing any unused funds. Errors and refusals do not consume credit.

Can I use the standard OpenAI SDKs?

Yes, the API is fully compatible with official OpenAI SDKs for Python, Node.js, and other languages. Just update the base URL to point to our servers and use the model ID <code>uncensored</code>.

Access requires one step

Register, retrieve your key, update the endpoint. That is all.

Get your key