Get API key
  1. NSFW Video API
  2. 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 for scriptwriting, prompt engineering, and metadata extraction. This quickstart guide covers the OpenAI-compatible endpoints, authentication, and streaming features you need to start building.

Base URL and Authentication

Our API uses standard OpenAI-compatible endpoints, making it easy to swap into existing workflows. Use https://api.nsfwvideo.top/v1 as your base URL. You need an API key to authenticate requests. Sign up on our Get API key page using Google or email to receive your key immediately. The key is active for one account, and generating a new one replaces the previous key. Keep your key secure, as it controls your prepaid credit.

First Request

Test the integration with a simple chat completion. Send a POST request to /v1/chat/completions with the model ID uncensored. This model is tuned for adult content without refusals for lawful use. Ensure you include your API key in the Authorization header. If you have sufficient credit, you will receive a text response suitable for video scripts or prompts.

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."}]
  }'

Python SDK Integration

Use the official OpenAI Python SDK to interact with the API. Set the base_url to our endpoint and provide your API key. This approach allows you to leverage existing libraries while using our uncensored model for NSFW video metadata extraction or script generation. Configure parameters like temperature and max_tokens to control output style and length.

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)

Node SDK Integration

For JavaScript environments, configure the OpenAI Node SDK similarly. Point the base URL to our server and pass your credentials. This is ideal for web-based video pipelines or server-side prompt engineering. You can generate multiple prompts or extract structured data from text inputs efficiently.

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);

Streaming Responses

Enable streaming by setting stream: true in your request. This returns data via Server-Sent Events (SSE), allowing you to process tokens as they generate. The final chunk includes token usage statistics. Streaming is useful for real-time video script generation or interactive prompt engineering interfaces.

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)

Rate Limits, Errors, and Context

Our API enforces strict limits: 300 requests per minute and 8 concurrent requests per key. The context window is 64,000 tokens, with a max output of 16,000 tokens. Use JSON mode for structured data. Common errors include 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. Errors and refusals are free, so you only pay for successful token generation. Credit is prepaid and never expires.

Questions and answers

What is the context window size?

The total context window is 64,000 tokens, including both input and output. The maximum output per request is 16,000 tokens, or 2,048 if you do not specify max_tokens.

How do I top up my credit?

You can top up using USDT (TRC20) or USDC (Base). Minimum top-ups are $10, and amounts range up to $500. Bonus credit is available for larger deposits.

Does the API support function calling?

Yes, the API supports function calling with tools and tool_choice parameters. You can also use JSON mode to ensure structured output for video metadata extraction.

Your key is one form away

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

Get API key