Skip to main content
This page provides complete, runnable examples for all video generation use cases. All examples are from the actual source repository.

Prerequisites

All examples assume you have:
And set your API key:

Text-to-Video

Generate videos from text prompts using lucy-pro-t2v.

Basic Example

Source: examples/tasks/video-generation-t2v.ts

With All Settings

Batch Generation

Image-to-Video

Animate images into videos using lucy-pro-i2v or lucy-dev-i2v.

Basic Example

Source: examples/tasks/video-generation-i2v.ts

From File

From URL

Development vs Production

Motion Control

Control camera and subject movement with lucy-motion.

Basic Trajectory

Source: examples/tasks/video-generation-motion.ts

Horizontal Pan

Circular Motion

Complex Path

Advanced Patterns

Error Handling

With Abort Signal

Progress Tracking

Custom Provider Instance

TypeScript Types

Example with full type safety:

Next Steps

View All Models

Explore model specifications

Settings Reference

View all configuration options

Motion Control Guide

Learn trajectory-based generation

Overview

Back to video generation overview