关于 daVinci-MagiHuman
daVinci-MagiHuman 是 Sand.ai 与 SII-GAIR 推出的开源模型,可以同时生成画面和声音:给台词加上引号,画面中的人物就会把它说出来。它可以根据提示词或起始照片生成 5 到 10 秒的片段,分辨率为 256p、720p 或 1080p,画面比例为 16:9 或 9:16。
在 POST /jobs/createTask 里把模型名写成 sand-ai/davinci-magihuman/text-to-video 即可调用,US$0.12 起。
请求参数
| 参数 | 必填 | 说明 |
|---|---|---|
aspect_ratio | 否 | 画面形状:横版、方形或竖版。 16:9 · 9:16 · 默认值: 16:9 |
duration_seconds | 否 | 视频时长,按秒计费。 ≥ 5 · ≤ 10 · 默认值: 5 |
prompt | 是 | What happens, and in quotes what the person says. The model speaks quoted lines itself. |
resolution | 否 | 输出尺寸。越大越清晰,价格也越高。 256p · 720p · 1080p · 默认值: 720p |
seed | 否 | 用同一个数字,结果就能复现。 ≥ 0 · ≤ 2147483647 |
价格
价格以美元计。API 使用独立的美元余额。网站积分不能用于 API,也不能转入 API 余额;API 余额同样不能转为网站积分。 任务受理时,从 API 余额中冻结报价的最高金额;完成后按实际用量结算,实扣不超过冻结额,并释放剩余金额。任务失败则释放冻结额。
| 选项 | USD /秒 |
|---|---|
| resolution 256p | US$0.024 |
| resolution 720p | US$0.048 |
| resolution 1080p | US$0.072 |
运行前,将相同请求体发送到 POST /jobs/quote,可查看预计费用和最高费用,单位为美元。报价不会运行任务或扣款。
API 快速上手
三步调用 daVinci-MagiHuman API
- 创建 API 密钥. 登录 PopNow,在 API 控制台创建密钥。密钥以 sk-popnow- 开头,API 调用使用独立的美元余额。
- 发送请求. 向 POST /jobs/createTask 发请求,model 填 sand-ai/davinci-magihuman/text-to-video,input 按参数表填写。响应会立刻返回任务 ID。
- 取回结果. 用任务 ID 轮询 GET /jobs/recordInfo,或者传 callBackUrl,结果会推送到这个地址。任务成功后下载输出链接。
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-d '{
"model": "sand-ai/davinci-magihuman/text-to-video",
"input": {
"prompt": "A slow aerial shot drifting over a misty pine forest at sunrise",
"aspect_ratio": "16:9",
"resolution": "720p",
"duration_seconds": 5
}
}'
# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $POPNOW_API_KEY"请把提示词和链接换成你自己的。API 页签里有响应、轮询和回调的参考。
daVinci-MagiHuman API 常见问题
daVinci-MagiHuman API 怎么收费?
daVinci-MagiHuman:最便宜的任务是生成视频,US$0.12/ 5 秒视频起。各选项价格:256p US$0.024/秒、720p US$0.048/秒、1080p US$0.072/秒。API 使用独立的美元余额。网站积分不能用于 API,也不能转入 API 余额;API 余额同样不能转为网站积分。 任务受理时,从 API 余额中冻结报价的最高金额;完成后按实际用量结算,实扣不超过冻结额,并释放剩余金额。任务失败则释放冻结额。
daVinci-MagiHuman 在 API 里的调用名是什么?
在 POST /jobs/createTask 的 model 字段里填 生成视频用 sand-ai/davinci-magihuman/text-to-video;图生视频用 sand-ai/davinci-magihuman/image-to-video。
daVinci-MagiHuman API 有哪些限制?
视频时长:5–10 s;分辨率:256p · 720p · 1080p;画面比例:16:9 · 9:16;提示词长度(字符):5,000。超出这些限制的请求会在扣费之前被拒绝。
不写代码能试 daVinci-MagiHuman 吗?
无需 API 密钥,即可在 Playground 用 API 美元余额运行 daVinci-MagiHuman。每次运行记入开发者历史,并附对应代码。