EN ▾
Get API Key

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.

ParameterDetails
API formatOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
MethodsPOST /v1/chat/completions · GET /v1/models
API keyBearer token in the Authorization header
Model IDuncensored
Base URLhttps://api.wuxianzhiapi.com/v1
Function callingYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Max outputup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
Max context100,000 tokens (prompt + completion together)
JSON modeJSON object mode via response_format json_object
Sampling parameterstemperature, top_p, stop, seed and the two penalties are passed through
SSE streamingYes — server-sent events; the last chunk carries token usage
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Rate limit300 requests per minute per key
Parallel requests8 requests at the same time per key
Request size8 MB request body
Priceinput $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-upUSDT (TRC20) or USDC (Base), any whole amount from $10 to $500
Credit expiryno monthly fee; paid credit does not expire
Bonus credit+5% from $50, +10% from $100
Billingpay as you go from prepaid credit; nothing is charged for failed or refused requests
Key managementone key per account, regenerate any time (the old one stops working)
Accountsign in with Google or with e-mail + password
Contentadult 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.

StatusTypeReason
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_largebody over 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busymodel 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