Skip to main content
Use LiteLLM’s built-in abliteration/ provider with your Abliteration API key. No custom base URL is needed.

Install

Use Python 3.12 or later and create an isolated environment:
Create an ak_... key in the console, then set it in the same terminal:

Send a request

Save this as chat.py and run python chat.py:
Prefix any supported model ID with abliteration/. For images, use abliteration/abliterated-model-large-flash or abliteration/abliterated-model. Large v2 accepts text only.

Stream a response

Save this as stream.py and run python stream.py:
The final chunk includes token usage, including cached input tokens when available. See prompt caching for how to improve cache reuse.

Run a local gateway

In the same environment, install the proxy and create a key for local gateway clients:
Copy the printed gateway key for the client terminal. It is separate from your Abliteration API key. Save this as config.yaml:
Start the gateway:
In a second terminal, set the gateway key you copied:
Send a request:
A successful request returns an assistant message in choices[0].message.content and token counts in usage. Gateway clients use abliteration-chat as the model name and the gateway key for authentication. Keep your Abliteration key on the gateway process.

Tools and reasoning

Pass tools, tool_choice, and response_format as in OpenAI Chat Completions. In LiteLLM 1.106.4, put reasoning_effort in extra_body, as shown above. A top-level reasoning_effort is not forwarded. See reasoning effort for supported levels.

Responses and Messages

LiteLLM translates Responses and Anthropic Messages requests into Chat Completions for this provider. For endpoint-specific features such as Anthropic web fetch, use Abliteration’s native APIs. See LiteLLM’s provider guide for its translated interfaces.

Troubleshooting

LiteLLM needs a current model catalog to estimate costs and recognize model limits. Estimates can differ from your bill because of web search charges and subscription discounts. Check Abliteration pricing and Console usage for billing.
Last modified on October 27, 2026