# OpenClaw

Source: [https://docs.aventail.co.uk/docs/integration/openclaw](https://docs.aventail.co.uk/docs/integration/openclaw)

[Install OpenClaw](https://docs.openclaw.ai/install) and leave your Link model serving. Test its API from the machine or container running the OpenClaw gateway.

### Connect OpenClaw to Link

Current Control captures and the original OpenClaw screenshots. Use your own model ID and port.

1.  **Start serving**
    
    Deploy a language model to your registered device, then start serving on an available port. Keep Link running.
    
    The completed deployment dialog is shown here. Existing deployments appear in Serving.
    
    [Screenshot: Completed deployment dialog — close-up from Deployment in Control.](https://docs.aventail.co.uk/img/guides/context/deployment-complete.png)
    
2.  **Find the endpoint**
    
    Open Serving → API Usage in Control. On the Link machine, the walkthrough uses http://127.0.0.1:8100/v1.
    
    [Screenshot: API Usage panel showing local endpoint and request information for a served model.](https://docs.aventail.co.uk/img/control/onboarding/local-api.png)
    
3.  **Open the configuration**
    
    Open ~/.openclaw/openclaw.json in your editor, or your configured alternative path. Keep your existing settings when adding the provider.
    
    [Screenshot: OpenClaw configuration folder with openclaw.json selected in the editor.](https://docs.aventail.co.uk/img/openclaw_1.png)
    
4.  **Configure the provider**
    
    Add your provider under models.providers. Set baseUrl, the API adapter and the model catalogue using the JSON below.
    
    The original example uses local-llamacpp and port 8200; use your tested provider, model and port.
    
    [Screenshot: OpenClaw JSON provider with baseUrl, the openai-completions adapter and a model catalogue.](https://docs.aventail.co.uk/img/openclaw_3.png)
    
5.  **Open the setup wizard**
    
    Run openclaw onboard in your terminal, then follow its model-selection prompts. If you already configured OpenClaw, review the existing connection.
    
    The original capture shows the CLI wizard; the prompts depend on your OpenClaw version.
    
    [Screenshot: Terminal showing the openclaw onboard command.](https://docs.aventail.co.uk/img/openclaw_4.png)
    
6.  **Select the model**
    
    Apply the configuration and choose the model from your local provider. This example shows the onboarding model picker.
    
    [Screenshot: OpenClaw onboarding model selection showing the configured local provider and model.](https://docs.aventail.co.uk/img/openclaw_5.png)
    
7.  **Check the reply**
    
    Send a short message and inspect the response. Test chat before enabling tools or automation.
    
    Slack is shown in this example; channel setup is separate from connecting the model.
    
    [Screenshot: An OpenClaw bot reply in Slack containing a FastAPI example.](https://docs.aventail.co.uk/img/openclaw_6.png)
    

**Read the OpenClaw setup and copy JSON**

[Start serving and test the API](https://docs.aventail.co.uk/docs/getting-started/run-first-interface) on the machine running OpenClaw's gateway.

## How the connection works

```mermaid
flowchart TB
  A["OpenClaw gateway"] -->|"OpenAI-compatible request"| B["Link endpoint"]
  B --> C["Model on your device"]
  C -->|"Response"| A
```

## Add the provider

Open `~/.openclaw/openclaw.json`, or your configured alternative path. Merge this fragment into the existing configuration and replace the port and model ID with your tested values. See [OpenClaw's configuration guide](https://docs.openclaw.ai/gateway/configuration) for other ways to edit it.

```json
{
  "models": {
    "mode": "merge",
    "providers": {
      "aventail": {
        "baseUrl": "http://127.0.0.1:8100/v1",
        "api": "openai-completions",
        "apiKey": "aventail-local",
        "models": [
          {
            "id": "Gemma 4 (X-Small)",
            "name": "Aventail Gemma"
          }
        ]
      }
    }
  }
}
```

The provider uses `baseUrl`, an API adapter and a model catalogue, as described in [OpenClaw's custom-provider reference](https://docs.openclaw.ai/gateway/config-tools/custom-providers). The example credential is a placeholder for the tested unauthenticated local endpoint; it is not your Control API key.

## Select and test the model

Open the interactive setup wizard:

```bash
openclaw onboard
```

Follow the model-selection prompts and choose your local provider's model, `aventail/Gemma 4 (X-Small)` in this example. The screenshots show an earlier CLI wizard; follow the [onboarding reference](https://docs.openclaw.ai/cli/onboard) for your installed version. If you already configured OpenClaw, review its existing connection instead of starting a new configuration.

Send a short chat message and check the answer. The screenshot shows Slack; connecting a messaging channel is a separate step covered by [OpenClaw's channel guides](https://docs.openclaw.ai/channels).

The gateway makes the request. If it runs in a container or on another host, change the address to one it can reach; `127.0.0.1` refers to the gateway's own environment.

A successful chat does not establish tool calling, structured output or long-context support. Test those capabilities with the chosen model before enabling an agent workflow. For connection problems, repeat the [API test](https://docs.aventail.co.uk/docs/getting-started/run-first-interface) from the gateway's environment.
