Use this file to discover all available pages before exploring further.
Unified image generation API
Use model parameter to select grok-4-1-image or grok-4-2-image model
Supports text-to-image and image-to-image
Async task management, query results by task ID
Important Change: For better performance and cost control, we no longer support passing base64 image data directly in image_urls. Please use the Upload Image API first to upload images and get URLs, then call this endpoint.
Number of images to generateSupports 1, 2, 4. Charges will be pre-deducted based on the numberDefault: 1⚠️ Note: Must enter a plain number (e.g., 1), do not use quotes or it will cause an error