AI 任務是非同步的。當功能支援 webhook 時,請優先使用以 webhook 為基礎的完成處理。設定您的 webhook 端點、驗證 webhook 簽章,並在收到 success 或 error 通知後,使用收到的 task_id 查詢任務結果。設定與驗證細節請見 webhook 整合指南。
若您的整合不支援 webhook 或無法使用 webhook,請實作輪詢。送出 AI 任務後,以固定間隔(例如每 10 秒)輪詢狀態端點,直到任務狀態為 success 或 error。
安全
BearerAuthenticationV2
描述影片內容與視覺風格的文字提示。 支援中文與英文。每個字或字母計為一個字元。
示例:"A kitten running in the moonlight."
負面提示,描述要從影片中排除的內容,以約束輸出。 支援中文與英文。
示例:"low resolution, error, worst quality, low quality, disfigured, extra fingers, bad proportions."
生成影片的長寬比。
各長寬比的輸出影片解析度(width*height)見下表:
| 解析度等級 | 長寬比 | 輸出影片解析度(width*height) |
|---|---|---|
| 720P | 16:9 | 1280*720 |
| 720P | 9:16 | 720*1280 |
| 720P | 1:1 | 960*960 |
| 720P | 4:3 | 1104*832 |
| 720P | 3:4 | 832*1104 |
| 1080P | 16:9 | 1920*1080 |
| 1080P | 9:16 | 1080*1920 |
| 1080P | 1:1 | 1440*1440 |
| 1080P | 4:3 | 1648*1248 |
| 1080P | 3:4 | 1248*1648 |
默认值:"16:9"
Enum:"16:9""9:16""1:1""4:3""3:4"
示例:"16:9"
- https://yce-api-01.makeupar.comhttps://yce-api-01.makeupar.com/s2s/v2.0/task/text-to-video/youcam
curl -i -X POST \
https://yce-api-01.makeupar.com/s2s/v2.0/task/text-to-video/youcam \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"model": "youcam-video-v2",
"prompt": "A kitten running in the moonlight.",
"negative_prompt": "low resolution, error, worst quality, low quality, disfigured, extra fingers, bad proportions.",
"resolution": "1080P",
"ratio": "16:9",
"dst_duration": 5,
"prompt_extend": true
}'响应
{ "status": 200, "data": { "task_id": "grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe" } }