Operation
Generate Smart Motion
Apply camera-driven smart motion to an image or video source.
Operation: smartmotion.generate
Submit via POST /api/v1/requests
Credits: dynamic
Request fields
file_urlfile_namecontent_typedurationmotionmotion_scalecontrol_modepromptnegative_promptcamera_control
Example request
{
"operation": "smartmotion.generate",
"input": {
"file_url": "https://example.com/start-frame.jpg",
"file_name": "start-frame.jpg",
"content_type": "image/jpeg",
"duration": 6,
"control_mode": "camera_control",
"prompt": "Slow cinematic push in with subtle parallax.",
"camera_control": {
"pan": 0,
"tilt": 0,
"roll": 0,
"zoom": 18,
"horizontal": 0,
"vertical": 0
}
}
}curl -X POST https://www.cannonstudio.app/api/v1/requests \
-H "Content-Type: application/json" \
-H "x-api-key: $CANNON_API_KEY" \
-H "x-idempotency-key: smartmotion-generate-001" \
-d @- <<'JSON'
{
"operation": "smartmotion.generate",
"input": {
"file_url": "https://example.com/start-frame.jpg",
"file_name": "start-frame.jpg",
"content_type": "image/jpeg",
"duration": 6,
"control_mode": "camera_control",
"prompt": "Slow cinematic push in with subtle parallax.",
"camera_control": {
"pan": 0,
"tilt": 0,
"roll": 0,
"zoom": 18,
"horizontal": 0,
"vertical": 0
}
}
}
JSONNotes
- Applies smart motion to either an image or video source.
- Supports both preset motion and direct camera control payloads.
- The request object resolves when the finished hosted motion clip is ready.
Success output
{
"task_id": "sm_123",
"asset_type": "video",
"status": "succeeded",
"video_url": "https://storage.googleapis.com/.../smart-motion.mp4",
"provider": "kling",
"model": "smart_motion"
}