EN ▾
Uncensored text API for media pipelineswannsfw.cc

Prompts and scripts over one endpoint

Start building with the Wan NSFW text API in minutes. Use our OpenAI-compatible endpoint to generate prompts, scripts, and captions for your media pipelines with zero content refusals.

Authentication and Base URL

Our API is OpenAI-compatible, meaning you can use standard SDKs by pointing them to our base URL: https://api.wannsfw.cc/v1. To authenticate, include your API key in the Authorization header as a Bearer token. You can generate a key instantly by signing up with Google or email on the Get API key page. Each account holds one active key; generating a new one replaces the old. Ensure your key is valid to avoid 401 errors.

The model identifier for all requests is uncensored. This open-weight model runs on our servers and is tuned to answer without refusals for lawful adult use. It is not GPT, Claude, or any other vendor's model. Use the GET /v1/models endpoint to verify available models.

Sending a Chat Completion Request

Use the POST /v1/chat/completions endpoint to send text in and get text out. This is ideal for prompt generation, script writing, or captioning. You can control behavior with parameters like temperature, top_p, and stop. The context window supports up to 100,000 tokens total, with no separate output cap.

Below is a basic example using cURL to send a request.

curl https://api.wannsfw.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."}]
  }'

If you encounter a 402 error, your prepaid credit is exhausted. Errors and refusals do not consume tokens, so you won't be charged for failed attempts.

Python SDK Integration

For Python developers, the official openai SDK works seamlessly by overriding the base_url. This is useful for automated prompt generation or post-processing in AI video workflows. Set your API key and point to our endpoint.

from openai import OpenAI

client = OpenAI(base_url="https://api.wannsfw.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)

This approach lets you integrate uncensored text completions directly into your existing media pipelines. You can parse the response to extract structured data or feed it into downstream tools. Remember that we do not offer embeddings or fine-tuning, so this is strictly for chat-completions.

Node SDK Integration

Node.js developers can achieve the same result by configuring the OpenAI client. This is particularly effective for real-time captioning or script generation in web applications. Configure the client with your base URL and API key.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.wannsfw.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);

The response includes usage statistics, allowing you to track token consumption accurately. Since billing is prepaid and token-level, you can predict exactly what each request costs. Input tokens are $0.15 per million, and output tokens are $0.50 per million.

Handling Streaming Responses

For lower latency, enable streaming by setting stream: true. The API returns Server-Sent Events (SSE), delivering tokens as they are generated. The final chunk contains the complete usage statistics.

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)

This is ideal for applications where immediate feedback is crucial. Streaming does not affect billing; you are still charged for the total tokens generated. Ensure your client handles SSE events correctly to avoid memory leaks or incomplete responses.

Limits, Errors, and Context Window

Our API has specific limits: 300 requests per minute per key, 8 concurrent requests, and an 8 MB request body. If you exceed these, you'll receive a 429 rate limit error. A 401 error indicates an invalid or missing API key. A 402 error means your prepaid credit is exhausted.

The context window is 100,000 tokens, combining prompt and completion. There is no separate output cap (if max_tokens is unset, the response can run to the end of the window). Credit never expires, and errors are free. No sexual content involving minors is allowed. For support, use the dedicated Support page.

Questions and answers

What is the context window size?

The context window is 100,000 tokens, which includes both the prompt and the completion. You can generate output up to the end of the window in a single response.

How does billing work?

We use prepaid credit charged by real token usage. Input tokens cost $0.15 per million, and output tokens cost $0.50 per million. Errors and refusals do not consume credit.

Can I use this for image or video generation?

No, we are a text-only API. We provide the text layer for your media pipelines, such as prompt writing or captioning, but we do not generate images or video ourselves.

Your key is one form away

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

Get API key

Technical reference

A quick checklist for developers: format, limits, features, billing.

ItemValue
CompatibilityOpenAI Chat Completions schema; official openai SDKs work unchanged
AuthenticationAuthorization: Bearer YOUR_KEY
Model IDuncensored
MethodsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.wannsfw.cc/v1
SSE streamingYes — server-sent events; the last chunk carries token usage
JSON modeJSON object mode via response_format json_object
Completion lengthprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Function callingYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Other parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Max context100,000 tokens, input and output combined
Requests per minute300/min per key
Concurrencyup to 8 in parallel per key
Max bodyup to 8 MB per request
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Credit expirypaid credit never expires, no subscription
Top-upUSDT (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
Token prices$0.15 per 1M input tokens · $0.50 per 1M output tokens
Billingprepaid credit, charged by real token usage; errors and refusals are free
Volume bonus+5% from $50, +10% from $100, +15% from $200
Content policyuncensored for adults; the only hard rule: no sexual content involving minors
Keysone key per account, regenerate any time (the old one stops working)
Accountsign in with Google or with e-mail + password

When a request fails

The type field is stable, the message is for humans. Errors cost nothing.

CodeTypeMeaning
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
401missing_key · invalid_key · key_revokedcheck the Authorization header or use your current key
402no_creditbalance is empty — top up, requests resume at once
403content_blockedrefused by the content policy
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busymodel busy — retry in a few seconds