> ## Documentation Index
> Fetch the complete documentation index at: https://docs.viviai.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenClaw

> Connect OpenClaw to ViVi-API.

Have an API key from the [ViVi-API dashboard](https://api.viviai.cc/dashboard) ready, and confirm that its group supports your chosen model. Back up any existing configuration before merging the fields below.

## 1. Locate the configuration file

| Operating system | Default path |
| - | - |
| Windows | `C:\Users\<username>\.openclaw\openclaw.json` |
| macOS | `/Users/<username>/.openclaw/openclaw.json` |
| Linux | `/home/<username>/.openclaw/openclaw.json` |

If you configured a custom directory, use that location instead.

## 2. Add the ViVi-API provider

This example uses the **OpenAI-compatible Chat Completions protocol**. Replace `apiKey` with your key and keep only the models your group can access.

```json openclaw.json theme={null}
{
  "agents": {
    "defaults": {
      "model": {
        "primary": "viviai/gemini-3-flash-preview"
      }
    }
  },
  "models": {
    "providers": {
      "viviai": {
        "baseUrl": "https://api.viviai.cc/v1",
        "apiKey": "sk-your-api-key",
        "api": "openai-completions",
        "models": [
          { "id": "gemini-3-flash-preview", "name": "Gemini 3 Flash" },
          { "id": "gemini-3.1-pro-preview", "name": "Gemini 3.1 Pro" },
          { "id": "gpt-4o", "name": "GPT-4o" },
          { "id": "claude-sonnet-4-6", "name": "Claude Sonnet 4.6" }
        ]
      }
    }
  }
}
```

You can configure multiple models under one provider if they all support the selected protocol. To switch models in chat, use the full model reference:

```text theme={null}
/model viviai/gemini-3.1-pro-preview
```

## 3. Understand the settings

| Field | Description |
| - | - |
| `agents.defaults.model.primary` | Default model, in `provider-ID/model-ID` format. |
| `baseUrl` | Provider base URL, matched to the `api` protocol. |
| `apiKey` | Your ViVi-API token key. |
| `api` | Request protocol, listed below. |
| `id` | Exact model ID used in requests. |
| `name` | Display name; you can customize it. |

| Protocol | `api` | `baseUrl` |
| - | - | - |
| OpenAI compatible | `openai-completions` | `https://api.viviai.cc/v1` |
| Gemini native | `google-generative-ai` | `https://api.viviai.cc/v1beta` |
| Anthropic native | `anthropic-messages` | `https://api.viviai.cc` |

> [!TIP]
>
> A Gemini model does not necessarily require the native Gemini protocol. The complete example above uses OpenAI compatibility, so its URL ends in `/v1`. For a native protocol, add a separate provider and update `api`, `baseUrl`, and the default model reference together.

## 4. Restart the Gateway

Save the configuration, then run:

```bash theme={null}
openclaw gateway restart
```

Send a short test message after restarting, then switch models as needed.

See the [Integration overview](https://docs.viviai.cc/en/scenarios.md) and [FAQ](https://docs.viviai.cc/en/faq.md) for more help.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.