跳转到内容

執行影像轉影片任務。

请求

這個端點啟動影像轉影片的轉換流程。您必須提供範本 ID 與來源檔案(透過網址或檔案 ID)。任務會以非同步方式處理,您可以使用這個回應回傳的 task_id 查詢其狀態。

安全
BearerAuthenticationV2
正文application/json必需
Any of:
template_idstring必需

範本的 ID。請先列出預先定義的範本,然後使用某個範本的 id。

示例:"good_template_001"
dst_durationinteger必需

影片長度,以秒計。僅接受 5 或 10 秒

Enum:510
modestring

品質模式。標準(std)模式速度較快,品質尚可。專業(pro)模式品質最佳,細節更豐富。若未提供,會依風格自動選擇最佳模式。

Enum:"std""pro"
src_file_urlstring必需

要執行任務的檔案網址。該網址應可公開存取。

示例:"https://example.com/selfie.jpg"
curl -i -X POST \
  https://yce-api-01.makeupar.com/s2s/v2.0/task/image-to-video \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "template_id": "good_template_001",
    "src_file_url": "https://example.com/selfie.jpg",
    "dst_duration": 5,
    "mode": "std"
  }'

响应

任務執行成功

正文application/json
statusinteger

回應狀態

示例:200
dataobject
响应
{ "status": 200, "data": { "task_id": "grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe" } }