Images
Generate Grok Image
Generates Grok images with aspect-ratio, resolution, and response-format controls.
POST
/v1/images/generationsParameters
| Parameter | Type / location | Description |
|---|---|---|
modelRequired | stringbody | Grok image model ID. |
promptRequired | stringbody | Image prompt. |
aspect_ratioOptional | stringbody | Requested aspect ratio. |
nOptional | integerbody | Number of images. |
resolutionOptional | stringbody | Output resolution. 1k2k |
response_formatOptional | stringbody | 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" }
]
}