curl --request POST \
--url https://api.ch88.cn/v1/open/product-images/plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_info": {
"name": "保湿精华液",
"sellingPoints": "清爽肤感,适合日常保湿",
"platform": "Amazon"
},
"product_image_urls": [
"https://api.ch88.cn/v1/linggan/media/assets/generated%2Fopen-upload%2Fexample-front.png"
],
"reference_image_urls": [],
"layout_image_urls": [],
"global_prompt": "清透、克制、明亮,保留真实包装细节。",
"output_language": "zh-cn",
"tasks": [
{
"task_key": "main:1",
"type_key": "main",
"type_index": 1,
"type_total": 1
},
{
"task_key": "detail-selling:1",
"type_key": "detail-selling",
"type_index": 1,
"type_total": 1
}
]
}
'import requests
url = "https://api.ch88.cn/v1/open/product-images/plans"
payload = {
"product_info": {
"name": "保湿精华液",
"sellingPoints": "清爽肤感,适合日常保湿",
"platform": "Amazon"
},
"product_image_urls": ["https://api.ch88.cn/v1/linggan/media/assets/generated%2Fopen-upload%2Fexample-front.png"],
"reference_image_urls": [],
"layout_image_urls": [],
"global_prompt": "清透、克制、明亮,保留真实包装细节。",
"output_language": "zh-cn",
"tasks": [
{
"task_key": "main:1",
"type_key": "main",
"type_index": 1,
"type_total": 1
},
{
"task_key": "detail-selling:1",
"type_key": "detail-selling",
"type_index": 1,
"type_total": 1
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
product_info: {name: '保湿精华液', sellingPoints: '清爽肤感,适合日常保湿', platform: 'Amazon'},
product_image_urls: [
'https://api.ch88.cn/v1/linggan/media/assets/generated%2Fopen-upload%2Fexample-front.png'
],
reference_image_urls: [],
layout_image_urls: [],
global_prompt: '清透、克制、明亮,保留真实包装细节。',
output_language: 'zh-cn',
tasks: [
{task_key: 'main:1', type_key: 'main', type_index: 1, type_total: 1},
{
task_key: 'detail-selling:1',
type_key: 'detail-selling',
type_index: 1,
type_total: 1
}
]
})
};
fetch('https://api.ch88.cn/v1/open/product-images/plans', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 200,
"data": {
"product_boundary": {
"immutable_product": "滴管瓶、瓶盖、真实标签及包装结构",
"replaceable_contents": [
"背景",
"展示台",
"装饰物"
],
"bundled_components": [
"滴管"
],
"boundary_reason": "商品主体和随售部件可从输入图片确认。"
},
"assignments": [
{
"task_key": "main:1",
"primary_focus": "商品主体与核心视觉识别",
"visual_direction": "产品居中,使用清透水感背景和柔和自然光。",
"supporting_details": "保留瓶身、滴管和真实标签细节。",
"load_state": "full",
"content_set": [
"滴管瓶",
"水感背景",
"简洁展示台"
],
"source_content_action": "移除原图无关背景,完整保留商品本体。"
},
{
"task_key": "detail-selling:1",
"primary_focus": "滴管与瓶口结构细节",
"visual_direction": "使用局部特写展示滴管和瓶口工艺。",
"supporting_details": "控制景深,确保结构清晰可辨。",
"load_state": "detail-only",
"content_set": [
"滴管",
"瓶口",
"玻璃材质细节"
],
"source_content_action": "仅保留与商品细节相关的可见内容。"
}
]
},
"request_id": "req_550e8400-e29b-41d4-a716-446655440000"
}
{
"error": {
"code": 400,
"type": "invalid_request_error",
"message": "请至少提供 1 张产品图"
},
"request_id": "req_xxx"
}
{
"error": {
"code": 401,
"type": "authentication_error",
"message": "缺少 Public API Key"
},
"request_id": "req_xxx"
}
{
"error": {
"code": 403,
"type": "permission_error",
"message": "成员或组织已停用"
},
"request_id": "req_xxx"
}
{
"error": {
"code": 409,
"type": "conflict_error",
"message": "成员未分配有效上游密钥"
},
"request_id": "req_xxx"
}
{
"error": {
"code": 429,
"type": "rate_limit_error",
"message": "请求过于频繁,请稍后重试",
"retryable": true
},
"request_id": "req_xxx"
}
{
"error": {
"code": 502,
"type": "upstream_error",
"message": "上游服务暂时不可用,请稍后重试",
"retryable": true
},
"request_id": "req_xxx"
}
{
"error": {
"code": 503,
"type": "service_unavailable_error",
"message": "服务暂时不可用,请稍后重试",
"retryable": true
},
"request_id": "req_550e8400-e29b-41d4-a716-446655440000"
}
商品图片 AI 策划
根据商品图、参考图、排版图和计划生成的图片类型,同步返回一批商品图片的内容分工与视觉方案。该接口只生成策划,不会提交生图任务。
curl --request POST \
--url https://api.ch88.cn/v1/open/product-images/plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_info": {
"name": "保湿精华液",
"sellingPoints": "清爽肤感,适合日常保湿",
"platform": "Amazon"
},
"product_image_urls": [
"https://api.ch88.cn/v1/linggan/media/assets/generated%2Fopen-upload%2Fexample-front.png"
],
"reference_image_urls": [],
"layout_image_urls": [],
"global_prompt": "清透、克制、明亮,保留真实包装细节。",
"output_language": "zh-cn",
"tasks": [
{
"task_key": "main:1",
"type_key": "main",
"type_index": 1,
"type_total": 1
},
{
"task_key": "detail-selling:1",
"type_key": "detail-selling",
"type_index": 1,
"type_total": 1
}
]
}
'import requests
url = "https://api.ch88.cn/v1/open/product-images/plans"
payload = {
"product_info": {
"name": "保湿精华液",
"sellingPoints": "清爽肤感,适合日常保湿",
"platform": "Amazon"
},
"product_image_urls": ["https://api.ch88.cn/v1/linggan/media/assets/generated%2Fopen-upload%2Fexample-front.png"],
"reference_image_urls": [],
"layout_image_urls": [],
"global_prompt": "清透、克制、明亮,保留真实包装细节。",
"output_language": "zh-cn",
"tasks": [
{
"task_key": "main:1",
"type_key": "main",
"type_index": 1,
"type_total": 1
},
{
"task_key": "detail-selling:1",
"type_key": "detail-selling",
"type_index": 1,
"type_total": 1
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
product_info: {name: '保湿精华液', sellingPoints: '清爽肤感,适合日常保湿', platform: 'Amazon'},
product_image_urls: [
'https://api.ch88.cn/v1/linggan/media/assets/generated%2Fopen-upload%2Fexample-front.png'
],
reference_image_urls: [],
layout_image_urls: [],
global_prompt: '清透、克制、明亮,保留真实包装细节。',
output_language: 'zh-cn',
tasks: [
{task_key: 'main:1', type_key: 'main', type_index: 1, type_total: 1},
{
task_key: 'detail-selling:1',
type_key: 'detail-selling',
type_index: 1,
type_total: 1
}
]
})
};
fetch('https://api.ch88.cn/v1/open/product-images/plans', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 200,
"data": {
"product_boundary": {
"immutable_product": "滴管瓶、瓶盖、真实标签及包装结构",
"replaceable_contents": [
"背景",
"展示台",
"装饰物"
],
"bundled_components": [
"滴管"
],
"boundary_reason": "商品主体和随售部件可从输入图片确认。"
},
"assignments": [
{
"task_key": "main:1",
"primary_focus": "商品主体与核心视觉识别",
"visual_direction": "产品居中,使用清透水感背景和柔和自然光。",
"supporting_details": "保留瓶身、滴管和真实标签细节。",
"load_state": "full",
"content_set": [
"滴管瓶",
"水感背景",
"简洁展示台"
],
"source_content_action": "移除原图无关背景,完整保留商品本体。"
},
{
"task_key": "detail-selling:1",
"primary_focus": "滴管与瓶口结构细节",
"visual_direction": "使用局部特写展示滴管和瓶口工艺。",
"supporting_details": "控制景深,确保结构清晰可辨。",
"load_state": "detail-only",
"content_set": [
"滴管",
"瓶口",
"玻璃材质细节"
],
"source_content_action": "仅保留与商品细节相关的可见内容。"
}
]
},
"request_id": "req_550e8400-e29b-41d4-a716-446655440000"
}
{
"error": {
"code": 400,
"type": "invalid_request_error",
"message": "请至少提供 1 张产品图"
},
"request_id": "req_xxx"
}
{
"error": {
"code": 401,
"type": "authentication_error",
"message": "缺少 Public API Key"
},
"request_id": "req_xxx"
}
{
"error": {
"code": 403,
"type": "permission_error",
"message": "成员或组织已停用"
},
"request_id": "req_xxx"
}
{
"error": {
"code": 409,
"type": "conflict_error",
"message": "成员未分配有效上游密钥"
},
"request_id": "req_xxx"
}
{
"error": {
"code": 429,
"type": "rate_limit_error",
"message": "请求过于频繁,请稍后重试",
"retryable": true
},
"request_id": "req_xxx"
}
{
"error": {
"code": 502,
"type": "upstream_error",
"message": "上游服务暂时不可用,请稍后重试",
"retryable": true
},
"request_id": "req_xxx"
}
{
"error": {
"code": 503,
"type": "service_unavailable_error",
"message": "服务暂时不可用,请稍后重试",
"retryable": true
},
"request_id": "req_550e8400-e29b-41d4-a716-446655440000"
}
{
"code": 200,
"data": {
"product_boundary": {
"immutable_product": "滴管瓶、瓶盖、真实标签及包装结构",
"replaceable_contents": [
"背景",
"展示台",
"装饰物"
],
"bundled_components": [
"滴管"
],
"boundary_reason": "商品主体和随售部件可从输入图片确认。"
},
"assignments": [
{
"task_key": "main:1",
"primary_focus": "商品主体与核心视觉识别",
"visual_direction": "产品居中,使用清透水感背景和柔和自然光。",
"supporting_details": "保留瓶身、滴管和真实标签细节。",
"load_state": "full",
"content_set": [
"滴管瓶",
"水感背景",
"简洁展示台"
],
"source_content_action": "移除原图无关背景,完整保留商品本体。"
},
{
"task_key": "detail-selling:1",
"primary_focus": "滴管与瓶口结构细节",
"visual_direction": "使用局部特写展示滴管和瓶口工艺。",
"supporting_details": "控制景深,确保结构清晰可辨。",
"load_state": "detail-only",
"content_set": [
"滴管",
"瓶口",
"玻璃材质细节"
],
"source_content_action": "仅保留与商品细节相关的可见内容。"
}
]
},
"request_id": "req_550e8400-e29b-41d4-a716-446655440000"
}
{
"error": {
"code": 400,
"type": "invalid_request_error",
"message": "请至少提供 1 张产品图"
},
"request_id": "req_xxx"
}
{
"error": {
"code": 401,
"type": "authentication_error",
"message": "缺少 Public API Key"
},
"request_id": "req_xxx"
}
{
"error": {
"code": 403,
"type": "permission_error",
"message": "成员或组织已停用"
},
"request_id": "req_xxx"
}
{
"error": {
"code": 409,
"type": "conflict_error",
"message": "成员未分配有效上游密钥"
},
"request_id": "req_xxx"
}
{
"error": {
"code": 429,
"type": "rate_limit_error",
"message": "请求过于频繁,请稍后重试",
"retryable": true
},
"request_id": "req_xxx"
}
{
"error": {
"code": 502,
"type": "upstream_error",
"message": "上游服务暂时不可用,请稍后重试",
"retryable": true
},
"request_id": "req_xxx"
}
{
"error": {
"code": 503,
"type": "service_unavailable_error",
"message": "服务暂时不可用,请稍后重试",
"retryable": true
},
"request_id": "req_550e8400-e29b-41d4-a716-446655440000"
}
授权
成员级 Public API Key。请填写完整密钥,Mintlify Playground 会自动以 Authorization: Bearer <PUBLIC_API_KEY> 发送。完整明文只在管理后台创建成功时显示一次。
请求体
商品主体图片 URL,至少 1 张。商品图、参考图和排版图合计最多 15 张。
1 - 15 elements需要策划的图片任务。task_key 在本次请求内必须唯一。
2 - 160 elementsHide child attributes
Hide child attributes
调用方生成的唯一任务标识,用于把策划结果对应回原任务,例如 main:1。
120主页商品图片类型。枚举值与用途对应关系:
white-main:白底主图main:电商主图function-scene:功能信息图dimension:尺寸图detail-selling:细节卖点图lifestyle:使用场景图comparison:对比图bundle:包装与收货内容图graphic-design:平面设计图
white-main, main, function-scene, dimension, detail-selling, lifestyle, comparison, bundle, graphic-design 当前任务在同一图片类型中的序号,从 1 开始。
1 <= x <= 100本次请求中该图片类型的任务总数。
1 <= x <= 100当前任务的额外要求。
3000节日或促销主题,例如 圣诞节;没有时省略。
80场景分类与名称,格式为 分类:场景;没有时省略。
100当前任务采用的排版名称。
120当前任务是否使用排版参考图。
对应 layout_image_urls 中从 1 开始的图片序号;未使用排版图时省略。
1 <= x <= 14已知的结构化商品信息。所有数据应来自客户资料或可确认事实。
Hide child attributes
Hide child attributes
商品名称。
可确认的核心卖点。
使用方式或适用场景。
销售国家或地区。
销售平台。
期望的视觉风格。
其他需要在生图中考虑的事实或约束。
视觉风格或构图参考图片 URL。与其他图片合计不得超过 15 张。
14排版参考图 URL。任务通过 layout_image_index 按从 1 开始的序号引用;与其他图片合计不得超过 15 张。
14整批图片统一遵守的视觉风格、商品事实或禁止项。
3000图片策划中的目标文案语言;枚举含义与商品图片生成接口一致。
no-text, thai, indonesian, vietnamese, malay, zh-cn, english, japanese, korean, filipino, zh-tw, french, spanish, german, italian, portuguese, russian, arabic 响应
批次策划完成。
HTTP 状态码。成功时为 200。
Hide child attributes
Hide child attributes
与请求任务按 task_key 一一对应的策划方案。
Hide child attributes
Hide child attributes
请求中的任务唯一标识。
当前图片唯一且明确的主要内容重点。
构图、场景、光线和画面组织建议。
辅助元素和细节表现建议。
商品或内容的装载/展示状态。
empty, sparse, half-filled, full, installation, detail-only, comparison, not-applicable 建议出现在当前画面中的内容集合。
对输入图片原有背景、道具、包装或内容的处理要求。
本次请求的诊断编号。联系平台排查问题时请提供,不要记录 Public API Key。
"req_550e8400-e29b-41d4-a716-446655440000"

