OpenClaw
Connect OpenClaw to a Pangolin AI Gateway resource
OpenClaw 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 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.
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. 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 ofapp.pangolin.netif 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 installed and connected. Use the literal string
noneas 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.
Install
# macOS/Linux
curl -fsSL https://openclaw.ai/install.sh | bash
# Windows PowerShell
iwr -useb https://openclaw.ai/install.ps1 | iexConnect it to your resource
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-skillsSet --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:
openclaw onboard --install-daemonWhen 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:
{
"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:
openclaw models set pangolin/<model-id>Verify
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.
Was this page helpful?

