Skip to content

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/generations

Example 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 ​

ModelsRecommended use
grok-imagine-imageGrok Imagine standard picture generation.
grok-imagine-image-proGrok Imagine Pro image generation, suitable for higher quality or more stable output.

Common field ​

fieldTypeAnnotations
modelstringPicture model name.
promptstringPhoto description, recommendations include subject, image, style, use and aspect ratio.
sizestringOutput size. Available values are based on the model list and API Reference.
nintegerGenerates the quantity.
response_formatstringreturns 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.

Relevant Pages ​