🎯 一句话:X Premium 用户不烧 API 直接调 Grok-4.3 跑 Agent——文生视频、图生视频、X Search 随便用。


📌 核心信息

2026 年 5 月 20 日,xAI 开放 Grok OAuth 接入 OpenClaw。X Premium 用户不用单独买 API Key,订阅配额直接当 API 用。

项目说明
触发xAI 开放 OAuth 通道
条件X Premium / Premium+
模型Grok-4.3 / Grok-3-fast / Grok-code
费用0(走订阅配额,不烧 API)
接入工具OpenClaw

Grok 接入 OpenClaw 公告图


🔥 三大核心玩法

1️⃣ X Premium 配额不浪费

每月 X 订阅费原本只够网页聊天,接进 OpenClaw 后配额跑 Agent 任务,不用额外掏 xAI API 费。

2️⃣ 直接调用 Grok 生成视频

文生视频、图生视频都行,最多 7 张参考图。Agent 里一句话搞定,不用切网页。

3️⃣ X Search 不要 API Key

跟 Agent 说「搜过去 24 小时 OpenClaw 中文讨论」直接出结果。走 OAuth 配额,不消耗 API 余额。

实战:OpenClaw Cron 每小时让 Grok 扫目标账号,新动态推手机。不刷屏稳。

X Search 实战演示


⚙️ 完整接入教程

前置条件

步骤

1. 环境检查

node -v
npm -v

未装 Node.js:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
source ~/.zshrc

2. 安装 OpenClaw

curl -fsSL https://openclaw.ai/install.sh | bash
openclaw --version

安装 OpenClaw

3. 初始化 + xAI 授权

openclaw setup
openclaw configure
选项选择
Gateway 运行位置Local
配置内容Model
模型提供商xAI (Grok)
认证方式xAI OAuth

按提示完成 X 账号授权。

OAuth 授权流程

4. 设置 Grok 默认模型

openclaw models list --all | grep '^xai/'
openclaw models set xai/grok-4.3
openclaw models status --probe

验证输出:xai:你的账号 = OAuth

设置默认模型

5. 启动 Gateway

openclaw gateway install
openclaw gateway start
# 或临时跑:openclaw gateway

看到 gateway ready 即为成功。

6. 打开控制台

浏览器访问 http://127.0.0.1:18789/

需 token:

open "http://127.0.0.1:18789/?token=$(openclaw config get gateway.auth.token)"

控制台界面

7. 设置 Gateway Token(可选)

openclaw config set gateway.auth.mode token
openclaw config set gateway.auth.token "your-token-here"
openclaw config set gateway.remote.url "ws://127.0.0.1:18789"
openclaw config set gateway.remote.token "$(openclaw config get gateway.auth.token)"
openclaw gateway stop && openclaw gateway start

Token 设置

8. 批准设备

openclaw devices list
openclaw devices approve 请求ID

scope upgrade 同理。

9. 验证

openclaw agent --agent main --message "只回复 OK" --timeout 120

返回 OK 即通。

验证连接


✅ 跑通标志

检查项期望值
openclaw models statusxai:你的X账号 = OAuth
默认模型xai/grok-4.3
Gateway 状态probe: ok,write-capable
openclaw gateway status
openclaw models status --probe
openclaw models auth list
openclaw doctor

验证通过


💡 进阶玩法

  • Cron 监控:定时搜目标账号,新动态自动推
  • 文生视频:Agent 直接调 Grok 出视频
  • 图生视频:多图参考,最多 7 张
  • X 搜索:搜推文、搜讨论,走配额不烧 API

Grok 文生视频效果


❓ FAQ

Q:Premium 和 Premium+ 差别? A:普通 Premium 够用基础 Grok 模型。Premium+ 解锁高阶能力,视频生成更快。

Q:速率限制? A:约 40-50 次/2 小时,峰值期容易打满。建议搭配本地模型分流。

Q:能同时用其他 Agent? A:可以,各 Agent 独立 OAuth 授权,互不冲突。


⚠️ OAuth 授权走 X Premium 配额,调用次数受订阅等级限制。先确认级别再大规模用。

HOUKE