Docs
All model guides
xAI · Image API

Grok Imagine 1.5

grok-imagine-1.5-ext

Fast creative image generation for concepts, campaigns, and social media assets.

POST/v1/images/generations
Output count1–10
Reference imagesUp to 1
Resolution tiersRoute native
Generation

Generate with Grok Imagine 1.5

Use ImgRouter's unified request contract and this model ID. The example uses recommended defaults from the route's current parameter guide.

cURL
curl https://api.imgrouter.com/v1/images/generations \
  -H "Authorization: Bearer $IMGROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: grok-imagine-1.5-ext-generate-001" \
  -d '{
  "model": "grok-imagine-1.5-ext",
  "prompt": "Editorial product photograph, precise materials, soft studio light",
  "size": "1:1",
  "n": 1
}'

Request body

modelstring · requiredUse grok-imagine-1.5-ext.
promptstring · requiredGeneration or editing instruction between 1 and 5,000 characters.
sizestringSupported values: 1:1, 16:9, 9:16, 3:2, 2:3.
ninteger · 1–10Number of output images. Defaults to 1 and cannot exceed 10.
reference_imagesstring[] · max 1Public HTTPS source images. Send this field to the edit endpoint.
Controls

Supported options

Aspect ratio or size

1:116:99:163:22:3

Output format

url

Route notes

Supports text-to-image and editing with one public HTTPS reference image.

Output count may range from one to ten.

Use a stable reference URL that can be fetched without authentication.

Reference workflow

Edit with reference images

Send public HTTPS source images with the same core controls. This route accepts up to 1 reference image.

POST/v1/images/edits
cURL
curl https://api.imgrouter.com/v1/images/edits \
  -H "Authorization: Bearer $IMGROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: grok-imagine-1.5-ext-edit-001" \
  -d '{
  "model": "grok-imagine-1.5-ext",
  "prompt": "Preserve the subject and composition. Change the scene to soft blue hour.",
  "size": "1:1",
  "n": 1,
  "reference_images": [
    "https://example.com/reference.jpg"
  ]
}'

Describe both the intended change and the details that must remain consistent. Stable source URLs produce the most reliable edit requests.

Response

Read the completed output

Successful requests return completed image URLs and a request ID. Store the assets you need permanently; routed output URLs may expire.

200 · application/json
{
  "id": "req_01K4…",
  "object": "image.generation",
  "created": 1787424152,
  "data": [
    { "url": "https://static.imgrouter.com/images/req_01K4.webp" }
  ],
  "usage": { "images": 1 }
}

Use GET /v1/requests/{request_id} for reconciliation and GET /v1/balance for the authenticated key's current Credit position.