Wu Xianzhi APIDocs
Wu Xianzhi API Quick Start Guide
This guide covers the quick integration of Wu Xianzhi API, helping you call the uncensored model via the OpenAI-compatible API for zero content filter text generation.
https://api.wuxianzhiapi.com/v1uncensored
Base Endpoint and Authentication
Wu Xianzhi API is fully compatible with the OpenAI standard API. All requests go to https://api.wuxianzhiapi.com/v1. You need an API Key for auth, placed in the header Authorization: Bearer YOUR_API_KEY. Keys are generated upon registration and can be regenerated anytime. We use prepaid credit that never expires, billed pay as you go with no subscription fees.
Send your first request
You can verify API connectivity directly with curl. Send a POST request to /v1/chat/completions, specifying the model ID as uncensored. This model is an open-weight model that operates independently, optimized for legal adult content and controversial topics, and does not refuse to generate content.
Ensure the request body includes the messages array. A 401 error means auth failed; 402 means insufficient balance.
curl https://api.wuxianzhiapi.com/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 Example
Python developers can use the official openai library directly. Just set base_url to our server and provide your API Key. The model ID is fixed to uncensored. We support text generation only, no embeddings or multimodal capabilities. Ideal for backend integration handling structured data.
from openai import OpenAI
client = OpenAI(base_url="https://api.wuxianzhiapi.com/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 SDK Integration
Node.js developers can also use the openai npm package. Configure baseURL and apiKey; the logic matches OpenAI. This uncensored LLM API supports function calling; define functions via tools and the model returns structured JSON for execution. Ideal for building unrestricted AI apps.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.wuxianzhiapi.com/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 (SSE)
To reduce time-to-first-token, set stream: true in your request. The API returns chunked responses via Server-Sent Events (SSE). Crucial for real-time chat or long text generation. Clients must listen to the data event and parse JSON chunks. Streaming does not change billing; it is still based on total input and output tokens.
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)
Limits, Errors, and Context Window
Each API key is limited to 300 requests per minute, with a maximum request body size of 8 MB. The context window is 100,000 tokens (including prompts and responses). Error codes include: 401 for invalid key, 402 for insufficient balance, and 429 for rate limit exceeded. The model hard-blocks sexual content involving minors, while other legal adult content remains uncensored. You can retrieve the model list via GET /v1/models.
API facts in one table
Use this table to decide whether the API fits your project before you buy credit.
| Parameter | Details |
|---|---|
| API format | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Methods | POST /v1/chat/completions · GET /v1/models |
| API key | Bearer token in the Authorization header |
| Model ID | uncensored |
| Base URL | https://api.wuxianzhiapi.com/v1 |
| Function calling | Yes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool |
| Max output | up to the rest of the 100,000-token window; max_tokens optional (no separate cap) |
| Max context | 100,000 tokens (prompt + completion together) |
| JSON mode | JSON object mode via response_format json_object |
| Sampling parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| SSE streaming | Yes — server-sent events; the last chunk carries token usage |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Rate limit | 300 requests per minute per key |
| Parallel requests | 8 requests at the same time per key |
| Request size | 8 MB request body |
| Price | input $0.25 / 1M tokens, output $1.00 / 1M tokens |
| 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 |
| Top-up | USDT (TRC20) or USDC (Base), any whole amount from $10 to $500 |
| Credit expiry | no monthly fee; paid credit does not expire |
| Bonus credit | +5% from $50, +10% from $100 |
| Billing | pay as you go from prepaid credit; nothing is charged for failed or refused requests |
| Key management | one key per account, regenerate any time (the old one stops working) |
| Account | sign in with Google or with e-mail + password |
| Content | adult content allowed; sexual content involving minors is refused |
Error codes
Errors come back as JSON with a stable type; failed and refused requests are not billed.
| Status | Type | Reason |
|---|---|---|
400 | bad_request | malformed request or too long for the context window |
401 | missing_key · invalid_key · key_revoked | no key, wrong key, or a key replaced by a newer one |
402 | no_credit | out of credit; add credit and retry |
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 |
Frequently Asked Questions
Is the Wu Xianzhi AI model GPT or Claude?
No. We run an independent open-weight model with ID <code>uncensored</code>. It is fine-tuned to fully allow legal adult content without refusals, unrelated to any third-party vendor models.
Does prepaid credit expire?
No. Our API gateway uses pay as you go billing. Top-up credit never expires, with no monthly fees or subscriptions, ideal for long-term deployment.
Does it support function calling?
Yes. Via the standard <code>tools</code> parameter, the model returns structured function call instructions, making it easy for developers to build interactive AI apps.
Fill the form to get your key
Create an account, copy your key, and update the Base URL. Configuration is that simple.
Get API Key