---
title: "POST /grok/image/edits"
method: POST
path: "/grok/image/edits"
---

# POST /grok/image/edits

`POST /grok/image/edits`

Edit images

## Request body

- GenerateRequestEdit
  - `prompt` string, required — Prompt
  - `model` 'grok-imagine-1.0-edit' | 'grok-imagine-image' | 'grok-imagine-image-quality' — Image editing model.
  - `refer_images` string[] — Reference image list, currently only one image is supported
  - `aspect_ratio` '1:1' | '16:9' | '9:16' | '3:2' | '2:3' | '4:3' | '3:4' | '2:1' | '1:2' | '19.5:9' | '9:19.5' | '20:9' | '9:20' | 'auto' — Output aspect ratio; determined by model if not provided. `grok-imagine-1.0-edit` supports: `1:1` (social media, avatars, thumbnails), `16:9` (landscape images, covers, desktop backgrounds), `9:16` (mobile portrait, short video covers, Stories), `3:2` (landscape photography), `2:3` (portrait photography, posters). `grok-imagine-image` and `grok-imagine-image-quality` additionally support: `4:3` (presentations, traditional landscape), `3:4` (portraits, vertical design), `2:1` (horizontal banners, headers), `1:2` (vertical banners, long images), `19.5:9` (horizontal smartphone screens), `9:19.5` (vertical smartphone wallpapers), `20:9` (horizontal ultra-wide screens), `9:20` (vertical ultra-wide screens), `auto` (model automatically selects ratio based on prompt).
  - `resolution` '1k' | '2k' — Output resolution. `1k` is standard (all models); `2k` is higher resolution (only `grok-imagine-image` and `grok-imagine-image-quality`).
  - `n` integer — Number of images to generate, range: 1 - 4
  - `hook_url` string — Callback URL. The system will send a notification to this URL when the task is completed or failed. The notification data structure is consistent with the <a href="fetch" target="_self">fetch structure</a>. If not set, you need to call the <a href="fetch" target="_self">fetch endpoint</a> to query the result

## Response `200`

Request successful

- object
  - `status` string, required
  - `message` string, required
  - `data` object, required

## Other responses

- `400` — Parameter error
- `401` — Authorization failed

---

[API](https://skmtc.net/ttapi/apis/flowmusic-api-docs.md) · [All operations](https://skmtc.net/ttapi/apis/flowmusic-api-docs/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ttapi/flowmusic-api-docs/versions/f27f8a59dbd0/schema)
