← 返回
AI智能 Key

xAI / Grok

Chat with Grok models via xAI API. Supports Grok-3, Grok-3-mini, vision, and more.
通过 xAI API 与 Grok 模型对话。支持 Grok-3、Grok-3-mini、视觉等功能。
blueberrywoodsym
AI智能 clawhub v1.0.2 1 版本 95430.5 Key: 需要
★ 16
Stars
📥 17,745
下载
💾 4,427
安装
1
版本
#latest

概述

xAI / Grok

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

Setup

INSTALLATION AND USE INSTRUCTIONS

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)

Security & Permissions

What this skill does:

  • Sends chat prompts to xAI's API at api.x.ai
  • Vision mode sends images to xAI for analysis
  • scripts/models.js lists available models (read-only)

What this skill does NOT do:

  • Does not read arbitrary local files — --image only accepts files with image extensions (.jpg, .jpeg, .png, .gif, .webp)
  • Does not read config files or access the filesystem beyond the specified image path
  • Does not store conversation history or logs
  • Does not send credentials to any endpoint other than api.x.ai
  • Cannot be invoked autonomously by the agent (disable-model-invocation: true)

Bundled scripts: scripts/chat.js (chat), scripts/models.js (list models), scripts/search-x.js (X search)

Review scripts before first use to verify behavior.

版本历史

共 1 个版本

  • v1.0.2 当前
    2026-03-27 23:19 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 709 📥 243,449
ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误和纠正,以实现持续改进。使用时机:(1)命令或操作意外失败;(2)用户纠正……
★ 4,055 📥 795,189
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,349 📥 317,592