POST https://api.openmove.cn/v1/images/generations。image 传入待拆分图片,并将 layer_decomposition 设为 true。prompt 可省略;省略时模型自动识别主要元素,填写时可指定希望拆出的对象。请求为同步调用,处理时间可能较长。curl --location 'https://api.omove.ai/v1/images/generations' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedream-5-0-pro-260628",
"image": "https://example.com/images/poster.png",
"prompt": "分别拆出标题文字、前景人物和背景装饰,每个元素作为独立可编辑图层",
"layer_decomposition": true,
"size": "2K",
"output_format": "jpeg",
"response_format": "url",
"watermark": false
}'{
"model": "doubao-seedream-5-0-pro-260628",
"created": 1784696685,
"data": [
{
"url": "https://example.com/generated/base.jpeg",
"size": "2048x2048",
"output_format": "jpeg",
"z_index": 0
},
{
"url": "https://example.com/generated/title-layer.png",
"size": "1648x300",
"output_format": "png",
"z_index": 1,
"bounding_box": {
"absolute": [
200,
120,
1848,
420
],
"normalized": [
98,
59,
902,
205
]
},
"name": "标题文字",
"description": "位于画面顶部的黄色标题文字,背景透明"
},
{
"url": "https://example.com/generated/person-layer.png",
"size": "1024x1360",
"output_format": "png",
"z_index": 2,
"bounding_box": {
"absolute": [
512,
480,
1536,
1840
],
"normalized": [
250,
234,
750,
898
]
},
"name": "前景人物",
"description": "画面中央的前景人物主体,背景透明"
}
],
"usage": {
"input_images": 1,
"generated_images": 3,
"output_tokens": 23755,
"total_tokens": 23755
}
}