Skip to main content
To use the Anthropic SDK with abliteration.ai, set the base URL to https://api.abliteration.ai and pass your ak_... key as api_key= (sent as x-api-key) — no other code changes. abliteration.ai implements the Anthropic Messages API, including streaming, tool use, web search, and web fetch.

Configuration

Python

curl

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/messages with no policy setup. See request safety filtering.

Prompt caching

Prompt-prefix caching is automatic. Anthropic-style cache_control objects are accepted for SDK compatibility, but they do not guarantee a cache hit or a fixed retention period on abliteration.ai. Use a stable x-abliteration-session-id header to improve routing affinity, then check usage.cache_read_input_tokens to confirm a hit. See prompt caching.

Reasoning

All models reason before answering. On Messages, control it with:
  • output_config: { "effort": "high" } — set the reasoning depth (lowmax).
  • thinking: { "type": "enabled", "budget_tokens": N } — extended thinking with a token budget, mapped to an effort level. If this and output_config.effort are set, output_config.effort wins.
  • thinking: false — disable reasoning on the base or previous large model. Large V2 instead runs at low and hides the trace. This Large V2 compatibility behavior also overrides an explicit output_config.effort.
To keep reasoning but hide the trace: include_reasoning: false removes the thinking blocks from the response, and thinking.display: "omitted" returns a thinking block with its text emptied. The reasoning trace is returned as a thinking content block. See thinking & reasoning effort for per-model behavior.
abliterated-model-large and abliterated-model-large-v2 are text-only. Requests with image content are rejected with a 400 — send images to abliterated-model.
Last modified on September 2, 2026