Integration Guide: Chat Completions API
Connect your application to the abliterated AI API in under five minutes using standard OpenAI SDKs. This guide covers the base URL, authentication, and the specific parameters needed for uncensored generation.
https://api.aiabliterated.cc/v1uncensored
Base URL and Authentication
The abliterated API operates as a drop-in replacement for standard OpenAI endpoints. You route requests to https://api.aiabliterated.cc/v1 and authenticate using a Bearer token in the Authorization header. This setup works with any client that supports the OpenAI protocol.
- Base URL:
https://api.aiabliterated.cc/v1 - Auth Header:
Authorization: Bearer YOUR_API_KEY - Model ID:
uncensored
Authentication is strict. If you send an invalid key, the system returns a 401 error immediately.
The /v1/chat/completions Endpoint
Send your prompt data to the /v1/chat/completions endpoint to receive text responses. The system expects a JSON payload containing the model identifier and your message history. This is a text-only interface; do not expect image or audio generation.
The model processes input and output within a 100,000 token context window. If you do not specify a limit, the system defaults to generating 2,048 tokens per request. You can adjust this up to a hard maximum of 16,000 tokens.
from openai import OpenAI
client = OpenAI(base_url="https://api.aiabliterated.cc/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)
Streaming Responses & Token Usage
Enable streaming by setting stream: true in your request payload. The API returns a Server-Sent Events (SSE) stream of partial tokens. This reduces perceived latency significantly for interactive applications.
Token usage data is not sent with every chunk. Instead, the final chunk of the stream contains the complete usage statistics for that request. This design keeps the stream lightweight while providing accurate billing data. Errors during streaming are handled by closing the connection with an error JSON object.
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)
Function Calling and JSON Mode
The abliterated model supports structured outputs via the response_format parameter. Set this to {"type": "json_object"} to force strict JSON compliance. This is essential for reliable integration with backend systems.
Function calling is also available. Define tools in your request, and the model will output valid JSON matching your schema. The system does not validate your tool definitions, so ensure your schemas are correct before sending requests. This capability allows for complex agent architectures without external parsing layers.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.aiabliterated.cc/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: Temperature, Top-P, and Seed
Control the randomness of your outputs using standard sampling parameters. The temperature value adjusts creativity, while top_p limits the nucleus sampling. Use seed for deterministic outputs when you need reproducible results for debugging.
Other available parameters include stop sequences, presence_penalty, and frequency_penalty. These allow fine-tuned control over token repetition and topic adherence. The uncensored model responds well to low temperature settings for code generation and high temperatures for creative writing.
Rate Limits and Constraints
The API enforces strict limits to ensure stability for all users. You are limited to 300 requests per minute per key. Concurrent requests are capped at 8 simultaneously. Each request body must not exceed 8 MB.
If you exceed these limits, the system returns a 429 Too Many Requests error. Billing is based on real token usage. Errors and refusals do not consume your prepaid credit. You can manage your key directly from the dashboard if you need to rotate credentials due to these constraints.
cURL
curl https://api.aiabliterated.cc/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Summarize this 500 word technical document"}]
}'Frequently asked questions
How do I pay for the abliterated API?
We accept only cryptocurrency for top-ups. You can deposit USDT on the TRC20 network or USDC on the Base network. Minimum deposits start at $20, and higher amounts trigger bonus credit percentages.
What happens if I get a 402 error?
A 402 error indicates that your prepaid credit balance is insufficient to cover the request. You must top up your account using crypto to resume service. Your credit does not expire, so you can add funds whenever convenient.
Is there a free trial available?
Yes, every new account receives $0.50 of trial credit valid for 7 days. You can sign up using your Google account or an email address with a password.
Secure your API key
Register, copy your token, update your base URL. That is the entire process.