Compatibility

OpenAI-Compatible Uncensored API: Change the Base URL

OpenAI-compatible uncensored API: point the OpenAI Python or Node SDK, curl, LangChain or LiteLLM at Abliterator's abliterated models by changing the base URL.

Reviewed OpenAIAPISDKCompatibility

Quick answer

Abliterator is an OpenAI-compatible uncensored API: set the base URL to https://abliterator.ai/v1, use an Abliterator key, and set the model to kimi-k3.1-pro-abliterated or deepseek-v4.1-flash-abliterated. Chat Completions, streaming, tool calling, JSON output, image input and reasoning_effort work; the Responses API, embeddings and other OpenAI-only endpoints do not.

The three-line change

Abliterator implements the OpenAI Chat Completions API, so moving existing code to an uncensored model means changing three values:

Setting OpenAI Abliterator
Base URL https://api.openai.com/v1 (the SDK default) https://abliterator.ai/v1
API key Your OpenAI key Your Abliterator key, from /keys
Model A GPT model ID kimi-k3.1-pro-abliterated or deepseek-v4.1-flash-abliterated

Everything else in a typical Chat Completions call, including the message format, streaming and tool definitions, stays as it is. Below is the change for the five clients people use most, followed by the exact list of what is and is not supported.

OpenAI Python SDK

import os
from openai import OpenAI

client = OpenAI(base_url="https://abliterator.ai/v1", api_key=os.environ["ABL_API_KEY"])

resp = client.chat.completions.create(
    model="kimi-k3.1-pro-abliterated",
    messages=[{"role": "user", "content": "Write a YARA rule that flags PE files importing both VirtualAllocEx and WriteProcessMemory."}],
)
print(resp.choices[0].message.content)

# The model list comes from GET /v1/models
print([m.id for m in client.models.list()])

Full guide: OpenAI SDK for Python.

OpenAI Node SDK

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://abliterator.ai/v1", apiKey: process.env.ABL_API_KEY });

const resp = await client.chat.completions.create({
  model: "kimi-k3.1-pro-abliterated",
  messages: [{ role: "user", content: "Write a YARA rule that flags PE files importing both VirtualAllocEx and WriteProcessMemory." }],
});
console.log(resp.choices[0].message.content);

Note the option names: baseURL and apiKey in Node, base_url and api_key in Python. Full guide: OpenAI SDK for JavaScript.

curl

curl https://abliterator.ai/v1/chat/completions \
  -H "Authorization: Bearer $ABL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "deepseek-v4.1-flash-abliterated", "messages": [{"role": "user", "content": "What does a Kerberos TGS-REQ with RC4 encryption suggest in a domain that enforces AES?"}]}'

The key can go in Authorization: Bearer or in an x-api-key header.

LangChain

ChatOpenAI from the langchain-openai package takes the same two settings.

import os
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="deepseek-v4.1-flash-abliterated",
    base_url="https://abliterator.ai/v1",
    api_key=os.environ["ABL_API_KEY"],
)
print(llm.invoke("Classify this log line as benign or suspicious and say why: 'powershell -enc SQBFAFgA...'").content)

Full guide: LangChain with Abliterator.

LiteLLM

LiteLLM routes to any OpenAI-compatible server when the model name has the openai/ prefix and you pass api_base.

import os
import litellm

resp = litellm.completion(
    model="openai/kimi-k3.1-pro-abliterated",
    api_base="https://abliterator.ai/v1",
    api_key=os.environ["ABL_API_KEY"],
    messages=[{"role": "user", "content": "Summarize the MITRE ATT&CK tactic 'Defense Evasion' for a new SOC analyst."}],
)
print(resp.choices[0].message.content)

Full guide: LiteLLM with Abliterator.

Parameter compatibility

These are passed through to the model or handled by Abliterator:

Feature Status on Abliterator
POST /v1/chat/completions Supported
GET /v1/models Supported
stream: true Supported, Server-Sent Events; the stream ends with a usage event
tools (function calling) Supported; see tool calling
response_format Supported
temperature, top_p, max_tokens, stop Supported. Kimi's sampling is fixed (temperature 0.6, top_p 0.95), so Abliterator ignores temperature and top_p for it
reasoning_effort Supported on both models
Images as image_url content parts (https or base64 data URL) Supported
usage.cost in the response Abliterator extra: the request's cost in USD
X-Abl-Generation-Id, X-Abl-Model, X-Abl-Cost-Usd headers Abliterator extras (cost header on non-streaming responses)

And these OpenAI features are not available on Abliterator:

Not supported
Responses API (/v1/responses) and Assistants
Embeddings
Image generation and audio
Fine-tuning and the batch API
Web search and file uploads

If your code uses one of these, keep that call on its original provider and send only Chat Completions traffic to Abliterator.

Redirect tools you cannot edit

Some scripts and internal tools build a default OpenAI client and expose no base URL setting. Both official SDKs read two environment variables at startup, so you can redirect them without touching the code:

export OPENAI_BASE_URL="https://abliterator.ai/v1"
export OPENAI_API_KEY="$ABL_API_KEY"

The tool still sends its own model name, so this only works if it lets you choose the model, or reads it from configuration. If it hardcodes a GPT model ID, Abliterator returns 404.

A migration checklist

Moving a working OpenAI integration takes minutes, but four details catch people out:

  1. Keep the /v1 suffix in the base URL. The SDK appends /chat/completions to whatever you set.
  2. Replace hardcoded model IDs. Search the codebase for GPT model names; feature flags and config files are the usual hiding places.
  3. Revisit max_tokens when you add reasoning. A higher reasoning_effort means the model thinks longer before it answers, so a tight max_tokens written for a non-reasoning model may cut answers short. The reasoning guide covers the settings.
  4. Move unsupported calls separately. If the same client also creates embeddings, give Abliterator its own client instance instead of changing the shared one.

Errors your SDK will see

The status codes follow the usual meaning, so SDK error classes map cleanly: 400 for an invalid request, 401 for a missing or bad key, 402 when you are out of credit or a key hit its spend limit, 403 when a key is not allowed to use that model, 404 for an unknown model, 429 for rate limits or too many requests in flight, and 502 when the upstream is unavailable after retries. A 429 carries a Retry-After header, which the official OpenAI SDKs respect in their built-in retries.

Also Anthropic-compatible

Tools built on the Anthropic SDK, including Claude Code, can use the same key with the base URL https://abliterator.ai. See the Claude Code guide. For the reasons to use an uncensored model at all, start with the uncensored LLM API overview.

Frequently asked questions

Do I need a different SDK to use Abliterator?

No. The official openai package for Python (version 1 and later) and for Node (version 4 and later) work as they are. You pass a different base URL and API key when you create the client.

Does Abliterator support the OpenAI Responses API?

No. Abliterator implements Chat Completions at /v1/chat/completions, not /v1/responses. Tools that only speak the Responses API, including current versions of Codex CLI, will not work with it.

Can I set the base URL with environment variables instead of code?

Yes. Both official OpenAI SDKs read OPENAI_BASE_URL and OPENAI_API_KEY, so setting them to https://abliterator.ai/v1 and your Abliterator key redirects tools that create a default client.

Will GPT model names work on Abliterator?

No. Abliterator serves only its two abliterated models. A request for a model it does not serve, such as a GPT model ID, returns 404, so set model to kimi-k3.1-pro-abliterated or deepseek-v4.1-flash-abliterated.