DocsIntegrations

Using OpenClaw with abliteration.ai

Use abliteration.ai as a custom Anthropic-compatible provider in OpenClaw. Add a models.providers entry, set baseUrl and apiKey, select abliterated-model.

This guide shows how to use OpenClaw with abliteration.ai as a custom Anthropic-compatible model provider. OpenClaw is an open-source personal AI assistant that runs on macOS, Linux, and Windows (via WSL2). Its model layer reads custom provider definitions from ~/.openclaw/openclaw.json, so you can point its agent at any Anthropic- or OpenAI-compatible gateway.

abliteration.ai exposes the Anthropic Messages surface at /v1/messages and /v1/messages/count_tokens, which matches OpenClaw's anthropic-messages adapter one-for-one. Setup is entirely declarative: add one provider block under models.providers, register abliterated-model in its catalog, and set agents.defaults.model.primary.

Use openclaw onboard for guided setup, or edit ~/.openclaw/openclaw.json (JSON5) directly using the provider block below.

Updated Apr 16, 2026Integrations

Quick start

Base URL
Example request
// ~/.openclaw/openclaw.json
{
  models: {
    mode: "merge",
    providers: {
      abliteration: {
        baseUrl: "https://api.abliteration.ai/v1",
        apiKey: "${ABLITERATION_API_KEY}",
        api: "anthropic-messages",
        models: [
          {
            id: "abliterated-model",
            name: "Abliterated Model",
            reasoning: false,
            input: ["text"],
            contextWindow: 128000,
            maxTokens: 8192,
            cost: {
              input: 0.005,
              output: 0.005,
            },
          },
        ],
      },
    },
  },
  agents: {
    defaults: {
      model: {
        primary: "abliteration/abliterated-model",
      },
    },
  },
}

Service notes

Prerequisites

#

Provider settings

#
SettingValuePurpose
models.providers.abliteration.baseUrlhttps://api.abliteration.ai/v1Targets the public abliteration.ai API under /v1. OpenClaw appends /messages and /messages/count_tokens.
models.providers.abliteration.apiKey${ABLITERATION_API_KEY}Sends your ak_ API key as the bearer token. The ${VAR} syntax reads the value from your shell at runtime.
models.providers.abliteration.apianthropic-messagesTells OpenClaw to speak the Anthropic Messages protocol to this provider.
models.providers.abliteration.models[].idabliterated-modelThe model id published by abliteration.ai. Must match exactly.
models.modemergeKeeps OpenClaw's built-in providers available alongside your custom provider. Use replace if you want to expose only abliteration.ai.
agents.defaults.model.primaryabliteration/abliterated-modelSelects abliteration.ai as the default model for new agent runs.

Configure openclaw.json

#
Configure openclaw.json
# Put this in ~/.bashrc, ~/.zshrc, or ~/.profile
export ABLITERATION_API_KEY="ak_YOUR_API_KEY"

# Reload your shell
source ~/.zshrc   # or source ~/.bashrc

# Open the config in your editor
${EDITOR:-vi} ~/.openclaw/openclaw.json

Provider block

#
Provider block
{
  models: {
    mode: "merge",
    providers: {
      abliteration: {
        baseUrl: "https://api.abliteration.ai/v1",
        apiKey: "${ABLITERATION_API_KEY}",
        api: "anthropic-messages",
        models: [
          {
            id: "abliterated-model",
            name: "Abliterated Model",
            reasoning: false,
            input: ["text"],
            contextWindow: 128000,
            maxTokens: 8192,
            cost: {
              input: 0.005,
              output: 0.005,
            },
          },
        ],
      },
    },
  },
  agents: {
    defaults: {
      model: {
        primary: "abliteration/abliterated-model",
        fallbacks: [],
      },
    },
  },
}

Validate the config

#
Validate the config
# Print the schema OpenClaw uses to validate the config
openclaw config schema | less

# Show the resolved (merged) config that OpenClaw will use
openclaw config show

# Quick connectivity test against /v1/messages
curl -s https://api.abliteration.ai/v1/messages \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ABLITERATION_API_KEY" \
  -d '{
    "model": "abliterated-model",
    "max_tokens": 64,
    "messages": [{"role": "user", "content": "ping"}]
  }' | python3 -m json.tool

Run the agent

#
Run the agent
# List available agents (main is the reserved default id)
openclaw agents list

# Send a one-off message to the default agent using the primary model
openclaw agent --agent main --message "summarize this directory"

# Raise the reasoning effort for a single run
openclaw agent --agent main --thinking high --message "refactor foo.py for readability"

# Emit structured JSON instead of the default formatted output
openclaw agent --agent main --json --message "list the files in this repo"

# Bypass the gateway and run the embedded agent directly
openclaw agent --agent main --local --message "ping"

How it works

#

Alternative: OpenAI-compatible wire format

#
Alternative: OpenAI-compatible wire format
{
  models: {
    mode: "merge",
    providers: {
      "abliteration-openai": {
        baseUrl: "https://api.abliteration.ai/v1",
        apiKey: "${ABLITERATION_API_KEY}",
        api: "openai-completions",
        models: [
          {
            id: "abliterated-model",
            name: "Abliterated Model (OpenAI wire)",
            input: ["text"],
            contextWindow: 128000,
            maxTokens: 8192,
            cost: { input: 0.005, output: 0.005 },
          },
        ],
      },
    },
  },
  agents: {
    defaults: {
      model: {
        primary: "abliteration-openai/abliterated-model",
      },
    },
  },
}

Troubleshooting

#

Common errors & fixes