API Quickstart: Integrate Uncensored Text into Your Pipeline
Integrate our uncensored LLM into your NSFW video generation stack using standard OpenAI-compatible SDKs. This quickstart covers authentication, payload structure, streaming, and error handling for prompt engineering and script extraction.
Base URL and Authentication
Our API is a hosted, OpenAI-compatible chat-completions endpoint. To begin, obtain an API key from the Get API key page using either Google OAuth or an email/password combination. The key is displayed immediately and is the sole credential for your account.
Direct all requests to the base URL https://api.nsfwvideogenerator.top/v1. Pass your key in the Authorization header as a Bearer token. This setup allows you to use the official OpenAI SDKs for Python and Node.js with minimal configuration changes.
- Base URL:
https://api.nsfwvideogenerator.top/v1 - Auth Header:
Authorization: Bearer YOUR_API_KEY
Generate Text: POST /v1/chat/completions
The core endpoint accepts text input and returns text output. Configure the request with the model identifier uncensored, your system prompts, and user messages. This endpoint handles prompt engineering, script writing, and metadata extraction for your NSFW video pipelines.
Ensure your payload stays within the 100,000 token context window (input + output). If you do not specify max_tokens, the response can run to the end of the window.
Python SDK Integration
Use the official openai Python library to interact with the API. Point the client to our base URL and supply your API key. This approach ensures compatibility with standard OpenAI SDK patterns while leveraging our uncensored model.
- Install via
pip install openai - Set
base_urlto our endpoint - Set
api_keyto your generated key
Construct a chat completion request with the uncensored model ID. This method is ideal for batch processing scripts or generating structured metadata for video assets.
Node SDK Integration
For JavaScript/TypeScript environments, use the openai Node.js package. Initialize the client with our specific base URL and your API key. This enables seamless integration into Node-based video generation workflows.
- Install via
npm install openai - Configure
baseURLandapiKey
Send chat completion requests using the uncensored model. This setup is suitable for real-time prompt generation or post-processing text extraction within Node.js applications.
Streaming Responses for Real-Time Processing
Enable streaming by setting stream: true in your request. The API returns data via Server-Sent Events (SSE), allowing you to process tokens as they are generated. This is crucial for low-latency applications where immediate feedback is required.
The final chunk of the stream includes token usage statistics, enabling accurate tracking of your prepaid credits. Monitor these events to handle partial responses and ensure robust error handling during streaming sessions.
JSON Mode and Function Calling
For automated pipelines, use JSON mode by setting response_format: {"type": "json_object"}. This ensures the model outputs strictly valid JSON, ideal for parsing structured scripts or metadata. Additionally, leverage function calling (tools) to define specific actions the model can take, such as extracting video tags or generating scene descriptions.
Use tool_choice to control whether the model calls functions or generates text. This flexibility supports complex NSFW video generation workflows where structured data is essential for downstream processing.
Limits, Errors, and Context
Monitor your usage against the following limits: 300 requests per minute, 8 concurrent requests per key, and an 8 MB request body. Errors and refusals are free, so unexpected API responses do not consume your prepaid credit.
Common HTTP errors include 401 for invalid keys, 429 for rate limits, and 500 for server issues. The model blocks sexual content involving minors but allows other lawful adult content. Context window is 100k tokens; there is no separate output cap.
cURL
curl https://api.nsfwvideogenerator.top/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
from openai import OpenAI
client = OpenAI(base_url="https://api.nsfwvideogenerator.top/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.js
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.nsfwvideogenerator.top/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
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)Under the hood: specs
One table with every limit, feature and price that applies to your key.
| Parameter | Details |
|---|---|
| Compatibility | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Model ID | uncensored |
| Authentication | Bearer token in the Authorization header |
| Base URL | https://api.nsfwvideogenerator.top/v1 |
| Max context | 100,000 tokens (prompt + completion together) |
| Streaming | Yes — server-sent events; the last chunk carries token usage |
| Max output | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| JSON mode | response_format: {"type": "json_object"} |
| Function calling | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Sampling parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| Max body | up to 8 MB per request |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Concurrency | 8 requests at the same time per key |
| Rate limit | 300/min per key |
| Price | $0.15 per 1M input tokens · $0.50 per 1M output tokens |
| Subscription | paid credit never expires, no subscription |
| How you pay | prepaid credit, charged by real token usage; errors and refusals are free |
| Volume bonus | +5% from $50, +10% from $100, +15% from $200 |
| Top-up | USDT (TRC20) or USDC (Base), any whole amount from $20 to $500 |
| Free trial | $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 |
| Content policy | adult content allowed; sexual content involving minors is refused |
| Keys | one key per account, regenerate any time (the old one stops working) |
| Sign-in | Google or e-mail and password |
Errors and what to do
Errors come back as JSON with a stable type; failed and refused requests are not billed.
| 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 | body over 8 MB |
429 | rate_limited · concurrency | slow down: rate or parallel limit reached |
503 | upstream_busy | model busy — retry in a few seconds |
Questions and answers
Does the API support image or video generation?
No, this is a text-only API. It handles prompt engineering, script writing, and metadata extraction for NSFW video pipelines but does not generate audio, images, or video itself.
How is credit charged and when is it deducted?
Credit is charged based on real token usage (input and output). Errors and refusals are free and do not consume your prepaid credit. Credit never expires.
What happens if I exceed the rate limit?
You will receive a 429 Too Many Requests error. You can retry after reducing your request rate or waiting for the window to reset. You have a limit of 300 requests per minute and 8 concurrent requests per key.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.