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

# 多图参考生图

> 接口与可灵官网一致；支持多主体/场景/风格参考

* 路径 `POST /kling/v1/images/multi-image2image`
* 与官网一致：本页所有请求体、字段命名与返回结构与可灵官网保持一致
* 字段详解：请参考[官网权威文档](https://klingai.kuaishou.com/docs)

请求参数

| 参数                   | 类型     | 必填    | 说明                                                     |
| -------------------- | ------ | ----- | ------------------------------------------------------ |
| `model_name`         | string | 否     | 模型名称，仅支持 `kling-v2`、`kling-v2-1`                       |
| `prompt`             | string | 否     | 正向文本提示词                                                |
| `subject_image_list` | array  | **是** | 主体图片列表，1-4张                                            |
| `scene_image`        | string | 否     | 场景参考图                                                  |
| `style_image`        | string | 否     | 风格参考图                                                  |
| `n`                  | int    | 否     | 生成图片数量 \[1,9]，默认 1                                     |
| `aspect_ratio`       | string | 否     | 纵横比：`16:9`、`9:16`、`1:1`、`4:3`、`3:4`、`3:2`、`2:3`、`21:9` |
| `watermark_info`     | object | 否     | 是否生成含水印结果                                              |
| `callback_url`       | string | 否     | 回调通知地址                                                 |
| `external_task_id`   | string | 否     | 自定义任务ID                                                |

subject\_image\_list 格式

```json theme={null}
{
  "subject_image_list": [
    {"subject_image": "https://example.com/subject1.jpg"},
    {"subject_image": "https://example.com/subject2.jpg"}
  ]
}
```

补充约束

* `subject_image_list` 必填，最多 4 张；
* `aspect_ratio` 仅支持 `16:9`/`9:16`/`1:1`/`4:3`/`3:4`/`3:2`/`2:3`/`21:9`；
* `n` 取值范围 \[1, 9]。

### 场景：主体 + 场景 + 风格参考

```bash theme={null}
curl --request POST \
  --url https://models.hingnet.com.cn/kling/v1/images/multi-image2image \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model_name": "kling-v2",
    "subject_image_list": [
      {"subject_image": "https://example.com/subject1.jpg"}
    ],
    "scene_image": "https://example.com/scene.jpg",
    "style_image": "https://example.com/style.jpg",
    "prompt": "Apply the artistic style to the scene composition",
    "n": 1,
    "aspect_ratio": "16:9"
  }'
```

示例响应

```json theme={null}
{
  "code": 0,
  "message": "success",
  "request_id": "req_1735558800_img456",
  "data": {
    "task_id": "task_01JGHQ...",
    "task_status": "submitted",
    "created_at": 1735558800000,
    "updated_at": 1735558800000
  }
}
```
