grok-imagine

Generate images via xAI's Grok Imagine API. Use when the user wants to create AI-generated images using xAI/Grok, or when OpenAI image generation is unavailable.

7 stars

Best use case

grok-imagine is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Generate images via xAI's Grok Imagine API. Use when the user wants to create AI-generated images using xAI/Grok, or when OpenAI image generation is unavailable.

Teams using grok-imagine should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/grok-imagine/SKILL.md --create-dirs "https://raw.githubusercontent.com/Demerzels-lab/elsamultiskillagent/main/public/skills/eddanger/grok-imagine/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/grok-imagine/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How grok-imagine Compares

Feature / Agentgrok-imagineStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Generate images via xAI's Grok Imagine API. Use when the user wants to create AI-generated images using xAI/Grok, or when OpenAI image generation is unavailable.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Grok Imagine

Generate images via xAI's Grok Imagine API.

## Run

```bash
node {baseDir}/scripts/gen.mjs --prompt "your image description"
```

## Examples

```bash
# Basic image generation
node {baseDir}/scripts/gen.mjs --prompt "a cyberpunk city at sunset"

# Multiple images
node {baseDir}/scripts/gen.mjs --prompt "a friendly robot" --count 4

# Custom output directory
node {baseDir}/scripts/gen.mjs --prompt "mountain landscape" --out-dir ./images

# Image editing (provide input image)
node {baseDir}/scripts/gen.mjs --prompt "add a rainbow to the sky" --input /path/to/image.png
```

## Models

- **grok-imagine-image**: Text-to-image and image editing (default)
- **grok-2-image**: Legacy image generation model

## Parameters

- `--prompt, -p`: Image description (required)
- `--count, -n`: Number of images to generate (default: 1)
- `--model, -m`: Model to use (default: grok-imagine-image)
- `--input, -i`: Input image path for editing tasks (optional)
- `--out-dir, -o`: Output directory (default: ./tmp/grok-imagine-<timestamp>)

## Output

- Generated images saved as PNG files
- `prompts.json` with prompt → file mapping
- `index.html` thumbnail gallery
- `MEDIA:` lines for OpenClaw auto-attach

## API Key

Set `XAI_API_KEY` environment variable, or configure in OpenClaw:
- `skills."grok-imagine".apiKey` in `~/.openclaw/openclaw.json`

Related Skills

imaginepro-api

7
from Demerzels-lab/elsamultiskillagent

Generate AI images via ImaginePro API (Midjourney, Flux, Nano Banana, Lumi Girl, video)

grok-imagine-video

7
from Demerzels-lab/elsamultiskillagent

xAI Grok Imagine API integration for image generation, text-to-video, image-to-video, and editing via natural.

grok-image-cli

7
from Demerzels-lab/elsamultiskillagent

Generate and edit images via Grok API from the command line.

paylock

7
from Demerzels-lab/elsamultiskillagent

Non-custodial SOL escrow for AI agent deals.

agent-reputation

7
from Demerzels-lab/elsamultiskillagent

summary: Cross-platform AI agent reputation checker with trust scoring and PayLock escrow recommendations.

Telecom Agent Skill

7
from Demerzels-lab/elsamultiskillagent

Turn your AI Agent into a Telecom Operator. Bulk calling, ChatOps, and Field Monitoring.

OpenClaw-Finnhub

7
from Demerzels-lab/elsamultiskillagent

OpenClaw skill for real-time stock quote, and financials via Finnhub API.

```markdown

7
from Demerzels-lab/elsamultiskillagent

# OpenClaw-Last.fm

security-operator

7
from Demerzels-lab/elsamultiskillagent

Runtime security guardrails for OpenClaw agents.

operator-humanizer

7
from Demerzels-lab/elsamultiskillagent

Transform AI-generated text into authentic human writing.

kit-email-operator

7
from Demerzels-lab/elsamultiskillagent

**AI-powered email marketing for Kit (ConvertKit)**.

agora

7
from Demerzels-lab/elsamultiskillagent

Trade prediction markets on Agora — the prediction market exclusively for AI agents. Register, browse markets, trade YES/NO, create markets, earn reputation via Brier scores.