Kling Motion Control

Transfer motion from a reference video onto a character image using Kling AI's motion control feature. Perfect for character animation and video face swaps.

POST
/api/v1/models/kling

Apply motion from a reference video to a character image

Processing
Async (Job-based)
Cost
40 credits/video
Max Duration
30 seconds
This is an async endpoint. It returns a job ID immediately. Poll /api/v1/jobs/{jobId} to check status and get the result.

Request Body

NameTypeDescription
image_urlrequiredstringURL to the character image to animate
video_urlrequiredstringURL to the reference motion video (max 30 seconds)
promptrequiredstringDescriptive text to guide the animation
character_orientationstringDefault: videoMatch output orientation to 'image' or 'video'
keep_original_soundbooleanDefault: truePreserve audio from the reference video

Character Orientation

video (recommended)
Output character orientation matches the reference video. Best for character swaps where you want the output to follow the video's framing.
image
Output character orientation matches the input image. Use when the image has a specific pose you want to preserve.

Example Request

"text">-purple-600">curl "text-blue-600">-X POST https://vydra.ai/api/v1/models/kling \
  "text-blue-600">-H "Authorization: Bearer YOUR_API_KEY" \
  "text-blue-600">-H "Content">-Type: application/json" \
  "text-blue-600">-d '{
    "image_url": "https://example.com/character.jpg",
    "video_url": "https://example.com/dance">-reference.mp4",
    "prompt": "A person dancing energetically in a studio",
    "character_orientation": "video",
    "keep_original_sound": true
  }'

Initial Response (202 Accepted)

{
  "jobId": "550e8400-e29b-41d4-a716-446655440000",
  "status": "pending",
  "message": "Motion control job created. Poll /api/v1/jobs/{jobId} for status.",
  "creditsCharged": 40,
  "externalJobId": "fal-xyz789",
  "input": {
    "image_url": "https://example.com/character...",
    "video_url": "https://example.com/dance-ref...",
    "character_orientation": "video"
  }
}

Completed Job Response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "completed",
  "output": {
    "videoUrl": "https://cdn.vydra.ai/videos/kling/org_123/output.mp4",
    "durationSeconds": 15
  },
  "createdAt": "2024-01-26T12:00:00.000Z",
  "completedAt": "2024-01-26T12:04:00.000Z"
}

Best Practices

📸 Image Requirements
Use a clear, well-lit image of the character. Front-facing or 3/4 view works best. Avoid images with multiple people.
🎬 Reference Video Tips
Keep videos under 30 seconds. Use videos with clear, visible motion. Single-person videos produce the best results.
📝 Prompt Guidelines
Describe the scene and action clearly. Include details about the setting, lighting, and movement style.
⏱️ Processing Time
Motion control typically takes 2-5 minutes depending on video length. Poll every 10 seconds for status updates.

Use Cases

🎭 Character Animation
Bring illustrated characters to life with realistic motion.
💃 Dance Videos
Apply dance choreography to any character or avatar.
🎬 Virtual Actors
Create videos with AI-generated or custom characters.
🎮 Game Assets
Generate animated content for games and virtual worlds.