EN ▾
Get API keyapi.wanuncensored.top/v1
  1. wanuncensored.top
  2. Text API quickstart

Text API quickstart

Start building uncensored text pipelines for your adult content tools with this quickstart. We provide the OpenAI-compatible text API you need for prompt generation, script writing, and data extraction without content refusals.

Base URL and Authentication

Our API is hosted at https://api.wanuncensored.top/v1. It is fully compatible with standard OpenAI SDKs. To authenticate, you need an API key. You can get one instantly by signing up with Google or an email and password on our Get API key page. No phone number is required. Keep your key secure, as it is shown immediately upon creation. You can only have one active key per account; generating a new one replaces the old one. This wan uncensored endpoint works with any client that accepts a base URL and an authorization header.

Your First Request

Make a simple POST request to the chat completions endpoint. Use the model ID uncensored. This model is tuned to answer without blocking lawful adult or controversial topics. You can send text in and get text out for your pipeline needs. The following example demonstrates a basic interaction using curl:

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

This request returns a standard chat response. If you need to extract structured data, see the JSON Mode section. For streaming responses, refer to the Streaming section. This is a straightforward way to integrate our text capabilities into your existing tools.

Python SDK Integration

Use the official OpenAI Python library to connect easily. Set the base URL to our endpoint and provide your API key. This approach works well for backend services generating scripts or captions. The following Python code shows how to initialize the client and send a request:

from openai import OpenAI

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

This setup allows you to leverage standard libraries while accessing our uncensored model. It is ideal for processing large amounts of text or automating content generation tasks. Remember that we only provide text capabilities, so this fits perfectly into pipelines that handle images, audio, or video elsewhere.

Node.js SDK Integration

For JavaScript environments, use the OpenAI Node.js SDK. Configure the base URL and API key just like in Python. This is useful for web-based pipelines or serverless functions. The following example demonstrates a basic chat completion request:

import OpenAI from "openai";

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

This method allows you to integrate our text API directly into your Node.js applications. It supports standard parameters like temperature and top_p. You can use this for post-processing text or generating prompts for other AI tools in your stack.

Streaming Responses

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE). Each chunk contains part of the response. Token usage details are included in the final chunk. This is useful for real-time applications or progress indicators. The following example shows how to handle streaming in curl:

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)

Streaming reduces perceived latency for your users. It is particularly useful when generating long scripts or detailed descriptions. Ensure your client handles the SSE format correctly. This feature supports the standard OpenAI streaming protocol, making it easy to adopt.

Limits, Errors, and Context

Our wan uncensored API has specific limits. You can make 300 requests per minute per key. Up to 8 requests can run simultaneously. The request body must be under 8 MB. The context window is 100,000 tokens total, with no separate output cap. If you do not set max_tokens, the response can run to the end of the window. Common errors include 401 for an invalid key, 402 for insufficient credit, and 429 for rate limits. Errors and refusals do not consume credit.

API specifications

Before you integrate, here is exactly what you get with a key.

FeatureSupport
ProtocolOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
API keyAuthorization: Bearer YOUR_KEY
Model IDuncensored
Base URLhttps://api.wanuncensored.top/v1
EndpointsPOST /v1/chat/completions · GET /v1/models
JSON modeJSON object mode via response_format json_object
SSE streamingYes — server-sent events; the last chunk carries token usage
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Completion lengthprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Max context100,000 tokens, input and output combined
Tools / tool callsSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Max body8 MB request body
Requests per minute300 requests per minute per key
Parallel requests8 requests at the same time per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Top-upcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Subscriptionno monthly fee; paid credit does not expire
Trial credit$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
Volume bonus+5% on $50+, +10% on $100+, +15% on $200+
Price$0.15 per 1M input tokens · $0.50 per 1M output tokens
Billingpay as you go from prepaid credit; nothing is charged for failed or refused requests
Sign-insign in with Google or with e-mail + password
Key managementone key per account, regenerate any time (the old one stops working)
Content policyuncensored for adults; the only hard rule: no sexual content involving minors

Error codes

Errors come back as JSON with a stable type; failed and refused requests are not billed.

HTTPTypeWhat to do
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedno key, wrong key, or a key replaced by a newer one
402no_creditout of credit; add credit and retry
403content_blockedsexual content involving minors — refused, not billed
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

Questions and answers

Is this API suitable for generating text for image or video pipelines?

Yes, our text API is designed to support pipelines that generate images, video, or audio. You can use it for prompt writing, script generation, captions, and post-processing text. We do not generate media ourselves, but we provide the text components needed for those workflows.

What happens if my request is refused?

Refused requests do not consume your prepaid credit. The only hard content limit that always applies is sexual content involving minors, which will be refused. All other lawful adult, fictional, or controversial topics are generally allowed.

How do I top up my credit?

You can top up by crypto (USDT on TRC20, USDC on Base). You can deposit any whole amount from $20 to $500. Credits never expire. You receive a +5% bonus for deposits of $50 or more, a +10% bonus for deposits of $100 or more, and a +15% bonus for deposits of $200 or more.

Your key is one form away

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