# FLUX.1 Kontext [Max Multi]（实验性多图编辑）

**方法**: `POST`
**路径**: `/fal-ai/flux-pro/kontext/max/multi`

文本描述，模型将根据该描述及图片内容进行编辑

## 请求参数

### Header 参数

```text
Content-Type
string
可选
示例:
application/json
Authorization
string
可选
默认值:
Bearer {{YOUR_API_KEY}}
```

### Body 参数 application/json

```text
prompt
string
必需
文本描述，模型将根据该描述及图片内容进行编辑
示例:
Put the little duckling on top of the woman's t-shirt.
seed
integer
可选
随机种子，传入相同参数时图片结果保持一致
guidance_scale
number
可选
提示词遵循程度 (Classifier Free Guidance Scale)，数值越大越贴合prompt
默认值:
3.5
sync_mode
boolean
可选
同步模式。true时会等待图片生成并上传再返回，适合需要直接获得图片内容时
默认值:
false
num_images
integer
生成图片数量
可选
>= 1
<= 4
默认值:
1
safety_tolerance
enum<string>
可选
安全容忍度，1最严格(内容少)，6最宽松(内容多)
枚举值:
1
2
3
4
5
6
默认值:
2
output_format
enum<string>
输出图片格式
可选
枚举值:
jpeg
png
默认值:
jpeg
aspect_ratio
enum<string>
输出图片比例
可选
枚举值:
21:9
16:9
4:3
3:2
1:1
2:3
3:4
9:16
9:21
image_urls
array
[string <uri>]
必需
批量编辑的图片列表，支持多张图片
>= 1 items
示例
{
"prompt"
:
"Put the little duckling on top of the woman's t-shirt."
,
"seed"
:
0
,
"guidance_scale"
:
3.5
,
"sync_mode"
:
false
,
"num_images"
:
1
,
"safety_tolerance"
:
"2"
,
"output_format"
:
"jpeg"
,
"aspect_ratio"
:
"21:9"
,
"image_urls"
:
[
"http://example.com"
]
}
```

## 请求示例代码

### Shell

```bash
curl --location --request POST '/fal-ai/flux-pro/kontext/max/multi' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "prompt": "Put the little duckling on top of the woman'\''s t-shirt.",
    "seed": 0,
    "guidance_scale": 3.5,
    "sync_mode": false,
    "num_images": 1,
    "safety_tolerance": "2",
    "output_format": "jpeg",
    "aspect_ratio": "21:9",
    "image_urls": [
        "http://example.com"
    ]
}'
```

## 返回响应

### 🟢 200 成功

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

#### 响应结构

```text
status
string
必需
request_id
string
必需
response_url
string
必需
status_url
string
必需
cancel_url
string
必需
queue_position
integer
必需
```

#### 示例

```json
{
    "status": "IN_QUEUE",
    "request_id": "551a32da-52b2-4be8-bf2f-bfb7cce2b324",
    "response_url": "https://queue.fal.run/fal-ai/flux-1/requests/551a32da-52b2-4be8-bf2f-bfb7cce2b324",
    "status_url": "https://queue.fal.run/fal-ai/flux-1/requests/551a32da-52b2-4be8-bf2f-bfb7cce2b324/status",
    "cancel_url": "https://queue.fal.run/fal-ai/flux-1/requests/551a32da-52b2-4be8-bf2f-bfb7cce2b324/cancel",
    "queue_position": 0
}
```
