AGTCloud API Docs
GuidesAPI ReferenceIntegrations and resourcesUpdate and help
Image generationGrok Image

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.

POST/v1/images/edits

Edit 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
AuthorizationBearer <token>

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