PopNowAPI
取得 API 金鑰

daVinci-MagiHuman API

Sand.ai 出品

給臺詞加上引號,畫面中的人就會把它說出來

sand-ai/davinci-magihuman/text-to-video
  • 最高 1080p
  • 5–10 秒
  • 生成影片
  • 圖生影片

關於 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 256pUS$0.024
resolution 720pUS$0.048
resolution 1080pUS$0.072

執行前,將相同請求內容傳送至 POST /jobs/quote,即可查看預估費用與最高費用,單位為美元。報價不會執行任務或扣款。

API 快速上手

三步驟呼叫 daVinci-MagiHuman API

  1. 建立 API 金鑰. 登入 PopNow,在 API 主控台建立金鑰。金鑰以 sk-popnow- 開頭,API 呼叫使用獨立的美元餘額。
  2. 送出請求. 對 POST /jobs/createTask 送出請求,model 填 sand-ai/davinci-magihuman/text-to-video,input 依照參數表填寫。回應會立即傳回任務 ID。
  3. 取得結果. 用任務 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。每次執行都記入開發者紀錄,並附對應程式碼。

更多 daVinci-MagiHuman 相關內容