Skip to main content
To use any OpenAI SDK with abliteration.ai, set the base URL to https://api.abliteration.ai/v1 and your API key to an ak_... key from the console. abliteration.ai implements the OpenAI /v1/chat/completions, /v1/responses, and /v1/models endpoints — no other code changes needed.

Configuration

Python

Node

Streaming

Set stream: true. See streaming.

Prompt caching

Prompt-prefix caching is automatic. Set a stable prompt_cache_key for each logical conversation or reusable workload to improve routing affinity. It does not guarantee a cache hit; check the cached-token count in the response usage. See prompt caching.

Tool calling

Pass tools and tool_choice exactly as with OpenAI. See tool calling.

Request safety filtering

Pass flagged_categories in the request body to reject calls whose content matches moderation categories you choose (harassment, hate, illicit, sexual). Works on /v1/chat/completions with no policy setup. See request safety filtering.

Reasoning

All models reason before answering. Control the depth with an effort level:
  • Chat Completionsreasoning_effort (minimalmax). All models accept the full ladder.
  • Responsesreasoning.effort. The base model accepts up to xhigh (it rejects max); abliterated-model-large and abliterated-model-large-v2 accept up to max.
  • Compatibility alias — a top-level effort works on both surfaces, aliasing the field above. Standard clients should prefer reasoning_effort / reasoning.effort.
  • Legacy toggle — top-level thinking: false disables reasoning on Chat Completions, except on abliterated-model-large-v2, where it runs at low and hides the trace.
Set reasoning_effort: "none" (or reasoning.effort: "none") to disable reasoning on the base or previous large model. Large V2 maps none and other disable-shaped controls to low reasoning with the trace hidden. Use include_reasoning: false to keep the selected reasoning depth but drop the trace from the response. See thinking & reasoning effort for the full behavior, per-model differences, and where the trace is returned.

Structured outputs

Pass response_format to constrain the output:
  • {"type": "json_object"} — valid JSON.
  • {"type": "json_schema", "json_schema": {...}} — JSON matching your schema.
Both work on /v1/chat/completions. See the compatibility matrix for a full feature-by-feature list.
abliterated-model-large and abliterated-model-large-v2 are text-only. Requests with image or video content are rejected with a 400 — send multimodal inputs to abliterated-model.
Last modified on September 2, 2026