EN ▾
Get API key

API Documentation for Video Script Generation

Generate uncensored scripts and prompts for AI video pipelines using our OpenAI-compatible API. This guide covers authentication, request formats, and streaming for real-time text generation.

Base URL and Authentication

Our API follows the OpenAI chat-completions standard. To authenticate, include your API key in the Authorization header. The base URL for all requests is https://api.unrestrictedvideo.cc/v1. Use the model ID uncensored to access our uncensored large language model tuned for unrestricted content generation. Ensure your requests are well-formed JSON objects containing the messages array.

Send a Video Script Prompt

Start by sending a simple text prompt to generate a script. The model will return a text completion. This is the core function of our uncensored api for video pipelines.

curl https://api.unrestrictedvideo.cc/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."}]
  }'

The response contains the generated text in choices[0].message.content. You can use this output directly as a video script or prompt for other tools.

Python SDK Integration

For developers using Python, the official OpenAI SDK works with minimal changes. Set the base_url to our endpoint and provide your API key. This approach is ideal for backend scripts that prepare ai video api inputs.

from openai import OpenAI

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

The code snippet demonstrates how to initialize the client and send a request. Remember to handle potential errors like rate limits or authentication failures.

Node SDK Integration

Node.js developers can use the openai npm package. Configure the client with our base URL and key. This is useful for server-side generation of video metadata or scripts.

import OpenAI from "openai";

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

After sending the request, access the response data. The SDK handles JSON parsing automatically. Ensure you are using the latest version of the SDK for best compatibility with streaming features.

Streaming Responses for Real-Time Generation

Enable streaming by setting stream: true. The API returns chunks of text as they are generated. This reduces perceived latency for long scripts. The final chunk contains token usage statistics.

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)

Process each chunk as it arrives. This is critical for real-time applications where you need to display text to users immediately. The uncensored model maintains context across chunks without losing coherence.

Rate Limits, Errors, and Context Window

Your API key is limited to 300 requests per minute and 8 concurrent requests. If you exceed this, you receive a 429 error. Authentication failures return a 401 error, while insufficient credit results in a 402 error. The context window is 100,000 tokens total. There is no separate output cap. Errors do not consume credit.

API specifications

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

ItemValue
ProtocolOpenAI Chat Completions schema; official openai SDKs work unchanged
API keyAuthorization: Bearer YOUR_KEY
Base URLhttps://api.unrestrictedvideo.cc/v1
MethodsPOST /v1/chat/completions · GET /v1/models
Modeluncensored
JSON modeJSON object mode via response_format json_object
Context window100,000 tokens, input and output combined
SSE streamingYes — server-sent events; the last chunk carries token usage
Completion lengthprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Sampling parameterstemperature, top_p, stop, seed and the two penalties are passed through
Tools / tool callsYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Rate limit300/min per key
Parallel requests8 requests at the same time per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Request size8 MB request body
Paymentcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Volume bonus+5% from $50, +10% from $100, +15% from $200
Billingpay as you go from prepaid credit; nothing is charged for failed or refused requests
Token pricesinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Trial credit$0.50 of credit valid 7 days, no card needed · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
Subscriptionpaid credit never expires, no subscription
Key managementone key per account, regenerate any time (the old one stops working)
Accountsign in with Google or with e-mail + password
Contentuncensored for adults; the only hard rule: no sexual content involving minors

Errors and what to do

The type field is stable, the message is for humans. Errors cost nothing.

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_revokedcheck the Authorization header or use your current key
402no_creditout of credit; add credit and retry
403content_blockedrefused by the content policy
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largebody over 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busytemporary overload, retry shortly

Questions and answers

How does the context window work?

The total context window is 100,000 tokens, including both prompt and completion. If you do not specify max_tokens, the response can run to the end of the window. Exceeding the limit will result in an error.

What happens if I run out of credit?

Requests will return a 402 error. Credit is charged only for successful token usage. Errors and refusals are free. You can top up using crypto at any time.

Can I use this for image or video generation?

No. This is a text-only API. It generates scripts, prompts, and metadata. You must use a separate tool for actual image or video file generation.

Your key is one form away

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