> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abliteration.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Use the Anthropic SDK with abliteration.ai

> How to use abliteration.ai with the Anthropic Messages API — base URL, auth token, and what's supported.

**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

|          |                                                                     |
| -------- | ------------------------------------------------------------------- |
| Base URL | `https://api.abliteration.ai`                                       |
| Auth     | `Authorization: Bearer ak_...` *or* `x-api-key: ak_...` — both work |
| Endpoint | `/v1/messages`                                                      |

## Python

```python theme={"system"}
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.abliteration.ai",
    api_key=os.environ["ABLIT_KEY"],
)

resp = client.messages.create(
    model="abliterated-model",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
)
```

## curl

```sh theme={"system"}
curl https://api.abliteration.ai/v1/messages \
  -H "x-api-key: $ABLIT_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "abliterated-model",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello"}]
  }'
```

## 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](/capabilities/request-safety-filtering).

## Thinking

`abliterated-model` is a reasoning model. Set `"thinking": false` at the top level of the request body to skip reasoning and return only the final answer. See [thinking toggle](/capabilities/thinking).
