Generate an image based on a prompt. This is the endpoint for making generation requests to image generation models.
Request body
Example request
{
"model": "grok-imagine-image"
}Response
Success
Changes
Changed in 2 of the 9 revisions of this API.7
- ○
added the new
21:9enum value to the request propertyaspect_ratio/oneOf[ImageAspectRatio]/request-property-enum-value-added
- ○
added the new
5:2enum value to the request propertyaspect_ratio/oneOf[ImageAspectRatio]/request-property-enum-value-added
- ○
- ○
added the optional property
usage/oneOf[MediaUsage]/input_tokensto the response with the200statusresponse-optional-property-added
- ○
added the optional property
usage/oneOf[MediaUsage]/input_tokens_detailsto the response with the200statusresponse-optional-property-added
- ○
added the optional property
usage/oneOf[MediaUsage]/output_tokensto the response with the200statusresponse-optional-property-added
- ○
added the optional property
usage/oneOf[MediaUsage]/output_tokens_detailsto the response with the200statusresponse-optional-property-added
- ○
added the optional property
usage/oneOf[MediaUsage]/total_tokensto the response with the200statusresponse-optional-property-added
- ○