Connect OpenClaw to OpenLLM Buddy

This guide shows how to point OpenClaw at your OpenAI-compatible endpoint so it can call gemma4:26b for chat completions.

Integration guide

What is OpenClaw?

OpenClaw is an agent framework that can talk to OpenAI-style APIs. When you deploy a model on OpenLLM Buddy, you get a base URL and an API key — plug those into OpenClaw and you can run agents on your own dedicated GPU instance.

Why connect OpenLLM Buddy to OpenClaw?

OpenLLM Buddy hosts open-source models behind an OpenAI-compatible API. That means OpenClaw can use your deployment as the LLM backend without any custom adapter.

You keep inference on your own endpoint with flat-rate packs, while OpenClaw handles tools, memory, orchestration, and agent loops.

What you can build

  • Tool-using agents — browse, call APIs, write structured outputs
  • Multi-step workflows — plan → act → verify loops
  • Internal copilots — connect your systems behind a private endpoint

How this guide is structured

Below, the Connection detailssection lists the endpoint and API key placeholders for this page's model. Next we'll add OpenClaw-specific steps and screenshots.

You'll fetch your real API key from the console after you deploy.

1

Install OpenClaw CLI

Install the OpenClaw CLI on your machine. Run these commands in your terminal (macOS/Linux) or Command Prompt / PowerShell (Windows). The official install scripts are linked from openclaw.ai.

macOS / Linux
bash
curl -fsSL https://openclaw.ai/install.sh | bash
Windows
powershell
powershell -c "irm https://openclaw.ai/install.ps1 | iex"

If you prefer, you can also follow the manual install instructions on the website. Once installed, come back here to connect OpenClaw to your OpenLLM Buddy deployment.

Next we’ll use your API key and your deployment base URL.

2

Run OpenClaw onboarding

Start the interactive onboarding wizard. It will ask a few setup questions and then prompt you for a model / auth provider.

Run in your terminal
bash
openclaw onboard
  1. When asked to continue about personal-by-default behavior, select Yes.
  2. For Setup mode, choose Manual setup.
  3. For What do you want to set up?, choose Local gateway (this machine).
  4. For Workspace directory, you can keep the default (example: ~/.openclaw/workspace).
  5. For Model/auth provider, choose Custom Provider.

Next we’ll paste your OpenLLM Buddy API Base URL. (We’ll keep the rest of the wizard consistent with OpenClaw’s prompts so the steps are easy to follow.)

3

Set API Base URL (OpenLLM Buddy)

In the onboarding wizard, set API Base URL to your OpenLLM Buddy base URL (ending in /v1).

Recommended
text
https://openllmbuddy-proxy.botbuddytech.workers.dev/v1

Important: do not paste the full chat-completions URL here. If you set API Base URL to /v1/chat/completions, OpenClaw often fails verification with status 404 and asks you to change the base URL.

Wrong (causes 404)
text
https://openllmbuddy-proxy.botbuddytech.workers.dev/v1/chat/completions
4

Provide your API key

When OpenClaw asks How do you want to provide this API key?, choose Paste API key now.

Then paste your OpenLLM Buddy API key into API Key. You can create and manage keys in the console. Keep it secret — treat it like a password.

If you’re testing locally, you can store it in an environment variable and paste when prompted. Avoid committing keys to git or sharing them in screenshots.

Note: the API key is sent as an Authorization: Bearer ... header.

5

Choose endpoint compatibility

For Endpoint compatibility, select OpenAI-compatible.

OpenLLM Buddy exposes an OpenAI-compatible Chat Completions API at /v1/chat/completions, so OpenClaw can use it without a custom adapter.

6

Set the Model ID

When OpenClaw asks for Model ID, paste the model identifier for your deployment.

This value depends on which model you chose on OpenLLM Buddy. For example:

  • Gemma 4 26B → gemma4:26b
  • Qwen 3.6 27B → qwen3.6:27b

For this page (based on your selected model), use gemma4:26b.

This value is what OpenClaw will send as the model field in /v1/chat/completions requests.

7

Verification + Endpoint ID

After you paste the API key, OpenClaw should validate the connection and show Verification successful.

If you see Verification failed: status 404, choose Change base URL and set the API Base URL to https://openllmbuddy-proxy.botbuddytech.workers.dev/v1 (no /chat/completions).

Next it will prompt for an Endpoint ID. This is just a local identifier OpenClaw uses to refer to this provider configuration.

Example Endpoint ID
text
custom-openllmbuddy-proxy-botbuddytech-workers-dev

Pick something descriptive and stable (lowercase + dashes works well). For example, include openllmbuddy and whether you’re using a proxy.

8

Gateway settings

After the custom provider is configured, OpenClaw asks how to run the local gateway. Use these selections (recommended defaults):

  1. Gateway port: 18789 (or keep whatever OpenClaw suggests)
  2. Gateway bind address: Loopback (127.0.0.1)
  3. Gateway access protection: Token (recommended)
  4. Tailscale exposure: Off (unless you explicitly want LAN/VPN access)
  5. Gateway token: choose Generate/store plaintext token, then leave blank to auto-generate

This keeps your gateway reachable only on your machine and protects it with a token for the Control UI.

9

Finish setup + open Control UI

You can skip the optional parts during onboarding and get to a working gateway fast:

  1. Set up a chat channel now?No
  2. Web searchSkip for now
  3. Configure skills now?No
  4. Install optional pluginsSkip for now
  5. Enable hooks?Skip for now
  6. Install Gateway service (recommended)Yes (runtime: Node)
  7. How do you want to hatch your agent?Hatch in Terminal (recommended)

Once the gateway is installed, OpenClaw prints your Control UI URL (usually http://127.0.0.1:18789/) plus a tokenized dashboard link.

View the gateway token
bash
openclaw config get gateway.auth.token
Generate a new gateway token
bash
openclaw doctor --generate-gateway-token
Open the dashboard (no browser)
bash
openclaw dashboard --no-open
10

Connection details

You need a chat-completions URL (where OpenClaw sends requests) and an API key (sent as a Bearer token). This walkthrough uses placeholder names YOUR_ENDPOINT and YOUR_API_KEY — substitute your real values from the console when you go live.

The endpoint must be the full path to /v1/chat/completions, not just the host. OpenLLM Buddy speaks the OpenAI Chat Completions JSON format, so OpenClaw can connect directly.

YOUR_ENDPOINT
https://YOUR_ENDPOINT/v1/chat/completions
YOUR_API_KEY
YOUR_API_KEY

Keep your API key secret — don’t commit it to git or paste it into public configs. Use OpenClaw’s secret storage or environment variables when possible.