API Documentation: Chat Completions for Video Scripts
Get started with the uncensored chat completions API for video script generation. This guide covers authentication, SDK integration, and streaming for high-volume text pipelines.
Base URL and Authentication
The API endpoint is https://api.unrestrictedvideogenerator.cc/v1. It follows the standard OpenAI chat completions interface, meaning you can use existing OpenAI SDKs by simply updating the base URL and providing your API key. You receive one active key per account, which you can generate immediately after signing up via Google or email. There are no monthly subscriptions; you pay only for the tokens your scripts consume.
Keep your key secure and pass it in the Authorization header as a Bearer token. If you need a fresh start, generating a new key replaces the previous one entirely. This design keeps your video generation pipeline simple and focused on the text layer without complex routing logic.
First Request
Start by sending a simple prompt to verify your setup. The model ID is uncensored, which handles open-weight inference tuned for fewer refusals. This endpoint accepts standard chat messages, allowing you to structure instructions for video scripts or metadata extraction.
The request body must include the model identifier and your message content. Ensure your content aligns with the allowed usage, keeping in mind that only sexual content involving minors is strictly blocked. This initial test confirms your authentication and token balance before you automate higher-volume tasks.
curl https://api.unrestrictedvideogenerator.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."}]
}'
Python SDK Integration
Using the Python SDK simplifies the integration process. You need to set the base_url to point to our endpoint and provide your API key. The library handles serialization and request formatting automatically, allowing you to focus on constructing the prompt structure for your video generation scripts.
This approach is ideal for developers building backend services that process large amounts of text. You can easily loop through multiple prompts or batch requests, leveraging the 100,000-token context window to maintain coherence across long video scripts or detailed metadata extractions.
from openai import OpenAI
client = OpenAI(base_url="https://api.unrestrictedvideogenerator.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)
Node SDK Setup
For JavaScript environments, the Node SDK offers a similar streamlined experience. Configure the client with the correct base URL and authentication header. This setup is particularly useful for serverless functions or edge deployments where you need to generate video prompts dynamically.
The SDK supports modern async/await patterns, making error handling and response parsing straightforward. You can integrate this directly into your video pipeline scripts, ensuring that the text output is ready for downstream processing by image or video generation models.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.unrestrictedvideogenerator.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);
Streaming Responses
Enable streaming by setting stream: true in your request. This returns a Server-Sent Events (SSE) stream, allowing you to receive tokens as they are generated. This is crucial for large outputs, such as long video scripts, where you want to display progress or process text incrementally.
The final chunk of the stream includes the total token usage, providing transparent billing data immediately. This feature is essential for high-volume automation, as it reduces latency perception and allows for real-time feedback in your video generation pipeline.
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)
Limits, Errors, and Context
Understand the operational limits to ensure reliability. You are allowed 300 requests per minute and 8 concurrent requests per key. The request body must not exceed 8 MB. If you encounter a 401 error, your key is invalid; a 402 indicates insufficient credit, which you can top up via crypto; and a 429 signals rate limiting.
The context window is 100,000 tokens total, with no separate output cap. Errors and refusals do not consume tokens, so you can experiment freely. This structure supports robust video script generation without unexpected costs for failed attempts.
API specifications
A quick checklist for developers: format, limits, features, billing.
| Parameter | Details |
|---|---|
| Protocol | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Base URL | https://api.unrestrictedvideogenerator.cc/v1 |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Model ID | uncensored |
| API key | Bearer token in the Authorization header |
| SSE streaming | Supported (stream: true), usage included at the end |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Completion length | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| Max context | 100,000 tokens (prompt + completion together) |
| JSON mode | JSON object mode via response_format json_object |
| Other parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| Response headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Max body | up to 8 MB per request |
| Parallel requests | up to 8 in parallel per key |
| Rate limit | 300/min per key |
| Volume bonus | +5% from $50, +10% from $100, +15% from $200 |
| Token prices | input $0.15 / 1M tokens, output $0.50 / 1M tokens |
| Top-up | crypto: USDT on TRON or USDC on Base, $20–$500, any whole sum |
| 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 |
| Subscription | paid credit never expires, no subscription |
| How you pay | prepaid credit, charged by real token usage; errors and refusals are free |
| Sign-in | Google or e-mail and password |
| Key management | one key per account, regenerate any time (the old one stops working) |
| Content | adult content allowed; sexual content involving minors is refused |
When a request fails
The type field is stable, the message is for humans. Errors cost nothing.
| HTTP | Type | What to do |
|---|---|---|
400 | bad_request | malformed request or too long for the context window |
401 | missing_key · invalid_key · key_revoked | check the Authorization header or use your current key |
402 | no_credit | balance is empty — top up, requests resume at once |
403 | content_blocked | refused by the content policy |
404 | not_found | unknown endpoint |
413 | request_too_large | request body larger than 8 MB |
429 | rate_limited · concurrency | over 300/min or 8 parallel — back off and retry |
503 | upstream_busy | temporary overload, retry shortly |
Questions and answers
What is the context window size?
The total context window is 100,000 tokens, encompassing both the prompt and the completion. The response can run to the end of the window, which is sufficient for long video scripts or detailed metadata extraction tasks.
How do I handle errors?
Common errors include 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. Errors do not consume tokens, so you can retry requests without cost. Use the Support page for issues like double charges, as credit does not expire.
Can I use this for image or video generation?
No, this is a text-only API. You can use it to generate prompts, scripts, or extract metadata that feed into image or video generators. We do not provide embeddings, audio, or direct media generation capabilities.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.