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

ParameterTypeDescription
promptstringText description of the image to generate
nintegerNumber of images (1–4, default 1)
sizestringImage dimensions (1024x1024, 1536x1024, 1024x1536)
response_formatstringurl or b64_json