AI 照片背景更换//
- 执行 AI 照片背景更换 V2(V2) 任务。
列出预置的 AI 照片背景更换 V2 模板。
查询 AI 照片背景更换 V2(V2) 任务的状态。
执行 AI 照片背景更换 V2(V2) 任务。
AI 任务是异步处理的。功能支持 Webhook 时,优先用 Webhook 来接收完成通知。配置好您的 Webhook 端点、校验 Webhook 签名,收到 success 或 error 通知后,用收到的 task_id 查询任务结果。配置与校验的细节请见 Webhook 接入指南。
若功能不支持 Webhook,或您的接入方式用不了 Webhook,就请实现轮询。提交 AI 任务后,按固定间隔(例如每 10 秒)轮询状态接口,直到任务状态变为 success 或 error。
安全
BearerAuthenticationV2
Any of:
背景如何生成。取 prompt(默认)时,背景由 prompt 生成; 取 template 时,背景由 template_id 指定的预置模板生成, prompt 会被忽略。
说明: 若 type 设为 prompt 却未提供提示词、只给了 template_id,该 template_id 会被忽略,系统按默认配置处理。 同理,若 type 设为 template 但未提供 template_id,无论是否给了提示词,都会使用默认模板。
默认值:"prompt"
Enum:"prompt""template"
- https://yce-api-01.makeupar.comhttps://yce-api-01.makeupar.com/s2s/v2.0/task/bg-replace
curl -i -X POST \
https://yce-api-01.makeupar.com/s2s/v2.0/task/bg-replace \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"src_file_url": "https://example.com/selfie.jpg",
"type": "prompt",
"prompt": "A sunny beach with palm trees.",
"template_id": "nature_cherryblossom"
}'响应
{ "status": 200, "data": { "task_id": "grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe" } }