← 返回 Skills 市场
maliot100x

Grok Imagine Image

作者 Maliot100X · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
38
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install grok-imagine-image
功能描述
Generate images with xAI Grok Imagine models — batch generation, aspect ratios, base64 output, concurrent requests. Use when user wants AI image generation v...
使用说明 (SKILL.md)

xAI Image Generation

Generate images from text with Grok Imagine models. Supports batch, aspect ratio, resolution, base64, and concurrent requests.

When to Use

  • User asks to generate an image
  • User wants AI art or visuals
  • User needs batch image generation
  • User wants images for social media, marketing, or content

Quick Start

curl -X POST https://api.x.ai/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $XAI_API_KEY" \
  -d '{
    "model": "grok-imagine-image-quality",
    "prompt": "A futuristic city skyline at night"
  }'

Models

Model Status Use Case
grok-imagine-image-quality ✅ Current All new requests
grok-imagine-image-pro ⚠️ Deprecated May 2026 Legacy, migrate to quality

Parameters

  • prompt (required) — Text description
  • model (required) — grok-imagine-image-quality
  • n (optional) — Number of images (1-4)
  • response_format (optional) — url (default) or b64_json

Examples

Single Image

curl -X POST https://api.x.ai/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $XAI_API_KEY" \
  -d '{
    "model": "grok-imagine-image-quality",
    "prompt": "A collage of London landmarks in stenciled street-art style"
  }'

Multiple Variations

curl -X POST https://api.x.ai/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $XAI_API_KEY" \
  -d '{
    "model": "grok-imagine-image-quality",
    "prompt": "A futuristic city skyline at night",
    "n": 4
  }'

Base64 Output

curl -X POST https://api.x.ai/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $XAI_API_KEY" \
  -d '{
    "model": "grok-imagine-image-quality",
    "prompt": "A serene Japanese garden",
    "response_format": "b64_json"
  }'

Response Format

{
  "data": [
    {
      "url": "https://...",
      "b64_json": "..."
    }
  ]
}

Python SDK

import xai_sdk

client = xai_sdk.Client()
response = client.image.sample(
    prompt="A futuristic city skyline",
    model="grok-imagine-image-quality",
)
print(response.url)

OpenAI SDK Compatible

from openai import OpenAI

client = OpenAI(
    base_url="https://api.x.ai/v1",
    api_key="YOUR_XAI_API_KEY",
)

response = client.images.generate(
    model="grok-imagine-image-quality",
    prompt="A futuristic city skyline",
)
print(response.data[0].url)

Tips

  • URLs are temporary — download promptly
  • Use b64_json for embedding
  • Use n parameter for batch variations
  • Use async for concurrent different prompts
  • Check respect_moderation for content filtering
安全使用建议
Before installing, make sure you are comfortable giving the agent access to an xAI API key and sending image prompts to xAI. Monitor API usage and costs, and download generated image URLs promptly because the skill notes they are temporary.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
The stated purpose is generating images through xAI Grok Imagine models, and the artifact provides only curl and SDK examples for that image-generation API.
Instruction Scope
Instructions are scoped to user-requested image generation and documented parameters such as model, prompt, count, and response format; no prompt override, hidden workflow, broad local access, or unrelated behavior was found.
Install Mechanism
The package contains a single non-executable SKILL.md file and declares only the expected XAI_API_KEY environment variable and curl binary requirement.
Credentials
Network calls to api.x.ai and use of XAI_API_KEY are necessary for the stated purpose, but prompts and generation requests will be sent to xAI and may incur provider billing.
Persistence & Privilege
No persistence, background workers, privilege escalation, file mutation, credential harvesting, or automatic execution mechanisms were present.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install grok-imagine-image
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /grok-imagine-image 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Generate images with Grok Imagine models — batch, aspect ratio, base64, concurrent. OpenAI SDK compatible.
元数据
Slug grok-imagine-image
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Grok Imagine Image 是什么?

Generate images with xAI Grok Imagine models — batch generation, aspect ratios, base64 output, concurrent requests. Use when user wants AI image generation v... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 38 次。

如何安装 Grok Imagine Image?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install grok-imagine-image」即可一键安装,无需额外配置。

Grok Imagine Image 是免费的吗?

是的,Grok Imagine Image 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Grok Imagine Image 支持哪些平台?

Grok Imagine Image 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Grok Imagine Image?

由 Maliot100X(@maliot100x)开发并维护,当前版本 v1.0.0。

💬 留言讨论