外观
AI Shoot
选择写真模板,将上传照片中的人物换入写真场景。
http
POST /v1/images/shoot先调用 GET /v1/templates?capability=image.shoot 获取模板。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
template_id | string | 是 | 官方或自己的 AI Shoot 模板 ID |
face | string | 是 | 清晰正脸图片 URL 或 base64 |
webhook_url | string | 否 | 完成回调地址 |
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} | 修改 name、target_url 或 cover_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 只用于展示。
