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

# OpenClaw 接入 APIONE

> 为 OpenClaw 添加 APIONE 自定义模型提供商。

## 完成基础安装

先按照 [OpenClaw 官方文档](https://docs.openclaw.ai/) 安装并初始化 OpenClaw，确认网关能正常启动。准备支持工具调用的 APIONE 模型和 API Key。

## 合并提供商配置

备份 `~/.openclaw/openclaw.json`，将以下字段合并进现有配置。不要直接覆盖已有渠道、网关和授权设置。

```json theme={null}
{
  "models": {
    "mode": "merge",
    "providers": {
      "apione": {
        "baseUrl": "https://api.apione.ai/v1",
        "apiKey": "YOUR_APIONE_KEY",
        "api": "openai-completions",
        "models": [
          {"id": "YOUR_APIONE_MODEL_ID", "name": "APIONE model"}
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {"primary": "apione/YOUR_APIONE_MODEL_ID"}
    }
  }
}
```

替换密钥及两处模型占位符。apione/ 是 OpenClaw 的提供商前缀，不是 APIONE 模型名称的一部分。配置文件包含密钥，应限制文件访问且不要提交到仓库。上下文长度、输出上限及图片能力应以所选模型的真实参数为准。

## 应用并验证

```bash theme={null}
openclaw models list
openclaw gateway restart
openclaw gateway status
```

在模型列表中确认 APIONE 配置，再从已有聊天入口发起简单请求。模型返回成功后，再测试工具和消息渠道。

## Windows 本机操作

先在 PowerShell 确认安装版本和当前配置文件位置。

```powershell theme={null}
openclaw --version
openclaw config file
```

默认配置通常位于用户目录的 `.openclaw/openclaw.json`，以 `openclaw config file` 的实际输出为准。修改前备份该文件，再合并上方的 APIONE 提供商配置。

```powershell theme={null}
$openclawConfigPath = Join-Path $env:USERPROFILE ".openclaw/openclaw.json"
$openclawBackupPath = "$openclawConfigPath.backup-$(Get-Date -Format yyyyMMdd-HHmmss)"
Copy-Item -LiteralPath $openclawConfigPath -Destination $openclawBackupPath
```

若实际配置位于其他目录，请先将 `$openclawConfigPath` 改为该路径。保存后检查配置并查看模型。

```powershell theme={null}
openclaw config validate
openclaw models list
```

确认 APIONE 模型已列出后，再选择默认模型。将占位符替换为上方配置的实际模型 ID。

```powershell theme={null}
openclaw models set "apione/YOUR_APIONE_MODEL_ID"
openclaw gateway restart
openclaw gateway status
```

### 验证实际回复

在已有聊天入口发送“只回复 OK”，并在 APIONE 请求明细中核对模型和状态。需要从本机命令行验证时，可使用本地 Agent 调用。

```powershell theme={null}
openclaw agent --local --agent main --message "Reply only OK." --timeout 120
```

此命令会调用模型并产生相应用量。模型可见、网关运行和实际回复是三个检查点，应依次确认。若接口提示密钥过期但后台显示有效，按[鉴权排查](https://apione.ai/docs/support/faq.md)提供请求标识核查。

## 常见问题

配置没有生效时，确认修改的是网关运行用户的配置目录。普通对话可用但工具失败时，检查模型是否支持工具调用及参数兼容性。不要为了排查模型连接而关闭网关认证或放宽全部工具权限。

自定义提供商字段参见 [OpenClaw 官方说明](https://github.com/openclaw/openclaw/blob/main/docs/concepts/model-providers/custom-providers.md)。云服务器部署可继续阅读 [阿里云部署教程](https://apione.ai/docs/guides/openclaw-alibaba.md)。

***

[返回集成目录](https://apione.ai/docs/guides/clients.md) · [模型选择](https://apione.ai/docs/models/catalog.md) · [错误排查](https://apione.ai/docs/support/errors.md)


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