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

# OpenClaw

> Connect OpenClaw to a Pangolin AI Gateway resource

[OpenClaw](https://openclaw.ai) is an open-source agent gateway that can run against any OpenAI- or Anthropic-compatible endpoint. Point it at an AI Gateway resource with a matching provider attached - OpenAI-compatible (OpenAI, OpenRouter, Vercel AI Gateway, Microsoft Foundry, custom) or Anthropic-compatible (Anthropic, Bedrock, Vertex AI, custom). See [AI Gateway Overview](/manage/ai/overview) if you haven't set that up yet.

You'll need the resource's URL (its `<endpoint>`) and its API key (`<key>`), both on the resource's Keys page, plus the name of a model your attached provider actually serves (e.g. `gpt-4o`, `claude-sonnet-4-6`) - that's `<model-id>` below.

<Note>
  **Public vs. private resources**

  Wherever these instructions show `<key>`, what you put there depends on the resource type:

  * **Public resource** - reachable from anywhere, so the gateway checks a [virtual API key](/manage/ai/virtual-api-keys). Copy it from the resource URL after login, the Resource Launcher more-info panel, or `https://app.pangolin.net/<org-id>/keys` (use your self-hosted dashboard URL in place of `app.pangolin.net` if you self-host).
  * **Private resource** - only reachable from devices connected to your Pangolin network, so no key is checked. You must have the [Pangolin client](/manage/clients/install-client) installed and connected. Use the literal string `none` as the key.

  Don't delete the key field for private resources. Most clients refuse to start without *some* key set, so they need an inert placeholder rather than a missing one.
</Note>

## Install

```bash theme={"theme":"gruvbox-light-hard"}
# macOS/Linux
curl -fsSL https://openclaw.ai/install.sh | bash

# Windows PowerShell
iwr -useb https://openclaw.ai/install.ps1 | iex
```

## Connect it to your resource

```bash theme={"theme":"gruvbox-light-hard"}
openclaw onboard --non-interactive --accept-risk \
  --auth-choice custom-api-key \
  --custom-base-url "<endpoint>/v1" \
  --custom-model-id "<model-id>" \
  --custom-api-key "<key>" \
  --custom-compatibility openai \
  --install-daemon --skip-channels --skip-skills
```

Set `--custom-compatibility anthropic` instead of `openai` if the resource's provider is Anthropic/Bedrock/Vertex rather than OpenAI-compatible, and drop `--custom-base-url`'s trailing `/v1` in that case (Anthropic-style resources are addressed at the endpoint root).

Prefer the interactive wizard instead:

```bash theme={"theme":"gruvbox-light-hard"}
openclaw onboard --install-daemon
```

When prompted, choose **QuickStart or Manual mode**, select the custom/OpenAI-compatible provider option, and enter the base URL and key.

## Manual setup

Onboarding writes `~/.openclaw/openclaw.json`. You can edit it directly instead - changes reload automatically:

```json theme={"theme":"gruvbox-light-hard"}
{
    "models": {
        "providers": {
            "pangolin": {
                "baseUrl": "<endpoint>/v1",
                "apiKey": "<key>",
                "api": "openai-completions",
                "models": [
                    {
                        "id": "<model-id>",
                        "name": "<model-id> via Pangolin"
                    }
                ]
            }
        }
    },
    "agents": {
        "defaults": {
            "model": { "primary": "pangolin/<model-id>" }
        }
    }
}
```

To switch models later without re-editing the file:

```bash theme={"theme":"gruvbox-light-hard"}
openclaw models set pangolin/<model-id>
```

## Verify

```bash theme={"theme":"gruvbox-light-hard"}
openclaw health
openclaw models status
openclaw agent --agent main -m "Hello, what model are you?"
```

For a private resource, keep `--custom-api-key`/`apiKey` and set it to `none`, and make sure the Pangolin client is connected on whichever machine runs the OpenClaw daemon.
