跳轉到主要內容
POST
cURL
使用 POST /motion-control/{model} 以參考影片中的動作為角色圖片製作動畫。此請求會建立非同步任務。

選擇模型

請將角色圖片和參考影片設為可公開存取的 URL。將 settings.audio 設為 original 以保留參考影片的音訊,或設為 off 以產生無聲輸出。 圖片必須為 JPG 或 PNG,大小不得超過 50 MB,且每個邊緣至少為 300 像素。請使用長度至少 3 秒且大小不超過 100 MB 的 MP4 或 MOV 參考影片。使用 character_orientation: image 時,影片最長可為 10 秒;使用 video 時,最長可為 30 秒。

請求參數

若要為角色圖片製作動畫,請將此請求主體傳送至 POST /motion-control/kling-2.6。使用自己的角色和動作時,請將媒體 URL 替換為您自己可存取的檔案:
回應會傳回非同步任務的 id:
將 data.id 值用於 取得 Kling 任務 直到任務完成。從任務的 outputs 陣列讀取已完成影片的 URL。若需要長期存取,請將影片儲存在您自己的儲存空間中。 OpenAPI 面板包含對應的 Shell、Python 和 JavaScript 請求。如需更多輸入詳細資料,請參閱 Kling 動作控制 API 參考文件.

授權

Authorization
string
header
必填

Authenticate with your CometAPI API key.

路徑參數

model
enum<string>
必填

Kling motion-control model ID.

可用選項:
kling-3.0,
kling-2.6

主體

application/json

Motion-control request fields exposed by the CometAPI route. The model ID is a path parameter, not a body field.

contents
object[]
必填

Send a character image and motion reference video. Add a prompt item for scene guidance.

Minimum array length: 2
settings
object
必填

Output resolution, reference orientation, and explicitly selected audio behavior.

options
object

Optional task fields exposed by the CometAPI route.

回應

200 - application/json

Task created. Store data.id for a GET /tasks query.

code
必填

Result code. 0 indicates task creation.

message
string
必填

Result message.

data
object
必填

Task identification and submission status.

msg
string

Additional result message, when included.

最後修改於 2026年9月25日