SHAPES
两种都能过的衣橱形状
virtual_try_on · cloth_items
{
"user_id": "user-1",
"language": "zh-CN",
"cloth_items": [
{
"id": "cloth-1",
"id_type": "cloth",
"name": "白色宽松衬衫",
"category_id": "tops.shirts",
"desc": "棉质,宽松廓形",
"color": "白色"
}
]
}
Sibyl / Prism · wardrobe
{
"user_id": "user-1",
"language": "zh-CN",
"wardrobe": [
{
"cloth_id": "cloth-2",
"name": "黑色直筒裤",
"category": "bottoms.pants",
"description": "深色直筒西裤"
}
]
}
异步任务
curl -s -X POST http://127.0.0.1:18731/api/analyze \
-H 'Content-Type: application/json' \
-d '{"user_id":"user-1","wardrobe":[{"item_id":"c1","name":"白衬衫","category":"tops.shirts"}]}'
curl -s http://127.0.0.1:18731/api/tasks/{task_id}
任务接口返回 task_id / status / l2x(用户视角)/ wardrobe_style(衣橱视角)/ l2_detail(两种视角均产出)/ error。运行中或失败时摘要字段为 null。完整结果走流式接口。
流式分析
curl -N -X POST http://127.0.0.1:18731/api/analyze/stream \
-H 'Content-Type: application/json' \
-d '{"user_id":"user-1","cloth_items":[{"id":"c1","category_id":"tops.shirts","desc":"棉质白衬衫"}]}'
响应是 application/x-ndjson。每行一个事件:stage → stage_done → result;失败时 type=error。
L2-detail · 搭配规划资产摘要
完整结果中的 inferred_profile.l2_detail 按整体轮廓、色彩、材质、版型与设计单品、叠穿、鞋包配饰、搭配方向组织。中文软目标 1500–2500 字。读取所有单品及描述,包含无风格标签衣物和鞋包配饰,不从风格总览扩写。
细节整理按最多 30 组证据或约 18,000 字符分批,单条超长证据独占批次且不截断。流式阶段新增 detail_inventory_1…N → l2_detail。下游可直接使用 injection_sections 中 block=l2_detail 的 standard;规划后仍需检索并验证具体单品组合。