Uncensored API Quick Start Guide
Get started with the uncensored API: get your API key and write just a few lines of code to start generating text, thanks to our OpenAI-compatible infrastructure. Our quick setup guide covers pure text generation, a large context window, and direct access.
- Base URL
- https://api.sansursuzapi.com/v1
- Model
- uncensored
Installation and Required Libraries
The uncensored API is designed to work directly with OpenAI SDKs and clients. To set up integration, you only need to set the base_url value in your existing code to https://api.sansursuzapi.com/v1 and configure your API key. You just need to install the appropriate SDK package for your language; no additional server configuration or complex authentication mechanisms are required. Our system uses standard Bearer token authentication and we pass your key directly in the request headers.
Basic Request Example
To start using the API, you can trigger text generation by sending a simple POST request. The example below shows how to access the curl uncensored model. The request body specifies the model name, user message, and response format. This structure conforms to OpenAI's standard chat-completions schema.
curl https://api.sansursuzapi.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."}]
}'
This request is an ideal starting point to test the model's uncensored behavior. The JSON object returned as a response contains the generated text and token statistics. You can use this simple structure for quick tests, then customize parameters according to your project's needs.
Streaming and Function Calling
For large text blocks or long conversation history scenarios, you can use streaming mode. This mode allows you to process data from the server in parts and improves user experience. Additionally, the function calling feature, which allows the model to interact with external tools, is supported. This feature allows the model to return data according to a specific JSON schema and process this data in your application.
from openai import OpenAI
client = OpenAI(base_url="https://api.sansursuzapi.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)
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.sansursuzapi.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);
Python and Node.js SDKs provide the necessary tools to manage these streaming and function structures. Optionally, you can receive the response in parts with the stream: true parameter or configure the model's data generation using the tools structure.
Model List and Compatibility
Our API currently offers a single large language model: uncensored. This model has a custom-tuned open-weight architecture and is optimized to remove the artificial filtering seen in standard models. You can verify the available model via the model list endpoint (GET /v1/models). The model runs on our GPU servers, independent of OpenAI's GPT, Claude, Gemini, or Grok series. This compatibility allows you to use your existing OpenAI clients directly.
Error Codes and Limits
The main status codes you may encounter while using the API are: 401 for invalid or missing API key, 402 for insufficient credit, and 429 for exceeding the rate limit of 300 requests per minute. Only one API key is valid per account; when the key is regenerated, the old key becomes inactive. The request body should not exceed 8 MB. The context window is limited to 100,000 tokens; this refers to the total number of tokens for both prompt and completion text. These limits are critical for the stable operation of the API.
Pricing and Credit Management
The uncensored API works on a pay as you go model. Input tokens are charged at $0.25 per 1 million tokens, and output tokens at $1.00 per 1 million tokens. Paid credit is stored indefinitely and there is no subscription fee. New accounts receive $0.50 in free trial credit valid for 7 days without requiring a credit card. When credit runs out, the service does not stop; you only need to top up for new requests. A 5% bonus applies to $50 top-ups and a 10% bonus applies to $100 top-ups.
Streaming
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)Specs at a glance
Use this table to decide whether the API fits your project before you buy credit.
| Spec | Value |
|---|---|
| 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 |
| Model | uncensored |
| Base URL | https://api.sansursuzapi.com/v1 |
| API key | Bearer token in the Authorization header |
| JSON mode | response_format: {"type": "json_object"} |
| Context window | 100,000 tokens, input and output combined |
| Streaming | Supported (stream: true), usage included at the end |
| Max output | up to the rest of the 100,000-token window; max_tokens optional (no separate cap) |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Sampling parameters | temperature, top_p, stop, seed, presence_penalty, frequency_penalty |
| Rate limit | 300 requests per minute per key |
| Response headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Concurrency | 8 requests at the same time per key |
| Max body | 8 MB request body |
| Token prices | input $0.25 / 1M tokens, output $1.00 / 1M tokens |
| Volume bonus | +5% from $50, +10% from $100 |
| Top-up | USDT (TRC20) or USDC (Base), any whole amount from $10 to $500 |
| Billing | pay as you go from prepaid credit; nothing is charged for failed or refused requests |
| Subscription | no monthly fee; paid credit does not expire |
| Free trial | $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 |
| Key management | one active key per account; a new key replaces the old one |
| Content | uncensored for adults; the only hard rule: no sexual content involving minors |
| Account | sign in with Google or with e-mail + password |
Error reference
Every error is JSON with a type you can switch on. You are never charged for an error.
| Code | Type | Meaning |
|---|---|---|
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 | slow down: rate or parallel limit reached |
503 | upstream_busy | temporary overload, retry shortly |
Frequently Asked Questions
How do I manage my API key and what happens if I lose it?
You can view or regenerate your API key from your account panel. When the key is regenerated, the old key becomes invalid immediately and cannot be used for new requests. Each account has only one active key.
Does my credit expire?
No, the credit you paid for never expires. When credit runs out, the service is not completely cut off, but you must top up credit to generate new tokens. Your credit balance is stored permanently in your account.
What content types does the model reject?
The model generally does not reject legal adult content, fictional scenarios, and security research. However, there is one strict restriction that always applies: sexual content involving adolescents/children is always blocked. This restriction is applied at the system level regardless of model settings.
Your key is a click away
Create an account, copy the key, and change the base URL. Setup is that simple.