Skip to main content
POST
Grok Imagine Image edit
This is an async API that only returns the task_id of the async task.
This is an async API that only returns the task_id of the async task. Use the task_id to call the Get Async Task Result API to retrieve the generated result.

Request Headers

string
required
Enum: application/json
string
required
Bearer authentication format: Bearer {{API Key}}.

Request Body

string
required
Source image to edit, provided as a public URL or base64 data URI (e.g., “data:image/jpeg;base64,…”). The model analyzes the image content and applies the requested edits.
string
required
Text instructions describing the desired edits to the source image. The model can understand image content and make modifications including style transfer, object modification, scene changes, and iterative refinement.Length limit: 1 - unlimited

Response

string
required
Use the task_id to call the Get Async Task Result API to retrieve the generated output.