Generate images with Grok Imagine
grok_generate_imageGenerate images with Grok Imagine from text prompts through your logged-in Chrome session—no API key required. Set aspect ratio, size, and batch count within daily quota limits.
Instructions
Generate images with Grok Imagine in the user's logged-in Chrome (no API key; uses the user's own Grok plan and daily quota: see grok_usage(); jobs over the limits are refused).
Omitted aspect / n / mode / timeout_s use the configured defaults (see grok_settings). aspect: 16:9 | 9:16 | 1:1 | 2:3 | 3:2. n: images to keep, 1..4 (one submission gives 2; n=3/4 = 2 submissions). mode: "speed" | "quality" (a warning, not a failure, if the page control is not found). max_side: shrink saved files so the long side <= max_side (e.g. 1344). size: exact "WxH" (e.g. "1344x768"), scale to cover + center crop (overrides max_side). keep_original: also keep _orig.. out_dir: absolute, or relative to the output root (GROK_WEB_MCP_OUTPUT_DIR, default ~/grok-web-mcp). Files are _1.jpg, _2.jpg ... (never overwritten). Returns {"files", "kept", "generated", "submissions", "aspect_ok", "secs", "sizes"?, "warning"?}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>"
},
"name": "grok_generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | ||
| mode | No | ||
| name | No | ||
| size | No | ||
| aspect | No | ||
| prompt | Yes | ||
| out_dir | No | ||
| max_side | No | ||
| timeout_s | No | ||
| keep_original | No |