Images

Generate Grok Image

Generates Grok images with aspect-ratio, resolution, and response-format controls.

POST/v1/images/generations

Parameters

ParameterType / locationDescription
modelRequiredstringbody

Grok image model ID.

promptRequiredstringbody

Image prompt.

aspect_ratioOptionalstringbody

Requested aspect ratio.

nOptionalintegerbody

Number of images.

resolutionOptionalstringbody

Output resolution.

1k2k
response_formatOptionalstringbody

Image return format.

urlb64_json

Request examples

cURL
curl --request POST \
  --url 'https://api.juhenextvip.com/v1/images/generations' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "grok-imagine-image",
  "prompt": "A quiet futuristic train station at blue hour",
  "aspect_ratio": "16:9",
  "resolution": "2k",
  "response_format": "url"
}'

Response examples

JSON
{
  "created": 1785859200,
  "data": [
    { "url": "https://example.com/grok-image.png" }
  ]
}