Skip to content

AI Shoot

选择写真模板,将上传照片中的人物换入写真场景。

http
POST /v1/images/shoot

先调用 GET /v1/templates?capability=image.shoot 获取模板。

参数类型必填说明
template_idstring官方或自己的 AI Shoot 模板 ID
facestring清晰正脸图片 URL 或 base64
webhook_urlstring完成回调地址
bash
curl -X POST https://api.modelgo.moneygo.ai/v1/images/shoot \
  -H "Authorization: Bearer sk-你的Key" \
  -H "Idempotency-Key: shoot-order-1001" \
  -H "Content-Type: application/json" \
  -d '{"template_id":"shoot_1","face":"https://example.com/face.jpg"}'

自定义 AI Shoot 模板

自定义模板只对当前账号可见。创建后返回 ushoot_ 开头的 ID,可直接作为生成接口的 template_id

方法接口说明
GET/v1/shoot-templates列出自己的模板
POST/v1/shoot-templates创建模板
PATCH/v1/shoot-templates/{id}修改 nametarget_urlcover_url
DELETE/v1/shoot-templates/{id}删除模板,成功返回 204
bash
# 创建模板
curl -X POST https://api.modelgo.moneygo.ai/v1/shoot-templates \
  -H "Authorization: Bearer sk-你的Key" \
  -H "Content-Type: application/json" \
  -d '{
    "name":"我的写真",
    "target_url":"https://example.com/shoot.jpg",
    "cover_url":"https://example.com/cover.jpg"
  }'

# 返回的 ushoot_xxx 可直接生成
curl -X POST https://api.modelgo.moneygo.ai/v1/images/shoot \
  -H "Authorization: Bearer sk-你的Key" \
  -H "Content-Type: application/json" \
  -d '{"template_id":"ushoot_xxx","face":"https://example.com/face.jpg"}'

target_url 必须是生成服务可访问的公开图片地址;cover_url 只用于展示。