Quick Integration with the Uncensored API
Integrate quickly with the uncensored API using standard OpenAI clients. Configure authentication, send text requests, and explore advanced features like streaming and tool calling with direct documentation.
https://api.apisemrestricoes.com/v1uncensored
Initial Setup and Authentication
To start using the uncensored api, you need a valid API key. Go to the Get API key page with your email and password. The key is displayed immediately after registration, without needing a card for the trial credit.
All requests must include the Authorization: Bearer sk-... header. If the key is invalid, the server returns error 401. Remember: each account has only one active key, but you can regenerate it at any time, invalidating the previous one.
First Request
The main endpoint is POST /v1/chat/completions. The available model is identified as "uncensored". It is an open-weight model, tuned to not refuse lawful adult, fictional, or research topics.
Below is a basic example using curl to send a simple message.
curl https://api.apisemrestricoes.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."}]
}'Note that the response will contain the full text generation. There are no embeddings or image generation in this specific endpoint.
Python Integration
If you prefer Python development, the official openai library works perfectly, just point to the correct base_url. This ensures familiarity with the standard request structure.
Set the base URL to https://api.apisemrestricoes.com/v1 and enter your key in the environment variable or directly in the client. The code below demonstrates creating a simple conversation.
from openai import OpenAI
client = OpenAI(base_url="https://api.apisemrestricoes.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)Remember that the model is not GPT or Claude; it is a proprietary open-source architecture optimized for content freedom.
Node.js Integration
For JavaScript or TypeScript environments, use the Node.js openai SDK. The configuration is similar to Python: adjust the baseURL and authenticate.
The code below shows how to create a client instance and send a chat completion request. The response is processed synchronously by default, but for continuous data flows, see the streaming section.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.apisemrestricoes.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);This method is ideal for backend applications that process text without needing real-time browser updates.
Streaming via SSE
Server-Sent Events (SSE) support allows receiving responses token by token, improving latency perception for the end user. Enable streaming by setting stream: true in your request.
The example below illustrates how to consume the stream in parts, allowing text to be displayed gradually.
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)This is particularly useful for chat interfaces where users prefer to see the model "typing" in real time, without waiting for the full response to complete.
Limits, Errors, and Context Window
Your account is subject to specific limits to ensure service stability. The limit is 300 requests per minute per key. The request body cannot exceed 8 MB.
Common errors include: 401 (invalid key), 402 (insufficient credit), and 429 (rate limit exceeded). The total context window (prompt + completion) is 100,000 tokens. If you need more contextual memory capacity, adjust the size of the messages sent.
API facts in one table
Before you integrate, here is exactly what you get with a key.
| Parameter | Details |
|---|---|
| Protocol | OpenAI Chat Completions schema; official openai SDKs work unchanged |
| API key | Authorization: Bearer YOUR_KEY |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Base URL | https://api.apisemrestricoes.com/v1 |
| Model ID | uncensored |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| JSON mode | JSON object mode via response_format json_object |
| Completion length | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| SSE streaming | Supported (stream: true), usage included at the end |
| Max context | 100,000 tokens, input and output combined |
| Sampling parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| Parallel requests | up to 8 in parallel per key |
| Rate limit | 300/min per key |
| Request size | 8 MB request body |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| 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 |
| Payment | crypto: USDT on TRON or USDC on Base, $10–$500, any whole sum |
| Billing | pay as you go from prepaid credit; nothing is charged for failed or refused requests |
| Price | input $0.25 / 1M tokens, output $1.00 / 1M tokens |
| Bonus credit | +5% from $50, +10% from $100 |
| Content policy | adult content allowed; sexual content involving minors is refused |
| Key management | one key per account, regenerate any time (the old one stops working) |
| Sign-in | Google or e-mail and password |
Error codes
Every error is JSON with a type you can switch on. You are never charged for an error.
| Code | Type | Meaning |
|---|---|---|
400 | bad_request | invalid JSON, empty messages, bad parameter, or prompt + max_tokens over the window — fix and resend |
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 | request body larger than 8 MB |
429 | rate_limited · concurrency | slow down: rate or parallel limit reached |
503 | upstream_busy | model busy — retry in a few seconds |
Frequently asked questions
How does payment and credit work?
The model is prepaid with no monthly subscription. Added credits never expire. You can top up from $10, with a 5% bonus above $50 and 10% above $100. The price is $0.25 per 1M input tokens and $1.00 per 1M output tokens.
Is the 'uncensored' model the same as OpenAI's?
No. It is an open-weight model, different from GPT, Claude, or Gemini. It runs on our own GPU servers and is tuned specifically to not refuse content for lawful adult use, while keeping the interface compatible with the OpenAI API.
Are my training data used in requests?
No. Prompts and responses are not used to train the model. You only need an email and password to create the account. Privacy is maintained, except for the strict block on sexual content involving minors, which always applies.
Your key is one form away
Create an account, copy the key, and change the base URL. That is all the configuration.