Skip to main content
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 resourcesWherever 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 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 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.

Install

Connect it to your resource

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:
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:
To switch models later without re-editing the file:

Verify

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.