Grok 2 Image
Model Overview
Setup your API Key
API Schema
post
Body
modelstring · enumRequiredPossible values:
promptstringRequired
The text prompt describing the content, style, or composition of the image to be generated.
nnumber · min: 1 · max: 10OptionalDefault:
The number of images to generate.
1response_formatstring · enumOptionalDefault:
The format in which the generated images are returned.
urlPossible values: Responses
200Success
application/json
post
/v1/images/generations200Success
Quick Example

"A T-Rex relaxing on a beach, lying on a sun lounger and wearing sunglasses."Last updated
Was this helpful?