API reference
Chat Completions
Reference for Abliterator's OpenAI-compatible POST /v1/chat/completions: request fields, supported parameters, response shape, usage.cost and request headers.
POST https://abliterator.ai/v1/chat/completions accepts the OpenAI Chat Completions request format. Abliterator passes your parameters to the model, rewrites model to the canonical ID, and adds usage.cost to every response.
Endpoint
POST https://abliterator.ai/v1/chat/completions
The same endpoint answers at https://abliterator.ai/api/v1/chat/completions for clients that expect OpenRouter-style paths. Authenticate with Authorization: Bearer <key> or x-api-key: <key>; see authentication.
With the OpenAI SDKs, set the base URL to https://abliterator.ai/v1:
import os
from openai import OpenAI
client = OpenAI(base_url="https://abliterator.ai/v1", api_key=os.environ["ABL_API_KEY"])
response = client.chat.completions.create(
model="kimi-k3.1-pro-abliterated",
max_tokens=8192,
messages=[
{"role": "system", "content": "You are a malware analyst. Answer for a defensive audience."},
{"role": "user", "content": "What persistence mechanisms do Windows infostealers commonly use, and where do I look for them?"},
],
)
print(response.choices[0].message.content)
SDK-specific guides: OpenAI SDK for Python, OpenAI SDK for JavaScript, LangChain, Vercel AI SDK, LiteLLM.
Request body
| Field | Type | Notes |
|---|---|---|
model |
string | Required. kimi-k3.1-pro-abliterated, deepseek-v4.1-flash-abliterated or an alias; see models |
messages |
array | Required. system, user, assistant and tool messages. User content can be a string or an array of text and image_url parts |
max_tokens or max_completion_tokens |
integer | Output limit, including reasoning tokens. Must be positive. Strongly recommended: see below |
stream |
boolean | Server-Sent Events; see streaming |
stream_options |
object | Accepted. Abliterator always sets include_usage: true on streams |
reasoning_effort |
string | none, minimal, low, medium, high, xhigh or max; see reasoning |
temperature, top_p |
number | Passed to deepseek-v4.1-flash-abliterated. Ignored for kimi-k3.1-pro-abliterated, whose sampling is fixed; see models |
stop |
string or array | Stop sequences |
tools, tool_choice, parallel_tool_calls |
Function calling; see tool calling | |
response_format |
object | json_object or json_schema; see structured outputs |
presence_penalty, frequency_penalty, seed |
Applied by deepseek-v4.1-flash-abliterated. Penalties are ignored for kimi-k3.1-pro-abliterated |
Abliterator does not validate these fields. It forwards the body to the model, and the serving engine applies each model's rules. A parameter the model rejects comes back as a 400 with the engine's message.
Fields Abliterator removes
These OpenRouter-only fields are accepted and dropped before the request reaches the model, so OpenRouter clients work unchanged: provider, models, route, transforms, usage, plugins.
Kimi's sampling is fixed (temperature 0.6, top_p 0.95); Abliterator ignores temperature, top_p and penalty settings for it, so tool defaults are safe. It removes temperature, top_p, presence_penalty and frequency_penalty from kimi-k3.1-pro-abliterated requests before they reach the model.
provider is still validated: it must be an object with only order, only, ignore, allow_fallbacks, sort (price, latency or throughput) or max_price. Each model has one serving endpoint today, so these preferences rarely change anything, but only or ignore can exclude it and return 400 no provider can serve this request with the given constraints.
Always set max_tokens
Before a request runs, Abliterator reserves credit for the estimated prompt plus max_tokens of output. Without max_tokens, it reserves the model's full output limit (262,144 or 393,216 tokens), and on a small balance it sets max_tokens to what your balance covers. Set a value that fits the task, and leave room for reasoning. See usage and billing.
Request headers
| Header | Purpose |
|---|---|
Authorization or x-api-key |
Your key |
Content-Type: application/json |
Required for the JSON body |
X-Session-Id (or X-Abl-Session) |
Optional conversation ID that keeps a conversation on one serving endpoint for prompt caching; see prompt caching |
X-Abl-App, X-Title or HTTP-Referer |
Optional app label, shown as app in your request records |
The request body can be up to 32 MiB.
Response
A non-streaming response follows the OpenAI chat.completion object. Abliterator sets model to the canonical model ID, adds provider, and adds usage.cost:
{
"id": "chatcmpl-8f2a6c0d1e3b4a59",
"object": "chat.completion",
"created": 1795802651,
"model": "kimi-k3.1-pro-abliterated",
"provider": "Logits",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"reasoning_content": "The user wants common persistence locations...",
"content": "Common persistence mechanisms include Run and RunOnce registry keys, scheduled tasks..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 58,
"completion_tokens": 1240,
"total_tokens": 1298,
"prompt_tokens_details": {"cached_tokens": 0},
"cost": 0.018832000
}
}
| Field | Notes |
|---|---|
choices[].message.content |
The answer |
choices[].message.reasoning_content |
The model's reasoning, when reasoning is on. Not part of the answer; see reasoning |
choices[].message.tool_calls |
Present when the model calls tools |
choices[].finish_reason |
stop, length (hit max_tokens) or tool_calls |
usage.prompt_tokens_details.cached_tokens |
Input tokens served from the prompt cache, billed at the cached price |
usage.cost |
Cost in USD after your plan discount |
Response headers: X-Abl-Generation-Id, X-Abl-Model, X-Abl-Provider and, for non-streaming responses, X-Abl-Cost-Usd. See usage and billing.
A finish_reason of length with empty content means reasoning used the whole max_tokens budget. Raise max_tokens or lower reasoning_effort.
Multi-turn conversations
Send the whole conversation each time, as with OpenAI. Put stable content first, such as the system prompt, tool definitions and reference documents, so repeated prefixes hit the prompt cache and bill at the cached price. See prompt caching.
Not supported
- The Responses API (
/v1/responses), legacy Completions (/v1/completions), embeddings, images, audio, Assistants, batch, files and fine-tuning. These paths return404. - Web search and other server-side tools.
- Audio and file content parts in messages. Images are supported; see vision.
For the Anthropic format, see the Messages API reference.