API Documentation & Quickstart

Get your uncensored AI API key and start sending requests immediately. This guide covers the base URL, authentication, and SDK examples for a reliable OpenAI-compatible experience.

Base URL and Authentication

The base URL for all requests is https://api.uncensoredaiapikey.com/v1. You authenticate using an Authorization header with your Bearer token. This setup works with any standard OpenAI-compatible client. We run our own tuned model, so you get consistent uncensored responses without proxy layers. Sign up with Google or email to get your key instantly. Your key is the only credential required for API access.

First Request

Send a POST request to /v1/chat/completions with your model ID uncensored. The API expects text input and returns text output. You can control the response length and style. This endpoint is the core of our service. It handles all standard parameters. Use this curl command to verify your key works correctly. It returns a simple text response for testing.

curl https://api.uncensoredaiapikey.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Summarize the attached technical documentation in three sentences"}]
  }'

Python SDK Integration

Install the official OpenAI Python package and point it to our base URL. Set the model to uncensored for unrestricted responses. This method is ideal for backend scripts or data processing tasks. You can pass messages as a list of dictionaries. The SDK handles JSON serialization automatically. It is the most straightforward way to integrate our API into your Python projects.

from openai import OpenAI

client = OpenAI(base_url="https://api.uncensoredaiapikey.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 OpenAI Node.js SDK with the custom base URL. This is perfect for serverless functions or web applications. Configure the client with your API key and the correct endpoint. The library manages the HTTP requests efficiently. You can stream responses or get full text at once. It supports all standard parameters like temperature and top_p. This approach ensures reliable performance in JavaScript environments.

import OpenAI from "openai";

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

Enable streaming by setting stream: true in your request. The API returns a Server-Sent Events (SSE) stream. Each chunk contains partial text until the completion finishes. This feature reduces perceived latency for chat interfaces. The final chunk includes token usage statistics. Streaming is supported in all SDKs and via raw HTTP. It provides a smooth user experience for long conversations.

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

You are limited to 300 requests per minute per key. A single key can handle 8 concurrent requests simultaneously. The request body must not exceed 8 MB. If your key is invalid, you receive a 401 error. A 402 error indicates insufficient prepaid credit. A 429 error means you hit the rate limit. The context window is 100,000 tokens total. Errors and refusals do not consume your credit. Pay only for successful token usage.

Frequently asked questions

Is this an OpenAI-compatible API?

Yes, our API follows the OpenAI chat completions format. You can use the same SDKs and clients that work with GPT-4 or GPT-3.5 by changing the base URL. It supports standard parameters like temperature and top_p for consistent behavior.

How does the prepaid credit system work?

Credit is charged by real token usage for input and output tokens. Errors and refusals are free. Your prepaid credit never expires. You can top up with USDT (TRC20) or USDC (Base) for bonuses. No monthly subscription is required.

What is the context window limit?

The context window is 100,000 tokens for both prompt and completion together. The maximum output per request is 16,000 tokens. If you do not set max_tokens, the default is 2,048 tokens. This allows for long conversations without losing context.

Get your key now

Sign up, copy the key, update the base URL. Done.

Get API key