Edit images with JSON
Edit one or more Grok images by submitting image URLs in JSON.
The request uses application/json and submits one or more publicly accessible image URLs for editing.
/v1/images/editsEdit one or more reference images by following text instructions. The request must use application/json and provide publicly accessible image URLs through image or images.
This JSON URL request format applies only to models that support Grok image editing.
Use /v1/images/edits, not /v1/edits. For multiple reference images, use images; reference_images is not recommended.
Authorization
bearerAuth Use Bearer your-api-key in the Authorization header.
In: header
Request Body
application/json
Grok image-editing request parameters. Provide at least one of image or images.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json