Documentation

API Documentation

Wanx 2.1 - Advanced Controls

Advanced video generation with keyframe control and camera movement

img2video-14b-keyframe
$0.28

Generate videos from first and last frames with precise control over the animation sequence.

Start Frame + End Frame → Video
img2video-14b-control-camera
$0.28

Generate videos with precise camera movement control including zoom, pan, and rotation.

Image + Camera Control → Video
Quick Start
1

Base URL

https://api.qubico.ai/v1/task
2

Header Params

X-API-Key: YOUR_API_KEY
3

Model ID

Qubico/wanx
Parameters Reference

Complete parameter documentation for advanced video controls

Required
model
string

The model identifier for Wanx video generation

"Qubico/wanx"
task_type
string

The advanced control task type

"img2video-14b-keyframe" | "img2video-14b-control-camera"
prompt
string

Description of the video content and motion

"the woman's eyes turn red"
Task-Specific
start_image
string
keyframe only

First frame image URL or base64

"https://your-image.com/start.jpg"
end_image
string
keyframe only

Last frame image URL or base64

"https://your-image.com/end.jpg"
image
string
camera control only

Input image URL or base64 for camera control

"https://i.ibb.co/wbw9GLY/girl.webp"
control_camera_settings
array
camera control only

Camera movement configuration

motion_typeCamera movement type
motion_speedMovement speed (default: 0.2)
Optional
negative_prompt
string

Description of what to avoid

"chaotic, distortion, morphing, blurred details"
aspect_ratio
string

Video aspect ratio (default: "16:9")

"16:9" | "9:16"
Camera Motion Types

zoom_in

Camera gradually zooms into the subject

Best for: Close-up reveals, dramatic emphasis

zoom_out

Camera gradually zooms out from the subject

Best for: Revealing context, establishing shots

pan_left

Camera pans horizontally to the left

Best for: Following movement, revealing scenes

pan_right

Camera pans horizontally to the right

Best for: Following movement, revealing scenes

static

Camera remains stationary (default)

Best for: Focus on subject motion, stable shots

Motion Speed Guidelines

  • 0.1-0.2: Very slow, subtle movement
  • 0.2-0.5: Moderate, natural movement
  • 0.5-1.0: Fast, dynamic movement
  • Default: 0.2 (recommended)

Best Practices

  • • Only one motion type per generation
  • • Start with default speed (0.2)
  • • Match motion to content context
  • • Use static for subject-focused videos
Code Examples

Keyframe Control Request

{
  "model": "Qubico/wanx",
  "task_type": "img2video-14b-keyframe",
  "input": {
    "prompt": "A girl with a playful smile leans forward on the ferry railing, holding onto her sunhat as the wind threatens to carry it away. She looks directly at the camera with bright, excited eyes, her laughter almost visible in her expression. The sun reflects off the sparkling water, and behind her, the coastline of a charming island town approaches. The camera slowly zooms out, capturing the anticipation of arrival.",
    "negative_prompt": "Overexposure, static, blurred details, subtitles, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, mutilated, redundant fingers, poorly painted hands, poorly painted faces, deformed, disfigured, deformed limbs, fused fingers, three legs",
    "aspect_ratio": "16:9",
    "start_image": "https://your-image.com/start.jpg",
    "end_image": "https://your-image.com/end.jpg"
  },
  "config": {
    "webhook_config": {
      "endpoint": "https://your-webhook.com/callback",
      "secret": "your_webhook_secret"
    }
  }
}
Response Format

Success Response

{
  "request_id": "req_abc123def456",
  "status": "processing",
  "eta": 45,
  "message": "Request submitted successfully"
}

Webhook Response

{
  "request_id": "req_abc123def456",
  "status": "completed",
  "output": {
    "video_url": "https://storage.qubico.ai/videos/generated_video.mp4",
    "duration": 5.0,
    "fps": 24,
    "resolution": "1280x720"
  },
  "metadata": {
    "processing_time": 42.3,
    "model_version": "wanx-2.1",
    "task_type": "img2video-14b-control-camera"
  }
}
Best Practices

Keyframe Control Tips

  • • Use similar composition between start and end frames
  • • Ensure consistent lighting and style
  • • Keep subject positioning logical for smooth transition
  • • Avoid dramatic perspective changes
  • • Test with simple transformations first

Camera Control Tips

  • • Start with moderate motion speeds (0.2-0.3)
  • • Match camera movement to scene context
  • • Use static for subject-focused content
  • • Consider aspect ratio when choosing pan direction
  • • Test different speeds for optimal results