> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myrouter.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Grok Imagine Image edit

This is an async API that only returns the `task_id` of the async task.

<Tip>
  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](/docs/models/reference-get-async-task-result) to retrieve the generated result.
</Tip>

## Request Headers

<ParamField header="Content-Type" type="string" required={true}>
  Enum: `application/json`
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer authentication format: Bearer \{\{API Key}}.
</ParamField>

## Request Body

<ParamField body="image" type="string" required={true}>
  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.
</ParamField>

<ParamField body="prompt" type="string" required={true}>
  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
</ParamField>

## Response

<ResponseField name="task_id" type="string" required={true}>
  Use the task\_id to call the [Get Async Task Result API](/docs/models/reference-get-async-task-result) to retrieve the generated output.
</ResponseField>
