# OpenClaw

> Register Vikey as a custom provider in OpenClaw with openclaw onboard.

OpenClaw registers providers with `openclaw onboard`. Vikey is added as a **custom provider** with an API key.

## Steps

1. Install or update OpenClaw:

    ```bash
    npm install -g openclaw@latest
    ```

2. Register Vikey. Replace `YOUR_API_KEY` and the model as needed:

    ```bash
    openclaw onboard --non-interactive --accept-risk \
      --auth-choice custom-api-key \
      --custom-provider-id vikey \
      --custom-base-url "https://api.vikey.ai/v1" \
      --custom-model-id "vikey/agent-gpt" \
      --custom-api-key "YOUR_API_KEY" \
      --custom-compatibility openai-responses \
      --gateway-port 18789 \
      --skip-health
    ```

3. Start the OpenClaw gateway and select the model:

    ```bash
    openclaw gateway --port 18789 --verbose
    openclaw models set vikey/vikey/agent-gpt
    ```

### What each flag does

| Flag | Purpose |
| --- | --- |
| `--custom-provider-id vikey` | The provider name in OpenClaw. Models are called as `vikey/<model-id>`. |
| `--custom-base-url` | With `/v1`. |
| `--custom-model-id` | A Vikey model id, such as `vikey/agent-gpt` or `anthropic/claude-sonnet-5.5`. |
| `--custom-api-key` | Your Vikey API key. When omitted, OpenClaw reads the `CUSTOM_API_KEY` variable. |
| `--custom-compatibility` | The API format. Vikey supports `openai-responses`, `openai` (chat completions) and `anthropic`. |

**Check your OpenClaw version**

The `openai-responses` value exists from OpenClaw 2026.6 onwards. Older versions only know `openai` and `anthropic`, so use `--custom-compatibility openai` if the command above is rejected. Run `openclaw onboard --help` to see the flags your version supports.

## Common problems

| What you see | Cause | Fix |
| --- | --- | --- |
| `--custom-compatibility` rejected | An older OpenClaw | Update OpenClaw, or use the value `openai` |
| `401` | Wrong API key | Repeat step 2 with the right key |
| `Model '...' not found` | A typo in the model id | Copy the id from the [pricing page](https://vikey.ai/en/pricing) |

Source: https://docs.vikey.ai/en/agents/openclaw/
