API Documentation for Uncensored Inference
Get started with the best abliterated LLM API in minutes. Send requests to our OpenAI-compatible endpoint and receive uncensored text responses instantly.
Base URL and Authentication
The base URL for all requests is https://api.bestabliteratedllm.com/v1. This endpoint works with any standard OpenAI SDK by updating the base URL configuration. You authenticate using a single API key generated during signup. The key grants access to the dedicated uncensored model without subscription fees or hidden monthly charges.
Include your API key in the Authorization header as a Bearer token. If the key is missing or invalid, the API returns a 401 error. Each account holds one active key; generating a new one replaces the previous key immediately.
Chat Completions Endpoint
Send text data to the POST /v1/chat/completions endpoint. The system returns generated text based on your prompt. Use the model ID uncensored to access the specific large language model tuned for unrestricted responses. The API does not support embeddings, images, audio, or video generation.
This direct approach ensures you pay only for the tokens processed. Errors and refusals consume no credit, making it cost-effective for development. The model handles lawful adult content, fictional narratives, and controversial topics without standard content filters.
Streaming Responses with SSE
Enable streaming by setting stream to true in your request. The API sends Server-Sent Events (SSE) for real-time token delivery. Token usage statistics appear in the final chunk of the stream. This method reduces perceived latency for end-users in chat applications.
Streaming allows your application to display partial responses as they generate. It provides a smoother user experience compared to waiting for the full completion. Monitor the stream for the final chunk to capture accurate token counts for billing purposes.
Function Calling and JSON Mode
Use the tools parameter to enable function calling capabilities. This allows the model to output structured data for your application logic. You can also enforce strict JSON output using response_format: {"type": "json_object"}. This ensures consistent parsing for automated workflows.
Function calling integrates naturally with the uncensored model’s reasoning. It works alongside standard text generation without requiring separate endpoints. Define your tool schemas in the request payload to guide the model’s output structure effectively.
Parameters and Token Limits
The context window supports up to 100,000 tokens for prompt and completion combined. You can generate up to 16,000 tokens per request by setting the max_tokens parameter. If unspecified, the default output limit is 2,048 tokens. Adjust temperature and top_p to control creativity and randomness.
Use seed for reproducible results during testing. The presence_penalty and frequency_penalty parameters help reduce repetition. These controls give you precise management over the model’s behavior without external configuration.
Rate Limits and Errors
Each API key allows 300 requests per minute and eight simultaneous concurrent requests. The maximum request body size is 8 MB. Exceeding these limits triggers a 429 Too Many Requests error. If your prepaid credit runs out, the API returns a 402 Payment Required error.
A 401 error indicates an invalid or expired API key. Ensure your key matches the one generated during signup. Credit never expires, so you can top up via crypto at any time without losing your balance. Errors do not consume your prepaid tokens.
cURL
curl https://api.bestabliteratedllm.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Show me the full schema for the chat completion endpoint."}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.bestabliteratedllm.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)Node.js
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.bestabliteratedllm.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);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)Common questions
What is the base URL for the abliterated LLM API?
The base URL is HTTPS://api.bestabliteratedllm.com/v1. It is fully compatible with standard OpenAI SDKs and clients that allow custom base URL configuration.
How do I authenticate my requests?
Include your API key in the Authorization header as a Bearer token. Each account uses a single active key that replaces the previous one upon regeneration.
What happens if I hit the rate limit?
The API returns a 429 error if you exceed 300 requests per minute or eight concurrent connections per key. Pause your requests briefly to resume normal operation.
Get your key in one step
Sign up, copy the token, point your base URL. Done.