# Edit（编辑）

**方法**: `POST`
**路径**: `/ideogram/edit`

Remix provided images synchronously based on a given prompt and optional parameters
根据给定的提示和可选参数，实时提供重新混合的图像

## 请求参数

### Header 参数

```text
Authorization
string
可选
默认值:
Bearer {{YOUR_API_KEY}}
```

### Body 参数 multipart/form-data

```text
image_file
file
可选
An image binary; only JPEG, WEBPs and PNGs are supported at this time
图像二进制；目前仅支持 JPEG、WEBP 和 PNG 格式
mask
file
可选
prompt
string
可选
示例:
cat
model
string
可选
示例:
V_2_TURBO
magic_prompt_option
enum<string>
可选
AUTO
ON
OFF
枚举值:
AUTO
ON
OFF
示例:
AUTO
seed
integer
可选
style_type
string
可选
生成的样式类型；这仅适用于型号 V_2 及更高版本，不应为型号版本 V_1 指定。
示例值:
AUTO
GENERAL
REALISTIC
DESIGN
RENDER_3D
ANIME
```

## 请求示例代码

### Shell

```bash
curl --location --request POST '/ideogram/edit' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--form 'image_file=@""' \
--form 'mask=@""' \
--form 'prompt="cat"' \
--form 'model="V_2_TURBO"' \
--form 'magic_prompt_option="AUTO"' \
--form 'seed=""' \
--form 'style_type=""'
```

## 返回响应

### 🟢 200 成功

**内容类型**: `application/json`

#### 响应结构

```text
object
```

#### 示例

```json
{
    "data": [
        {
            "seed": 12345,
            "prompt": "A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there's an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset.",
            "resolution": "1024x1024",
            "url": "https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g",
            "is_image_safe": true
        },
        {
            "seed": 12345,
            "prompt": "A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there's an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset.",
            "resolution": "1024x1024",
            "url": "https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g",
            "is_image_safe": true
        }
    ],
    "created": "2000-01-23T04:56:07.000Z"
}
```
