YUYU_M6 全能參考影片

YUYU_M6 是全能參考影片模型:帶恰好 1 張參考圖,依 prompt 生成以參考圖角色為主角的全新畫面;duration 固定 5 秒、畫面比例跟隨參考圖、seed 選填,適合單一角色、規格固定的短片。

POST /api/tasks/reference2video
X-Api-Key: sk-live-xxxx
Content-Type: application/json
Idempotency-Key: 選填,見〈全能參考影片〉的說明

完整範例

images 只接受完整的 base64 data URI(png/jpeg/webp 三種 MIME 皆可),這裡為了範例簡短省略實際 base64 內容。duration 固定為 5,仍必須明確帶入:

curl -X POST https://example.com/api/tasks/reference2video \
  -H "X-Api-Key: sk-live-xxxx" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-20261001-00043" \
  -d '{
    "model": "YUYU_M6",
    "prompt": "she walks along the beach at sunset, the wind gently blowing her hair, cinematic",
    "negative_prompt": "blurry, low quality",
    "images": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."],
    "duration": 5,
    "seed": 1234567,
    "payload": { "external_order_id": "order-20261001-00043" },
    "callback_url": "https://example.com/webhooks/yuyu-video"
  }'

成功回 201 Created(任務剛建立時是待派工狀態,result/files 尚無內容;credits 是這次實際扣款的積分,下方範例的數字僅為示意,實際以平台設定為準):

{
  "public_id": "01K6A1B2C3D4E5F6G7H8J9K0LN",
  "type": 4,
  "status": 0,
  "credits": 10,
  "params": {
    "model": "YUYU_M6",
    "prompt": "she walks along the beach at sunset, the wind gently blowing her hair, cinematic",
    "negative_prompt": "blurry, low quality",
    "images": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."],
    "duration": 5,
    "seed": 1234567,
    "payload": { "external_order_id": "order-20261001-00043" },
    "callback_url": "https://example.com/webhooks/yuyu-video"
  },
  "error_code": null,
  "error_message": null,
  "created_at": "2026-10-01T08:00:00.000000Z",
  "finished_at": null,
  "files_expire_at": null,
  "files_expired": false,
  "files": []
}

之後如何查詢這筆任務的進度、任務完成後怎麼取得影片,見〈任務查詢與取件〉。

參數表

欄位 型別 必填 規則
model string 是 固定為 YUYU_M6
prompt string 是 最長 10000 字
negative_prompt string 否 負向提示詞,最長 500 字
images string[] 是 恰好 1 張參考圖(0 張或 2 張以上皆 422);完整 base64 data URI(data:image/{png|jpeg|webp};base64,...)
duration integer 是 固定 5(仍須明確帶入,送其他值 422)
seed integer 否 1–2147483647;不帶時每次隨機
payload object 否 你自訂的透傳資料——原樣存入,查詢任務與〈回呼(Webhook)〉都會原封不動帶回,系統本身不解讀內容
callback_url string 否 必須是 https:// 開頭的網址,最長 2000 字;見〈回呼(Webhook)〉
  • YUYU_M6 不採用 resolution、aspect_ratio、audio:輸出畫面比例跟隨參考圖,不需要也不建議帶這三個欄位(帶了不會改變輸出)。想要直式影片就給直式參考圖、想要橫式就給橫式參考圖。

帶入未知的 model 值會收到 422:Unknown model alias: {model}。

回應

成功建立回 201 Created(冪等命中既有任務則回 200 OK),內容是〈任務查詢與取件〉描述的任務物件,type 為 4;完成後 result 的鍵是 video。

錯誤情境

狀態碼 情境 內容
422 參數驗證失敗(缺必填、型別錯、images 不是恰好 1 張、duration 不是 5、seed 超出範圍等) Laravel 標準 errors 欄位驗證錯誤格式
422 model 值查無對應模型 { "message": "Unknown model alias: {model}" }
402 積分(付費餘額或試用額度剩餘額度)不足以支付這次建單費用 { "message": "Insufficient credits to complete this charge." }
429 你名下這個任務類型(全能參考影片)的待處理任務數已達上限 { "message": "Too many pending tasks of this type; please retry later." },回應帶 Retry-After header

實際會扣多少積分、建立後如何查詢進度與取得結果,見〈任務查詢與取件〉與〈積分與計費〉。