Quickstart: Integrating the Uncensored Chat API
Integrate our uncensored chat API into your NSFW video generation pipeline with these quick start guides. Use standard OpenAI-compatible clients to handle prompt engineering, script writing, and metadata extraction for adult content.
Authentication & Base URL
Our API is hosted at https://api.nsfwvideogenerator.cc/v1. To authenticate, include your API key in the Authorization header as a Bearer token. You can generate a key immediately by signing up with Google or an email password on the Get API key page. The key is displayed once after creation, so save it securely. Each account supports one active key at a time; generating a new one replaces the previous key. No phone number or credit card is required to start, though prepaid credit is needed for sustained usage.
First Request
Send a standard POST request to /v1/chat/completions. This endpoint accepts text input and returns text output. The model identifier is uncensored. Ensure your request body includes the model, messages, and max_tokens fields. This endpoint is the core of your text-to-video pipeline's prompt engineering layer. It handles context window management and response formatting.
curl https://api.nsfwvideogenerator.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, token usage statistics, and finish reason. This response feeds directly into your video generation scripts or captioning tools.
Python SDK Integration
Use the official OpenAI Python SDK to interact with the API. Configure the base_url and api_key to point to our infrastructure. The SDK handles JSON serialization and HTTP transport automatically. This approach is ideal for backend services and data processing pipelines. Import the client and instantiate it with your credentials.
from openai import OpenAI
client = OpenAI(base_url="https://api.nsfwvideogenerator.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)
Call chat.completions.create() with the model name uncensored. The SDK returns a response object that you can parse for the generated content. This method is reliable for batch processing and script generation tasks.
Node SDK Integration
For JavaScript environments, use the OpenAI Node SDK. Set the basePath to our API URL and provide your API key. This setup works seamlessly with serverless functions and web backends. The SDK supports both synchronous and asynchronous calls. Configure the client once and reuse it for multiple requests.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.nsfwvideogenerator.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);
Invoke the chat completion endpoint with the uncensored model. The response object contains the generated text and metadata. This integration is suitable for real-time captioning and metadata extraction in web applications.
Streaming Responses
Enable streaming by setting stream: true in your request. The API returns data as Server-Sent Events (SSE). Each chunk contains a portion of the generated text. This is useful for real-time user interfaces and progressive script rendering. The final chunk includes the total token usage.
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)
Handle each chunk sequentially. Aggregate the text to form the complete response. Streaming reduces perceived latency for long-form content generation. It is ideal for live captioning or interactive prompt refinement.
Limits, Errors, and Context
The context window is 100,000 tokens, with no separate output cap. If max_tokens is unset, the response can run to the end of the window. Rate limits are 300 requests per minute and 8 concurrent requests per key. Request bodies must not exceed 8 MB. Errors include 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. Refusals for minor content are free. Errors do not consume credit. Use exponential backoff for 429 responses.
Technical specifications
Before you integrate, here is exactly what you get with a key.
| Parameter | Details |
|---|---|
| API format | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| API key | Authorization: Bearer YOUR_KEY |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Base URL | https://api.nsfwvideogenerator.cc/v1 |
| Model ID | uncensored |
| JSON mode | JSON object mode via response_format json_object |
| Sampling parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| SSE streaming | Yes — server-sent events; the last chunk carries token usage |
| Context window | 100,000 tokens (prompt + completion together) |
| Completion length | up to the rest of the 100,000-token window; max_tokens optional (no separate cap) |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Rate limit | 300/min per key |
| Parallel requests | 8 requests at the same time per key |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Max body | up to 8 MB per request |
| Volume bonus | +5% on $50+, +10% on $100+, +15% on $200+ |
| Price | $0.15 per 1M input tokens · $0.50 per 1M output tokens |
| Top-up | USDT (TRC20) or USDC (Base), any whole amount from $20 to $500 |
| 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 |
| Billing | pay as you go from prepaid credit; nothing is charged for failed or refused requests |
| Subscription | no monthly fee; paid credit does not expire |
| Content policy | adult content allowed; sexual content involving minors is refused |
| Sign-in | Google or e-mail and password |
| Keys | one active key per account; a new key replaces the old one |
When a request fails
The type field is stable, the message is for humans. Errors cost nothing.
| Code | Type | Meaning |
|---|---|---|
400 | bad_request | invalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend |
401 | missing_key · invalid_key · key_revoked | no key, wrong key, or a key replaced by a newer one |
402 | no_credit | out of credit; add credit and retry |
403 | content_blocked | refused by the content policy |
404 | not_found | only /v1/chat/completions and /v1/models exist |
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 | model busy — retry in a few seconds |
Questions and answers
Does this API generate video or audio directly?
No, this is a text-only API. It provides the text layer for your pipeline, handling prompt engineering, script generation, and metadata extraction. You use its output to drive separate video or audio generation models.
How do I add credit to my account?
You can top up using crypto only, specifically USDT (TRC20) or USDC (Base). Payments range from $20 to $500, with bonus credit available for larger amounts. No credit cards or PayPal are accepted.
What is the pricing model?
You pay $0.15 per 1M input tokens and $0.50 per 1M output tokens. Credit is prepaid and never expires. Errors and refusals do not consume credit, ensuring you only pay for successful responses.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.