EN ▾

Integration Guide: Standard OpenAI SDKs

Connect your application to the abliterated llm api using standard OpenAI SDKs. This guide covers authentication, basic requests, streaming, tool calling, and key limits.

Base URLhttps://api.abliteratedapi.com/v1Modeluncensored

Prerequisites

You need an API key from the abliterated llm api dashboard. Create an account with an email and password to receive your key immediately. No credit card is required for the trial. The base URL for all requests is https://api.abliteratedapi.com/v1. This URL works with the official OpenAI SDKs and any OpenAI-compatible client by setting the base_url and providing your API key.

Authentication

Pass your API key in the Authorization header. The value must be Bearer YOUR_API_KEY. If the key is invalid, you will receive a 401 error. If the key is revoked after regeneration, it will also return 401. If you have insufficient credit, you will receive a 402 error. Keys do not expire; they are only invalidated when you regenerate them.

curl https://api.abliteratedapi.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."}]
  }'

Basic Completion

Send a POST request to /v1/chat/completions. The model ID is "uncensored". The API accepts standard message structures. Prompts are not used for training. The model responds with text output. You can send up to 8 MB per request body.

from openai import OpenAI

client = OpenAI(base_url="https://api.abliteratedapi.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)

Streaming Responses

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE). This allows you to process tokens as they are generated. Streaming works with all standard SDKs. Use this for better user experience in chat interfaces.

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)

Tool Calling

The abliterated llm api supports function calling. Define tools in your request body. The model can select and call these tools. This works with the standard OpenAI format. Ensure your tool definitions match the SDK expectations. This is useful for building agents or automated workflows.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.abliteratedapi.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);

Rate Limits & Limits

You are limited to 300 requests per minute per key. The context window is 100,000 tokens for prompt and completion combined. If you exceed the rate limit, you receive a 429 error. There is no subscription; credit is prepaid and does not expire. Top-ups start at $20. A hard content limit blocks sexual content involving minors.

API facts in one table

Use this table to decide whether the API fits your project before you buy credit.

ParameterDetails
API formatOpenAI Chat Completions schema; official openai SDKs work unchanged
AuthenticationAuthorization: Bearer YOUR_KEY
Base URLhttps://api.abliteratedapi.com/v1
Model IDuncensored
MethodsPOST /v1/chat/completions · GET /v1/models
Max outputup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
JSON modeJSON object mode via response_format json_object
Other parameterstemperature, top_p, stop, seed and the two penalties are passed through
SSE streamingSupported (stream: true), usage included at the end
Function callingYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Context window100,000 tokens (prompt + completion together)
Requests per minute300 requests per minute per key
Concurrencyup to 8 in parallel per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Request size8 MB request body
How you paypay as you go from prepaid credit; nothing is charged for failed or refused requests
Credit expirypaid credit never expires, no subscription
Paymentcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Free trial$0.50 for 7 days, no card · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
Bonus credit+5% from $50, +10% from $100, +15% from $200
Price$0.15 per 1M input tokens · $0.50 per 1M output tokens
Keysone key per account, regenerate any time (the old one stops working)
Content policyadult content allowed; sexual content involving minors is refused
AccountGoogle or e-mail and password

Errors and what to do

Errors come back as JSON with a stable type; failed and refused requests are not billed.

HTTPTypeWhat to do
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedno key, wrong key, or a key replaced by a newer one
402no_creditout of credit; add credit and retry
403content_blockedrefused by the content policy
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largebody over 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busymodel busy — retry in a few seconds

Questions and answers

Do API keys expire?

No, API keys do not expire. They are only invalidated if you regenerate a new key in your dashboard. You can regenerate your key at any time, which immediately revokes the old one.

What is the context window size?

The context window is 100,000 tokens. This includes both the input prompt and the output completion. You can send up to 8 MB per request body.

What content is blocked?

The model does not refuse lawful adult, fictional, or controversial topics. However, a hard content limit always applies: sexual content involving minors is blocked. Requests of that kind are denied.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API key