Quickstart: Integrate the Uncensored AI Model
Integrate the uncensored ai model into your existing pipelines by swapping the base URL and API key. This guide covers authentication, streaming, and structured output for production use.
Base URL and Authentication
Start by configuring your client to point at the hosted endpoint. The base URL is https://api.uncensoredaimodel.com/v1. You must include your API key in the Authorization header as a bearer token. This key is generated when you sign up via Google or email. Keep it secure, as it grants access to your prepaid credit.
curl https://api.uncensoredaimodel.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."}]
}'The service accepts standard OpenAI-compatible requests. If you are migrating from another provider, update the base_url and replace the key. The model identifier is uncensored. No other model IDs are available on this instance.
Chat Completions Endpoint
Send messages to POST /v1/chat/completions. The endpoint accepts a standard chat format with system, user, and assistant roles. It returns text completions. There are no embeddings, image generation, or fine-tuning endpoints. The model is an open-weight large language model tuned to answer without refusals for lawful adult content.
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoredaimodel.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)Each request consumes input and output tokens. You are charged only for tokens actually used in the response. Errors and refusals do not consume credit, provided they are not due to insufficient funds.
Streaming Responses (SSE)
Enable streaming by setting stream: true. The API returns Server-Sent Events (SSE). Each chunk contains partial text. The final chunk includes the token usage statistics for the entire request. This is useful for real-time UI updates.
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)Handle the stream until it closes. Do not assume a specific number of chunks. The context window supports up to 100,000 tokens total. Streaming works within this limit.
Function Calling & Tools
Define tools in your request body. The model supports function calling with tools and tool_choice parameters. It returns structured tool calls when appropriate. You can enforce specific tool usage.
Use this for building agents or automating workflows. The model is designed to follow instructions accurately. It does not hallucinate tool schemas. Define your tools clearly in the request.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncensoredaimodel.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);Parse the tool calls from the response. Execute them locally or in your backend. Then feed the results back into the conversation if needed.
JSON Mode Configuration
Force structured output by setting response_format to {"type": "json_object"}. The model will return valid JSON. This is critical for parsing data in automated pipelines.
Combine JSON mode with function calling for robust tool use. Ensure your schema is strict. The model adheres to the format when requested. Use this for extracting entities or generating configuration files.
Parameters and Limits
Adjust temperature and top_p to control randomness. Higher values increase creativity. Lower values make outputs more deterministic. Use max_tokens to limit output length. If it is not set, the response can run to the end of the window.
The rate limit is 300 requests per minute per key. Concurrent requests are capped at 8. If you exceed these, you receive a 429 error. A 401 error means the key is invalid. A 402 error occurs if your prepaid credit is exhausted. Errors like model refusals are free. Credit does not expire.
Technical specifications
The numbers below are the real limits of this API, not marketing. Compare them with what your app needs.
| Parameter | Details |
|---|---|
| Protocol | OpenAI Chat Completions schema; official openai SDKs work unchanged |
| Endpoints | POST /v1/chat/completions · GET /v1/models |
| Base URL | https://api.uncensoredaimodel.com/v1 |
| API key | Authorization: Bearer YOUR_KEY |
| Model | uncensored |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Structured output | JSON object mode via response_format json_object |
| Other parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| 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) |
| Streaming | Supported (stream: true), usage included at the end |
| Max body | up to 8 MB per request |
| Rate limit | 300/min per key |
| Concurrency | up to 8 in parallel per key |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Bonus credit | +5% on $50+, +10% on $100+, +15% on $200+ |
| Top-up | USDT (TRC20) or USDC (Base), any whole amount from $20 to $500 |
| Subscription | no monthly fee; paid credit does not expire |
| Price | $0.15 per 1M input tokens · $0.50 per 1M output tokens |
| How you pay | pay as you go from prepaid credit; nothing is charged for failed or refused requests |
| 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 |
| Sign-in | sign in with Google or with e-mail + password |
| Key management | one key per account, regenerate any time (the old one stops working) |
| Content | adult content allowed; sexual content involving minors is refused |
HTTP errors
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 | check the Authorization header or use your current key |
402 | no_credit | out of credit; add credit and retry |
403 | content_blocked | refused by the content policy |
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 | temporary overload, retry shortly |
Questions and answers
What causes a 402 error?
A 402 error indicates that your prepaid credit balance is insufficient to cover the token usage of the request. Errors and refusals do not consume credit, so this error only occurs when the account balance is too low for the requested generation.
Is this an uncensored coding llm?
The model is an uncensored large language model tuned for lawful adult use. It does not refuse controversial or adult topics. It is not specifically branded as a coding llm, though it can generate code like any other LLM.
Does the SDK manage connection pooling?
The API works with official OpenAI SDKs. The SDK behavior for connection pooling and retry logic depends on the specific SDK implementation you choose. The API itself handles the requests and returns standard HTTP responses.