- NSFW Video API
- Quickstart: Integrate Uncensored Text into Your Video Workflow
Quickstart: Integrate Uncensored Text into Your Video Workflow
Integrate our uncensored text API into your NSFW video pipeline with this quickstart guide. You will learn to authenticate, generate scripts, and stream responses using standard OpenAI-compatible clients.
Base URL and Authentication
Our API is hosted at https://api.nsfwvideo.top/v1. To authenticate, you need an API key from your account dashboard. You can sign up via Google or email to receive your key immediately. Pass this key in the Authorization header as a Bearer token. This setup works with any OpenAI-compatible SDK by configuring the base URL and API key. Ensure your client sends requests to our specific endpoint to access the uncensored model.
Generate Video Scripts
Send a POST request to /v1/chat/completions with the model ID uncensored. This model is tuned to answer without content refusals for lawful adult use, making it ideal for NSFW video scripts. You can request detailed scene descriptions or dialogue. The API returns text that you can feed directly into your video generation pipeline for consistent output.
curl https://api.nsfwvideo.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."}]
}'
Prompt Engineering with JSON Mode
For structured data, use the response_format parameter set to {"type": "json_object"}. This ensures the model returns valid JSON, which is essential for parsing metadata or structured prompts in your automation workflow. You can define a schema in your system prompt to enforce specific keys like scene_description or camera_angles. This reduces post-processing overhead and keeps your pipeline clean.
from openai import OpenAI
client = OpenAI(base_url="https://api.nsfwvideo.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)
Streaming Responses
Enable streaming by setting stream to true. The API returns chunks via Server-Sent Events (SSE). This allows you to display progress or process tokens in real-time. Each chunk contains partial text, and the final chunk includes token usage statistics. Streaming is efficient for long scripts, letting your application react to content as it is generated without waiting for the full response.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.nsfwvideo.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);
Handling Context Windows
The context window is 100,000 tokens, covering 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. Plan your input length accordingly to avoid truncation. For long conversations, manage the history by trimming older messages. This ensures the model has sufficient space for relevant context, maintaining coherence in your video script generation.
Rate Limits and Tokens
You are limited to 300 requests per minute and 8 concurrent requests per key. The request body must not exceed 8 MB. Errors such as 401 (invalid key) or 402 (no credit) do not consume your prepaid credit. Rate limits (429) also do not consume credit, allowing you to retry without penalty. Credit is charged only for successful token usage, ensuring cost control for high-volume pipelines.
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
Everything the endpoint can and cannot do, in one place — check it before you top up.
| Feature | Support |
|---|---|
| API format | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Model ID | uncensored |
| Authentication | Bearer token in the Authorization header |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Base URL | https://api.nsfwvideo.top/v1 |
| Max output | up to the rest of the 100,000-token window; max_tokens optional (no separate cap) |
| Other parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| Max context | 100,000 tokens (prompt + completion together) |
| Structured output | JSON object mode via response_format json_object |
| Streaming | Yes — server-sent events; the last chunk carries token usage |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Requests per minute | 300/min per key |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Parallel requests | up to 8 in parallel per key |
| Request size | up to 8 MB per request |
| Bonus credit | +5% from $50, +10% from $100, +15% from $200 |
| How you pay | prepaid credit, charged by real token usage; errors and refusals are free |
| Price | input $0.15 / 1M tokens, output $0.50 / 1M tokens |
| Credit expiry | no monthly fee; paid credit does not expire |
| 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 |
| Payment | crypto: USDT on TRON or USDC on Base, $20–$500, any whole sum |
| Keys | one active key per account; a new key replaces the old one |
| Sign-in | sign in with Google or with e-mail + password |
| Content | uncensored for adults; the only hard rule: no sexual content involving minors |
When a request fails
Every error is JSON with a type you can switch on. You are never charged for an error.
| HTTP | Type | What to do |
|---|---|---|
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 | balance is empty — top up, requests resume at once |
403 | content_blocked | sexual content involving minors — refused, not billed |
404 | not_found | only /v1/chat/completions and /v1/models exist |
413 | request_too_large | body over 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
What happens if I run out of credit?
Your API key remains active, but requests will return a 402 error indicating insufficient funds. You can top up via crypto at any time to resume usage. Errors and refusals are free, so you won't be charged for failed attempts.
Does the API support function calling?
Yes, the API supports function calling via the tools and tool_choice parameters. You can define custom functions in your request to have the model return structured data. This is useful for integrating with other parts of your video production workflow.
Is there a free tier?
No, there is no free tier. However, new users get $0.50 of trial credit, one per person, valid for 7 days. Claim this credit with one click on your API key page. You can top up with crypto starting from $20. Credit never expires and can be used for any request type.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.