Grok Imagine Picture
Grok Imagine images are used for creative drawings, poster sketches, style exploration and light visual media assets generation. MoonNexAI's current common models include grok-imagine-image and grok-imagine-image-pro, using OpenAI Images compatible portals.
Method and Path
http
POST /v1/images/generationsExample request
bash
curl https://moonnexai.com/v1/images/generations \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-image",
"prompt": "A cinematic poster of a futuristic harbor at sunrise, sharp product lighting.",
"size": "1024x1024",
"n": 1
}'Common Models
| Models | Recommended use |
|---|---|
grok-imagine-image | Grok Imagine standard picture generation. |
grok-imagine-image-pro | Grok Imagine Pro image generation, suitable for higher quality or more stable output. |
Common field
| field | Type | Annotations |
|---|---|---|
model | string | Picture model name. |
prompt | string | Photo description, recommendations include subject, image, style, use and aspect ratio. |
size | string | Output size. Available values are based on the model list and API Reference. |
n | integer | Generates the quantity. |
response_format | string | returns the format, which is based on API Reference. |
response Processing
Grok Imagine images usually return synchronously. Read the image URL or image-content field from the response and save the original request parameters for retries and troubleshooting.
json
{
"created": 1730000000,
"data": [
{
"url": "https://example.com/generated-image.png"
}
]
}Access Recommendations
- Prompt is more stable than writing only keywords with the main subject, scene, light, style and use.
- If you need to edit the exact image, confirm whether the selected Grok image model supports
/v1/images/edits. grok-imagine-*-video,grok-video-*belong to asynchronous video task, please use Grok Video.