> ## 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 any OpenAI SDK with abliteration.ai

> How to use abliteration.ai with any OpenAI SDK — base URL, authentication, supported features, and caveats.

**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](https://abliteration.ai/console). abliteration.ai implements the OpenAI `/v1/chat/completions`, `/v1/responses`, and `/v1/models` endpoints — no other code changes needed.

## Configuration

| | |
| - | - |
| Base URL | `https://api.abliteration.ai/v1` |
| Auth | `Authorization: Bearer $ABLIT_KEY` |
| Endpoints | `/chat/completions`, `/responses`, `/models` |

## Python

```python theme={"system"}
from openai import OpenAI

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

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

## Node

```javascript theme={"system"}
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.abliteration.ai/v1",
  apiKey: process.env.ABLIT_KEY,
});
```

## Streaming

Set `stream: true`. See [streaming](/capabilities/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](/capabilities/prompt-caching).

## Tool calling

Pass `tools` and `tool_choice` exactly as with OpenAI. See [tool calling](/capabilities/tool-calling).

## Policies

Published policies scoped to your project apply automatically. Pass `policy_ids` to add published policies selected for this request. See [Policies in API requests](/policy-gateway/api-requests).

## Reasoning

All models reason before answering. Control the depth with an effort level:

* **Chat Completions** — `reasoning_effort` (`minimal` … `max`). All models accept the full ladder.
* **Responses** — `reasoning.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](/capabilities/thinking) 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](/compatibility-matrix) for a full feature-by-feature list.

<Note>
  `abliterated-model-large` and `abliterated-model-large-v2` are text-only. Requests with image content are rejected with a `400` — send image inputs to `abliterated-model`. Video inputs are not supported by any model.
</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.