OneProvider

OpenClaw

在 OpenClaw 的配置文件中,把 OneProvider 添加为自定义的 anthropic-messages 服务商。重启后客户端会自动把它加入模型列表。

在 OpenClaw 的配置中把 OneProvider 添加为自定义的 Anthropic-messages 服务商。客户端重启时会自动把该服务商合并进它的模型目录。

全部模型、功能与价格 面向 AI 智能体的文档索引: https://oneprovider.dev/docs/llms.txt 开始之前:从个人中心获取密钥 打开您的个人中心:Telegram 机器人 @oneprovider_robot (“个人中心”)或 app.oneprovider.dev 。点击“签发密钥”,为它命名(例如此客户端的名称)并设置消费限额,然后复制密钥。充值也在同一个地方进行。详细了解个人中心与密钥 。

配置

默认配置路径:~/.config/openclaw/openclaw.json。如果文件不存在,请先创建,粘贴下面的代码片段,然后重启 OpenClaw。

json
{
"models": {
"mode": "merge",
"providers": {
"oneprovider": {
"baseUrl": "https://api.oneprovider.dev",
"apiKey": "sk-your-key-here",
"api": "anthropic-messages",
"models": [
{
"id": "claude-fable-5",
"name": "Claude Fable 5",
"api": "anthropic-messages",
"input": [
"text",
"image"
],
"cost": {
"input": 10,
"output": 50,
"cacheRead": 1,
"cacheWrite": 12.5
},
"contextWindow": 1000000
},
{
"id": "claude-haiku-4-5",
"name": "Claude Haiku 4.5",
"api": "anthropic-messages",
"input": [
"text",
"image"
],
"cost": {
"input": 1,
"output": 5,
"cacheRead": 0.1,
"cacheWrite": 1.25
},
"contextWindow": 200000,
"maxTokens": 64000
},
{
"id": "claude-haiku-4-5-20251001",
"name": "Claude Haiku 4.5 20251001",
"api": "anthropic-messages",
"input": [
"text",
"image"
],
"cost": {
"input": 1,
"output": 5,
"cacheRead": 0.1,
"cacheWrite": 1.25
},
"contextWindow": 200000,
"maxTokens": 64000
},
{
"id": "claude-haiku-4-5-20251001-thinking",
"name": "Claude Haiku 4.5 20251001 Thinking",
"api": "anthropic-messages",
"input": [
"text",
"image"
],
"cost": {
"input": 1,
"output": 5,
"cacheRead": 0.1,
"cacheWrite": 1.25
}
},
{
"id": "claude-haiku-4-5-thinking",
"name": "Claude Haiku 4.5 Thinking",
"api": "anthropic-messages",
"input": [
"text",
"image"
],
"cost": {
"input": 1,
"output": 5,
"cacheRead": 0.1,
"cacheWrite": 1.25
}
},
{
"id": "claude-opus-4-6",
"name": "Claude Opus 4.6",
"api": "anthropic-messages",
"input": [
"text",
"image"
],
"cost": {
"input": 5,
"output": 25,
"cacheRead": 0.5,
"cacheWrite": 6.25
},
"contextWindow": 1000000,
"maxTokens": 128000
},
{
"id": "claude-opus-4-7",
"name": "Claude Opus 4.7",
"api": "anthropic-messages",
"input": [
"text",
"image"
],
"cost": {
"input": 5,
"output": 25,
"cacheRead": 0.5,
"cacheWrite": 6.25
},
"contextWindow": 1000000,
"maxTokens": 128000
},
{
"id": "claude-opus-4-8",
"name": "Claude Opus 4.8",
"api": "anthropic-messages",
"input": [
"text",
"image"
],
"cost": {
"input": 5,
"output": 25,
"cacheRead": 0.5,
"cacheWrite": 6.25
},
"contextWindow": 1000000,
"maxTokens": 128000
},
{
"id": "claude-opus-5",
"name": "Claude Opus 5",
"api": "anthropic-messages",
"input": [
"text",
"image"
],
"cost": {
"input": 5,
"output": 25,
"cacheRead": 0.5,
"cacheWrite": 6.25
},
"contextWindow": 1000000,
"maxTokens": 128000
},
{
"id": "claude-opus-5-5",
"name": "Claude Opus 5.5",
"api": "anthropic-messages",
"input": [
"text",
"image"
],
"cost": {
"input": 4,
"output": 20,
"cacheRead": 0.2,
"cacheWrite": 5
},
"contextWindow": 1000000,
"maxTokens": 128000
},
{
"id": "claude-sonnet-5-5",
"name": "Claude Sonnet 5.5",
"api": "anthropic-messages",
"input": [
"text",
"image"
],
"cost": {
"input": 2,
"output": 10,
"cacheRead": 0.1,
"cacheWrite": 2.5
},
"contextWindow": 1000000
},
{
"id": "claude-haiku-5-5",
"name": "Claude Haiku 5.5",
"api": "anthropic-messages",
"input": [
"text",
"image"
],
"cost": {
"input": 0.1,
"output": 0.5,
"cacheRead": 0.01,
"cacheWrite": 0.125
},
"contextWindow": 1000000,
"maxTokens": 128000
},
{
"id": "claude-opus-5-thinking",
"name": "Claude Opus 5 Thinking",
"api": "anthropic-messages",
"input": [
"text",
"image"
],
"cost": {
"input": 5,
"output": 25,
"cacheRead": 0.5,
"cacheWrite": 6.25
}
},
{
"id": "claude-sonnet-4-6",
"name": "Claude Sonnet 4.6",
"api": "anthropic-messages",
"input": [
"text",
"image"
],
"cost": {
"input": 3,
"output": 15,
"cacheRead": 0.3,
"cacheWrite": 3.75
},
"contextWindow": 1000000,
"maxTokens": 64000
},
{
"id": "claude-sonnet-5",
"name": "Claude Sonnet 5",
"api": "anthropic-messages",
"input": [
"text",
"image"
],
"cost": {
"input": 2,
"output": 10,
"cacheRead": 0.2,
"cacheWrite": 2.5
},
"contextWindow": 1000000
},
{
"id": "claude-sonnet-5-thinking",
"name": "Claude Sonnet 5 Thinking",
"api": "anthropic-messages",
"input": [
"text",
"image"
],
"cost": {
"input": 2,
"output": 10,
"cacheRead": 0.2,
"cacheWrite": 2.5
},
"contextWindow": 1000000
},
{
"id": "claude-fable-5-1",
"name": "Claude Fable 5.1",
"api": "anthropic-messages",
"input": [
"text",
"image"
],
"cost": {
"input": 10,
"output": 50,
"cacheRead": 0.25,
"cacheWrite": 12.5
},
"contextWindow": 1000000
}
]
}
}
}
}

mode: "merge" 会让 OpenClaw 内置的服务商与 OneProvider 并存——如果您只想通过我们使用 Claude,请改为 "replace"。

配置中的成本设为零 OpenClaw 需要为每个模型提供 cost 块才能渲染界面,但实际扣费在我们这一侧完成;实际从您余额中扣除的金额,请看费率 。

快速解答

该使用哪个 base URL?

Claude Code 和 Anthropic SDK 使用 https://api.oneprovider.dev。OpenAI SDK 和兼容 OpenAI 的客户端使用 https://api.oneprovider.dev/v1。同一个密钥可用于这两个地址;模型列表见模型页面 ,费率见价格页面 。

如何进行身份验证?

将完整的 sk-… 密钥放在 x-api-key 或 Authorization: Bearer 中,二选一,不要同时使用。请把密钥存放在环境变量中,不要写进会被提交的文件。了解更多身份验证说明 。

在哪里获取密钥?

在 Telegram 机器人 @oneprovider_robot 或 app.oneprovider.dev 打开您的个人中心,为余额充值,然后点击“签发密钥”。每个密钥都可以设置各自的消费限额。个人中心与 API 密钥 。

401、404 和 429 是什么意思?

401:密钥缺失、拼写有误或放错了请求头;请粘贴完整的密钥,不要带引号或空格。404:通常是 base URL 不对,例如缺少或重复了 /v1。429 且提示“Insufficient balance”:个人中心余额或密钥的消费限额已用完,请充值,不要反复重试;其他 429 属于速率限制,请等待 Retry-After 指定的时间。详情见:错误码 和故障排查 。

流式输出为什么会中断或被重置?

VPN 和 VLESS 代理常常会缓冲 SSE,或破坏 HTTP/2 协商。OneProvider 没有地区限制,也不会缓冲流式输出,请关闭代理后重试。

以上都没解决,该去哪里咨询?

请在 Telegram 联系 @Oneproviderhelpbot ,或在网页个人中心打开“客服”,并附上 HTTP 状态码和完整的错误信息。客服如何运作 。

最后更新: 2026-11-08 发现问题? @Oneproviderhelpbot