← Back to Skills Marketplace
maliot100x

Grok Imagine Image

by Maliot100X · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
38
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install grok-imagine-image
Description
Generate images with xAI Grok Imagine models — batch generation, aspect ratios, base64 output, concurrent requests. Use when user wants AI image generation v...
README (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
Usage Guidance
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.
Capability Tags
requires-sensitive-credentials
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install grok-imagine-image
  3. After installation, invoke the skill by name or use /grok-imagine-image
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Generate images with Grok Imagine models — batch, aspect ratio, base64, concurrent. OpenAI SDK compatible.
Metadata
Slug grok-imagine-image
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 38 downloads so far.

How do I install Grok Imagine Image?

Run "/install grok-imagine-image" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Grok Imagine Image free?

Yes, Grok Imagine Image is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Grok Imagine Image support?

Grok Imagine Image is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Grok Imagine Image?

It is built and maintained by Maliot100X (@maliot100x); the current version is v1.0.0.

💬 Comments