Grok Imagine Image Text-to-Image
Images
Grok Imagine Image Text-to-Image
POST
Grok Imagine Image Text-to-Image
This is an asynchronous API and only returns the
task_id of the async task.
Request Headers
Enum value:
application/jsonBearer authentication format: Bearer {{API Key}}.
Request Body
The text description of the image to generate. The model supports rich, detailed prompts to generate high-quality images, and supports various visual styles, including hyper-realistic photography, anime, oil painting, pencil sketch, and more.Length limit: 1 - unlimited
The aspect ratio of the generated image. Common use cases: 1:1 is suitable for social media and thumbnails; 16:9/9:16 are suitable for widescreen and mobile portrait; 4:3/3:4 are suitable for presentations and portraits; 3:2/2:3 are suitable for photography; 2:1/1:2 are suitable for banners and hero images; 20:9/9:20 are suitable for ultrawide displays.Options:
2:1, 20:9, 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, 9:20, 1:2Output image format.Options:
jpeg, pngResponse Information
Use the task_id to request the Get Task Result API to retrieve the generated output.