外观
AI Short
选择短视频模板,将模板人物替换为上传照片中的人物。
http
POST /v1/videos/short先调用 GET /v1/templates?capability=video.short 获取模板。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
template_id | string | 是 | 官方或自己的 AI Short 模板 ID |
face | string | 是 | 清晰正脸图片 URL 或 base64 |
webhook_url | string | 否 | 完成回调地址 |
bash
curl -X POST https://api.modelgo.moneygo.ai/v1/videos/short \
-H "Authorization: Bearer sk-你的Key" \
-H "Idempotency-Key: short-order-1001" \
-H "Content-Type: application/json" \
-d '{"template_id":"short_1","face":"https://example.com/face.jpg"}'自定义 AI Short 模板
自定义模板只对当前账号可见。创建后返回 ushort_ 开头的 ID,可直接作为生成接口的 template_id。
| 方法 | 接口 | 说明 |
|---|---|---|
| GET | /v1/short-templates | 列出自己的模板 |
| POST | /v1/short-templates | 创建模板 |
| PATCH | /v1/short-templates/{id} | 修改 name、target_url、cover_url 或 duration |
| DELETE | /v1/short-templates/{id} | 删除模板,成功返回 204 |
bash
# 创建模板
curl -X POST https://api.modelgo.moneygo.ai/v1/short-templates \
-H "Authorization: Bearer sk-你的Key" \
-H "Content-Type: application/json" \
-d '{
"name":"我的短视频",
"target_url":"https://example.com/template.mp4",
"cover_url":"https://example.com/cover.jpg",
"duration":5
}'
# 返回的 ushort_xxx 可直接生成
curl -X POST https://api.modelgo.moneygo.ai/v1/videos/short \
-H "Authorization: Bearer sk-你的Key" \
-H "Content-Type: application/json" \
-d '{"template_id":"ushort_xxx","face":"https://example.com/face.jpg"}'target_url 必须是生成服务可访问的公开视频地址;cover_url 只用于展示。
