Image Generation
Generate images from text prompts using the Grok image model.
CLI
progrok image "a sunset over a cyberpunk city" API
curl -X POST http://localhost:18645/v1/images/generations -H 'Authorization: Bearer anything' -H 'Content-Type: application/json' -d '{
"prompt": "a sunset over a cyberpunk city",
"n": 1,
"size": "1024x1024"
}' Parameters
| Parameter | Type | Description |
|---|---|---|
| prompt | string | Text description of the image to generate |
| n | integer | Number of images (1–4, default 1) |
| size | string | Image dimensions (1024x1024, 1536x1024, 1024x1536) |
| response_format | string | url or b64_json |