Skip to main content

generate_video()

Generate a video from text prompt with optional image URL.
Mode 2: Generate from image URL in prompt:
Mode 3: Animate existing image:
Parameters:
  • prompt (String): Video prompt or “[image_url] prompt text” (1-8192 characters)
  • job_id (String, optional): Original image job ID (for image animation mode)
  • image_no (Integer, optional): Image index (0-3) (for image animation mode)
  • video_type (Integer, optional): Quality (0=480p, 1=720p)
  • callback (String, optional): Webhook URL
Returns: Response with job_id and status

extend_video()

Extend an existing video.
Parameters:
  • job_id (String): Original video task ID
  • video_no (Integer): Video index (0-3)
  • prompt (String, optional): Extension prompt (1-8192 characters)
  • callback (String, optional): Webhook URL
Returns: Response with job_id and status

upscale_video()

Upscale video to higher resolution.
Parameters:
  • job_id (String): Original video task ID
  • video_no (Integer): Video index (0-3)
  • callback (String, optional): Webhook URL
Returns: Response with job_id and status

Complete Example


Error Handling


Retry Logic


Asynchronous Processing with Threads


Next Steps