EN ▾

Uncensored API Integration Guide

This guide covers the core integration steps for the uncensored chat-completions API, optimized for generating unrestricted prompts and scripts in video pipelines.

Base URL and Authentication

Initialize your client with the base URL https://api.unrestrictedvideo.com/v1. Authentication relies on a single API key generated during signup via Google or email. Pass this key in the Authorization header as a Bearer token. The endpoint supports standard OpenAI-compatible clients, allowing you to swap base URLs without changing your code logic.

First Request

Send a POST request to /v1/chat/completions with the model ID uncensored. This endpoint handles text input and returns text output. The model is tuned to answer without content refusals for lawful adult use, making it ideal for generating diverse video prompts or scripts.

curl https://api.unrestrictedvideo.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Write a blunt product review of a cheap VPN."}]
  }'

Ensure you include the messages array with your system and user prompts. The API returns a standard completion object containing the generated text.

Python SDK Integration

Use the official OpenAI Python SDK to interact with the API. Set the base_url and api_key in your client configuration. This approach allows you to leverage existing SDK methods for handling responses and errors.

from openai import OpenAI

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

Configure the client to point to our base URL. This ensures all requests are routed correctly to the uncensored model. You can then call chat.completions.create() with your desired parameters.

Node SDK Integration

For Node.js environments, initialize the OpenAI SDK with the custom base URL and API key. This enables seamless integration into your existing JavaScript or TypeScript projects.

import OpenAI from "openai";

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

Pass the base URL and key to the client constructor. This setup allows you to use standard methods like chat.completions.create() to generate text. The SDK handles serialization and deserialization of the API responses.

Streaming Responses

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE), allowing you to process tokens as they are generated. This is useful for real-time preview of generated scripts or prompts.

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)

Each chunk contains partial data. The final chunk includes token usage statistics. This allows you to track consumption in real-time without waiting for the full response to complete.

Rate Limits and Errors

The API enforces a limit of 300 requests per minute and 8 concurrent requests per key. Requests exceeding these limits return a 429 error. Authentication failures return a 401 error, while insufficient credit returns a 402 error. The context window is 100,000 tokens, with no separate output cap per request.

API specifications

Use this table to decide whether the API fits your project before you buy credit.

SpecValue
API formatOpenAI Chat Completions schema; official openai SDKs work unchanged
MethodsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.unrestrictedvideo.com/v1
Modeluncensored
API keyAuthorization: Bearer YOUR_KEY
JSON modeJSON object mode via response_format json_object
Max context100,000 tokens, input and output combined
SSE streamingSupported (stream: true), usage included at the end
Max outputup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
Function callingSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Sampling parameterstemperature, top_p, stop, seed and the two penalties are passed through
Requests per minute300 requests per minute per key
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Request sizeup to 8 MB per request
Concurrency8 requests at the same time per key
Billingpay as you go from prepaid credit; nothing is charged for failed or refused requests
Bonus credit+5% on $50+, +10% on $100+, +15% on $200+
Subscriptionno monthly fee; paid credit does not expire
PaymentUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Trial credit$0.50 for 7 days, no card · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
Keysone active key per account; a new key replaces the old one
Content policyadult content allowed; sexual content involving minors is refused
AccountGoogle or e-mail and password

Error reference

Errors come back as JSON with a stable type; failed and refused requests are not billed.

HTTPTypeWhat to do
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
401missing_key · invalid_key · key_revokedno key, wrong key, or a key replaced by a newer one
402no_creditout of credit; add credit and retry
403content_blockedrefused by the content policy
404not_foundunknown endpoint
413request_too_largebody over 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busymodel busy — retry in a few seconds

Questions and answers

What is the context window size?

The context window is 100,000 tokens, counting both prompt and completion. There is no separate output cap, and if max_tokens is not set, the response can run to the end of the window.

How do I handle rate limits?

The limit is 300 requests per minute and 8 concurrent requests per key. Exceeding these limits results in a 429 error response. You should implement exponential backoff in your client.

Is the model the same as GPT-4?

No, the model ID is uncensored. It is an open-weight model run on our servers, tuned for unrestricted responses, and is not GPT, Claude, or any other vendor's model.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API keyRead the docs