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

Edit an image

Submit a reference image and editing instructions as JSON.

POST/v1/images/edits

Submit a reference image and editing instructions as JSON.

Authorization

bearerAuth
AuthorizationBearer <token>

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.

xAI Image Edit official documentationSee request parameters and response structure.