Docs

OpenAI-compatible API docs: base URL, Chat Completions, and Responses

OpenAI-compatible API docs for abliteration.ai. Change the SDK base URL, keep Chat Completions or Responses request shapes, use role/content messages and response_format, and migrate Python, Node, or framework clients.

Updated 2025-12-30

abliteration.ai exposes OpenAI-compatible /v1/chat/completions, /v1/responses, and /v1/models endpoints, so most OpenAI SDK clients work with a base URL change.

To migrate, set base_url or baseURL to https://api.abliteration.ai/v1, provide your abliteration.ai API key, and use abliterated-model.

Your messages array, role/content fields, streaming flags, tool definitions, and response_format settings stay familiar. The main differences are the base URL, API key, and model id.

Enterprise teams use this OpenAI-compatible surface for authorized AI red teaming, trust and safety research, synthetic evaluation data, ML behavior analysis, and governed defense/government contractor workflows.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.abliteration.ai/v1",
    api_key="YOUR_ABLIT_KEY",
)

resp = client.chat.completions.create(
    model="abliterated-model",
    messages=[{"role": "user", "content": "Say hello in one sentence."}],
)

print(resp.choices[0].message.content)

OpenAI-compatible endpoint map

Start here if you are comparing your current OpenAI API code to abliteration.ai.

Compatibility checklist

Use this checklist to switch providers in minutes.

Enterprise migration checks

For high-control workflows, verify governance before sending production traffic.

Request shape and common fields

The request and response mirror OpenAI Chat Completions, so you can reuse the same SDK helpers and typed schemas.

{
  "model": "abliterated-model",
  "messages": [
    { "role": "user", "content": "Summarize this in one sentence." }
  ],
  "temperature": 0.7,
  "max_tokens": 256,
  "stream": false
}

Structured JSON output

Structured output is available through response_format with type: "json_object".

The model will return a JSON object you can parse directly.

{
  "model": "abliterated-model",
  "messages": [
    { "role": "user", "content": "Return a JSON object with title and summary." }
  ],
  "response_format": { "type": "json_object" }
}

Function calling

Function calling uses the OpenAI-compatible functions and function_call fields.

Provide a JSON Schema in parameters and optionally force a call by name.

{
  "model": "abliterated-model",
  "messages": [
    { "role": "user", "content": "Schedule a meeting on 2026-02-03 at 15:00." }
  ],
  "functions": [
    {
      "name": "create_calendar_event",
      "description": "Create a calendar event from a natural language request",
      "parameters": {
        "type": "object",
        "properties": {
          "title": { "type": "string" },
          "date": { "type": "string" },
          "time": { "type": "string" }
        },
        "required": ["title", "date", "time"]
      }
    }
  ],
  "function_call": { "name": "create_calendar_event" }
}

Migration validation

Start with a small prompt, then compare latency and output quality before sending production traffic.