Edit an image
Submit a reference image and editing instructions as JSON.
/v1/images/editsSubmit a reference image and editing instructions as JSON.
Authorization
bearerAuth Use a platform API key in the format Authorization: Bearer your-api-key.
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
If you receive failed to parse multipart form, check that the request uses application/json and replace the example URL with a publicly accessible reference image URL.