Uncensored API integration guide
Connect your application to our uncensored LLM API by updating the base URL and injecting your prepaid API key. This guide covers the essential endpoints, streaming, and error handling for high-volume text generation.
Authentication & Base URL
Start by pointing your OpenAI-compatible SDK to the dedicated endpoint. Our infrastructure uses a single base URL for all requests, ensuring you only interact with the uncensored model without vendor lock-in. You must include your API key in the Authorization header for every call. This key is generated instantly when you sign up via Google or email. There is no monthly fee to maintain access, and the key remains valid until your prepaid credit is exhausted. Errors during authentication, like an invalid key, return a 401 status code. Refusals for lawful adult content are free, but you pay only for actual token usage.
curl https://api.unsecureapikeys.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "List the three main dependencies for this python script"}]
}'
Chat Completions Endpoint
Send text data to the POST /v1/chat/completions endpoint to receive generated responses. This is the primary interface for your integrations, supporting a context window of 100,000 tokens for both prompt and completion. The model id to specify in your payload is always uncensored. You do not need to worry about complex model routing or versioning, as we serve a single open-weight model tuned for unfiltered output. If you exceed the 8 MB request body limit, the API returns an error. You can also check available models via GET /v1/models to verify connectivity before heavy lifting.
Streaming Responses
Enable real-time token generation by setting stream: true in your request payload. The API returns Server-Sent Events (SSE) for low-latency display in your applications. Token usage statistics appear in the final chunk of the stream, allowing you to track costs accurately. This method is ideal for chatbots or interactive interfaces where users expect immediate feedback. Note that the maximum output per request is up to the full 100,000-token window; max_tokens is optional. Streaming works seamlessly with standard OpenAI SDKs when the base URL is updated correctly.
from openai import OpenAI
client = OpenAI(base_url="https://api.unsecureapikeys.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)
Function Calling & JSON Mode
Integrate structured data outputs using JSON mode or function calling capabilities. Set response_format to {"type": "json_object"} to force consistent JSON outputs for your parsers. You can also define tools and specify tool_choice for complex agent workflows. The uncensored model supports these features without the usual rigid guardrails that often break function schemas in other providers. This makes it reliable for automated pipelines that require precise data extraction. Ensure your tool definitions are valid to avoid parsing errors on the client side.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.unsecureapikeys.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);
Parameters & Limits
Control generation behavior with standard parameters like temperature, top_p, stop, and seed. Adjusting these allows fine-tuning of creativity versus determinism in your outputs. You are limited to 300 requests per minute per key, with a concurrency of 8 simultaneous requests. A single active key is allowed per account; generating a new one replaces the old. The prepaid credit model means you pay $0.15 per 1M input tokens and $0.50 per 1M output tokens. Errors do not consume credit, ensuring you only pay for successful completions.
Error Handling
Handle common API responses gracefully to maintain application stability. A 401 error indicates an invalid or expired API key. A 402 error means your prepaid balance is insufficient, requiring a crypto top-up via USDT or USDC. Rate limits trigger a 429 response if you exceed 300 requests per minute. The API does not return embeddings or image data, so requesting those formats may cause errors. Always check the status code before parsing the JSON body. Context window limits are strict, so monitor token counts to avoid truncation in long conversations.
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)Frequently asked questions
Which payment methods do you accept?
Crypto only: USDT on TRC20 or USDC on Base, any whole amount from $20 to $500. Bonus credit applies from $50.
What happens if I hit the rate limit or run out of credit?
A 429 error returns if you exceed 300 requests per minute, while a 402 error indicates zero balance. You can top up with USDT (TRC20) or USDC (Base) at any time. Credit never expires, so you can pause and resume without losing funds.
Is the uncensored model suitable for high-volume commercial use?
Yes, the API supports 100,000 token context windows and streaming for robust integrations. It is designed for high-volume, uncensored text generation without monthly subscriptions. The prepaid model ensures predictable costs for NSFW or creative writing applications.
Get your API key
Sign up, grab the key, update your base URL. That is the entire setup.