EN ▾
Get API key

Wu Xianzhi APIFAQ

Uncensored API FAQ: Sign-up, Billing, Endpoints, Error Codes and Content Limits

We grouped the most asked questions about the uncensored API into six categories: sign-up and free trial, billing and balance, endpoints and parameters, error codes, content boundaries, and privacy. The endpoint is OpenAI-compatible, there is only one model (uncensored), and billing is prepaid per token. Want to see code? Go to Code Examples. Need full parameters? See the endpoint docs.

Updated on

Key points

  1. Sign up with email and password, no card needed. New accounts get $0.50 free trial credit valid for 7 days.
  2. Pricing: input $0.25, output $1.00 per million tokens. Prepaid, balance never expires.
  3. 100,000 token context window, max_tokens defaults to 2048, max 32,000. 300 requests per minute per API key.
  4. Sexual content involving minors is always blocked. Adults only, legal use. Prompts are not used for training.

Sign-up and free trial

How do I sign up? Do I need to bind a bank card?

Register on the /get-api-key/ page with email and password; no card binding required. Your API key is displayed immediately after registration, with no review waiting period.

How much trial credit do new accounts get, and for how long?

New accounts get $0.50 free trial credit valid for 7 days. At $1.00 / million tokens output, this covers about 500,000 tokens of output, enough for integration tests and small-scale validation.

How many API keys per account? What if I lose mine?

One API key per account. If leaked or lost, regenerate it in your account. The old key expires immediately, and services using it will receive 401. Update your environment variables after changing.

What happens when the trial expires?

Requests return 402 with error code no_credit. Top up your prepaid balance to continue; no code changes needed.

Billing and balance

What is the price and how is it billed?

Billed per token: input $0.25 / million tokens, output $1.00 / million tokens. No subscriptions, no monthly fees. Pay for what you use. See Pricing for details.

Does the balance expire?

No. Top-up prepaid credit has no expiry. Only the $0.50 free trial credit for new accounts has a 7-day limit.

How do I know how much a request costs?

The usage field in each response shows input and output token counts. Multiply by unit price to get cost. Streaming responses also include usage in the last chunk; note that choices is an empty array in that chunk.

How to avoid unexpectedly high bills?

Two ways: limit output with max_tokens (default 2048); trim history in multi-turn chats so input doesn't grow. Since it is prepaid, requests stop when balance is empty, preventing bills exceeding your balance.

For example, how much does a typical request cost?

Example: 2,000 input tokens, 500 output tokens. Input ~$0.0005, output ~$0.0005, total ~$0.001. 1,000 such requests cost ~$1. Actual costs depend on the usage field in the response.

What happens when the balance runs out?

The endpoint returns 402 with error code no_credit. Top up to continue; no need to regenerate your API key.

Endpoints and parameters

What is the endpoint URL and model name?

Base URL is https://api.wuxianzhiapi.com/v1. Model name is always uncensored. Available endpoints: POST /v1/chat/completions and GET /v1/models.

Is it compatible with OpenAI SDKs?

Yes. Official Python openai v1+ and npm openai v4+ work by changing base_url and API key. See Code Examples for usage. See Migration Guide for migrating from other endpoints.

How long is the context window? How large can max_tokens be?

Context window is 100,000 tokens (prompt + output combined). max_tokens defaults to 2048, max 32,000. Request body max 8 MB.

Do you support streaming and function calling?

Yes. Use stream: true; the server appends a final chunk with usage. Function calling uses OpenAI-format tools and tool_choice. Tool results are returned as messages with role: "tool".

Why is there no text in the last chunk of the streaming response?

That is the automatically appended usage statistics block. The choices array is empty, and usage contains the token count for this request. Check if choices is empty before accessing its content to avoid index out-of-bounds errors.

Is there a rate limit?

Each API key allows 300 requests per minute. Exceeding this returns a 429 status; wait and retry. Exponential backoff is recommended.

Do you support vectors, images, audio, or fine-tuning?

No. We only provide text chat with a single uncensored model. There are no embeddings, image, audio, or video generation, and no fine-tuning.

Error codes

All error responses are JSON formatted as {"error":{"code":...,"message":...}}. Below we explain how to handle each status code.

What does a 400 error mean?

The request itself is invalid, most commonly because the prompt plus max_tokens exceeds 100,000 tokens, or the JSON format is incorrect or field types are wrong. You need to fix the request; retrying will not help.

How to troubleshoot a 401 error?

The API key is invalid or missing. Check if the request header is Authorization: Bearer <API key>, if environment variables are set, and if the key was regenerated (old keys become invalid immediately after regeneration).

What does 402 no_credit mean?

The balance is exhausted or the free trial credit has expired. Top up your account to restore service; no need to change the API key.

What does 403 content_blocked mean?

The request triggered content blocking. Sexual content involving minors is always blocked, including fictional and roleplay scenarios, and this cannot be adjusted. Modify the request content and try again; resending the same request will yield the same result.

What causes a 404 error?

You accessed a non-existent endpoint. Common causes include a wrong URL (e.g., missing /v1) or calling an unsupported endpoint like embeddings or image generation.

How to handle 429 and 503 errors?

429 indicates you have exceeded the rate limit of 300 requests per minute. 503 returns the error code upstream_busy, indicating the model is temporarily busy; try again in a few seconds. Both are suitable for exponential backoff retry; see the code examples page.

Content boundaries

Does 'uncensored' mean anything can be generated?

No. Legal adult content, fiction, and controversial topics are not rejected. However, sexual content involving minors is always blocked (returning 403), regardless of whether it is fictional or roleplay. Usage must be legal.

Who is this for?

Only for users aged 18 and above. If you use it for end-user products, you must implement age verification in your application and retain reporting and account management mechanisms.

Can it be used for roleplay, novels, or games?

Yes, this is the most typical use case. See the Use Cases article for prompt examples and cost estimates for each scenario.

When does roleplay return a 403 error?

Only when content blocking is triggered, typically for sexual content involving minors, including fictional settings. Legal content between adults is not rejected just because it is roleplay. If you encounter a 403, adjust the persona or plot and retry.

Are the model's factual outputs reliable?

Not necessarily. Not rejecting a response does not mean the content is accurate. For conclusions involving facts, data, law, or medicine, you must verify them yourself before use.

Privacy

Will my prompts be used to train the model?

No. Your prompts will not be used for training.

How should I secure my API key?

Store the API key in server-side environment variables. Do not include it in frontend pages, mobile app packages, or public code repositories. If you suspect a leak, regenerate it immediately in your account; the old key will become invalid instantly.

How should user data in my application be handled?

This depends on your own product. We recommend sending only the content necessary to complete the task. Do not include sensitive information like users' real names, ID numbers, or contact details in prompts. Clearly state how data flows in your own privacy policy.

Frequently Asked Questions

Do I need a bank card to register? How much is the trial credit?

No card binding required; your API key is displayed immediately after registering with email and password. New accounts receive $0.50 in trial credit, valid for 7 days.

How is pricing calculated? Does the balance expire?

Input: $0.25 per million tokens; output: $1.00 per million tokens. Prepaid, no subscriptions or monthly fees. The topped-up balance never expires; only the trial credit has a 7-day limit.

What are the limits for context window and max_tokens?

The context window is 100,000 tokens (combined prompt and output). max_tokens defaults to 2048, with a maximum of 32,000 per request. The request body must not exceed 8 MB. Each API key allows 300 requests per minute.

What causes 402 or 403 errors?

Error code 402 is no_credit, meaning balance is empty or trial expired; top up to resolve. Error code 403 is content_blocked; sexual content of minors is always blocked, including fictional content.

Are prompts used for training?

No, prompts are not used for training.

Fill out the form to get your API key

Create an account, copy the API key, and modify the Base URL. Configuration is that simple.

Get API Key