Skip to main content
POST
/
v3
/
async
/
grok-imagine-image-edit
Grok Imagine Image edit
curl --request POST \
  --url https://api.myrouter.ai/v3/async/grok-imagine-image-edit \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "image": "<string>",
  "prompt": "<string>"
}
'
{
  "task_id": "<string>"
}
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

Content-Type
string
required
Enum: application/json
Authorization
string
required
Bearer authentication format: Bearer {{API Key}}.

Request Body

image
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.
prompt
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

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