← 返回
沟通协作 Key 中文

xAI

Chat with Grok models via xAI API. Supports Grok-4, Grok-4.20, Grok-3, Grok-3-mini, vision, and real-time X search.
通过 xAI API 调用 Grok 模型。支持 Grok-4、Grok-4.20、Grok-3、Grok-3-mini、视觉功能及 X 实时搜索。
mvanhorn
沟通协作 clawhub v1.3.1 1 版本 99970.9 Key: 需要
★ 5
Stars
📥 3,331
下载
💾 305
安装
1
版本
#latest

概述

xAI / Grok

Chat with xAI's Grok models. Supports text and vision.

Setup

Set your API key in the skill config:

# Via openclaw config
openclaw config set skills.entries.xai.apiKey "xai-YOUR-KEY"

# Or environment variable
export XAI_API_KEY="xai-YOUR-KEY"

Get your API key at: https://console.x.ai

Commands

Chat with Grok

node {baseDir}/scripts/chat.js "What is the meaning of life?"

Use a specific model

node {baseDir}/scripts/chat.js --model grok-3-mini "Quick question: 2+2?"

Vision (analyze images)

node {baseDir}/scripts/chat.js --image /path/to/image.jpg "What's in this image?"

🔍 Search X/Twitter (Real-time!)

node {baseDir}/scripts/search-x.js "Remotion video framework"
node {baseDir}/scripts/search-x.js --days 7 "Claude AI tips"
node {baseDir}/scripts/search-x.js --handles @remotion_dev "updates"

Uses xAI Responses API with x_search tool for real X posts with citations.

List available models

node {baseDir}/scripts/models.js

Available Models

  • grok-3 - Most capable, best for complex tasks
  • grok-3-mini - Fast and efficient
  • grok-3-fast - Optimized for speed
  • grok-2-vision-1212 - Vision model for image understanding

Example Usage

User: "Ask Grok what it thinks about AI safety"

Action: Run chat.js with the prompt

User: "Use Grok to analyze this image" (with attached image)

Action: Run chat.js with --image flag

User: "What Grok models are available?"

Action: Run models.js

API Reference

xAI API Docs: https://docs.x.ai/api

Environment Variables

  • XAI_API_KEY - Your xAI API key (required)
  • XAI_MODEL - Default model (optional, defaults to grok-3)

版本历史

共 1 个版本

  • v1.3.1 当前
    2026-03-28 11:30 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Polymarket

mvanhorn
查询和交易 Polymarket 预测市场——查看赔率、热门市场、搜索事件、浏览订单簿、下单交易及管理持仓。
★ 22 📥 9,014
communication-collaboration

imap-smtp-email

gzlicanyi
使用IMAP/SMTP读取和发送邮件;检查新/未读邮件、获取内容、搜索邮箱、标记已读/未读、发送带附件的邮件。支持...
★ 114 📥 52,461
communication-collaboration

Himalaya

lamelas
{"answer":"通过IMAP/SMTP管理邮件的CLI。可在终端使用 `himalaya` 收发、回复、转发、搜索及整理邮件。支持多账户与MML(MIME元语言)编写邮件。"}
★ 68 📥 45,599