Motion Control API Usage

  • Method: POST
  • Path: /v1/common_task/motion_control/task/submit
  • Headers: Topview-Uid, Authorization

Request

{
  "model": "Kling Motion Control Std V3",
  "characterImageFileId": "file_image_123",
  "motionReferenceVideoFileId": "file_video_456",
  "prompt": "Let the character follow the same dance motion.",
  "resolution": 720,
  "characterOrientation": "video",
  "keepOriginalSound": true,
  "boardId": "board_xxx",
  "noticeUrl": "https://example.com/topview/callback"
}

Supported Models

Model Name (value for model field)Supported ResolutionCredit Rate
Kling Motion Control Pro V310801.0 credit/s
Kling Motion Control Std V37200.8 credit/s
Kling Motion Control Pro10800.5 credit/s
Kling Motion Control Std7200.31 credit/s

Note: The resolution value must match the model. Pro models require 1080; Std models require 720. A mismatch returns a parameter error.

Credit Deduction

Credits are deducted only when the task succeeds, based on the actual duration of the output video. Failed tasks are not charged.

Formula:

Credits consumed = Credit rate (credits/s) × Output video duration (s)

Examples (assuming a 5-second output video):

ModelCredit RateExample DurationCredits Consumed
Kling Motion Control Pro V31.0 credit/s5s5.0 credits
Kling Motion Control Std V30.8 credit/s5s4.0 credits
Kling Motion Control Pro0.5 credit/s5s2.5 credits
Kling Motion Control Std0.31 credit/s5s1.55 credits

The costCredit field in the query response shows the actual credits consumed for the task. outputDuration is the output video duration in milliseconds.

Parameters

FieldTypeRequiredDescription
modelStringYesDisplay model name. See the Supported Models table above.
characterImageFileIdStringYesCharacter image fileId (jpg/jpeg/png only)
motionReferenceVideoFileIdStringYesMotion reference video fileId (mp4/mov only)
promptStringNoPositive prompt
resolutionIntegerYesResolution: 720 for Std models, 1080 for Pro models
characterOrientationStringNoCharacter orientation in the output: video (follow reference video pose) / image (follow reference image pose), default video
keepOriginalSoundBooleanNoWhether to keep the original audio from the reference video, default true
boardIdStringNoBoard ID
noticeUrlStringNoTask completion callback URL

Validation Rules

  • Both the character image and reference video are validated via FFmpeg media parsing asynchronously after upload. Validation failure sets the task status to fail immediately.
  • Image constraints: format jpg/jpeg/png; width and height both in 300~65536; aspect ratio (short side / long side) in 0.4~2.5.
  • Video constraints: format mp4/mov; width and height both in 340~3850; duration 3~30s.
  • When characterOrientation=image, video duration is additionally limited to <=10s.

Response

{
  "code": "200",
  "message": "Success",
  "result": {
    "taskId": "a1b2c3d4e5",
    "status": "success",
    "boardId": "board_xxx"
  }
}

  • Method: GET
  • Path: /v1/common_task/motion_control/task/query
  • Headers: Topview-Uid, Authorization

Query Parameters

ParameterTypeRequiredDescription
taskIdStringYesTask ID returned by submit API
needCloudFrontUrlBooleanNoWhether to return CloudFront URL, default false

Response

{
  "code": "200",
  "message": "Success",
  "result": {
    "taskId": "a1b2c3d4e5",
    "status": "success",
    "costCredit": 1.24,
    "outputVideoFileId": "file_out_video_123",
    "outputCoverFileId": "file_out_cover_456",
    "outputVideoUrl": "https://cdn.example.com/video.mp4",
    "outputCoverUrl": "https://cdn.example.com/cover.jpg",
    "outputWidth": 720,
    "outputHeight": 1280,
    "outputDuration": 5000
  }
}

Status Enum

StatusMeaning
initSubmitted, waiting for processing
runningProcessing (unfinished tasks are normalized to running)
successCompleted successfully
failFailed (check errorMsg)