VercelLogotypeVercelLogotype
LoginSign Up
Back to Templates

Fal Video Generator

A Next.js app showcasing AI video generation with the fal SDK.

DeployView Demo
Contentful thumbnail for Video Generation Page Template by fal.ai

AI Video Generator

A Next.js application that demonstrates the power of the fal.ai SDK for AI-powered video generation. This project showcases how to use fal's queue management system and proxy setup to create animated videos from static images.

fal.ai is a serverless platform for running AI models at scale.

Features

  • Upload static images and animate them using AI
  • Real-time progress tracking and status updates
  • Queue management for handling long-running video generation tasks
  • Secure proxy setup for fal.ai API calls
  • Modern, responsive UI built with Next.js and Tailwind CSS

Technology Stack

  • Next.js - React framework for production
  • fal.ai SDK - AI model deployment and inference platform
  • Tailwind CSS - Utility-first CSS framework
  • TypeScript - Type-safe JavaScript

Getting Started

  1. Clone the repository

  2. Install dependencies:

    npm install
    # or
    yarn install
    # or
    pnpm install
  3. Set up your environment variables:

    • Copy .env.example to .env.local:
      cp .env.example .env.local
    • Update the FAL_KEY in .env.local with your fal.ai API key
  4. Run the development server:

    npm run dev
    # or
    yarn dev
    # or
    pnpm dev
  5. Open http://localhost:3000 with your browser to see the application.

Project Structure

  • app/components/VideoGenerator.tsx - Main component handling video generation
  • app/api/fal/proxy/route.ts - API route for proxying fal.ai requests
  • app/page.tsx - Main page component

How It Works

  1. Image Upload: Users can upload a static image through the web interface
  2. Prompt Input: Users provide a text prompt describing how they want the image to be animated
  3. Queue Management: The application uses fal.ai's queue system to handle video generation:
    • Submits the generation task to the queue
    • Polls for status updates
    • Retrieves the final video when complete
  4. Proxy Setup: All fal.ai API calls are proxied through a secure API route to protect API keys

API Routes

The project includes a proxy route (/api/fal/proxy) that securely forwards requests to fal.ai, keeping your API keys private on the server side.

Learn More

  • fal.ai Documentation
  • Next.js Documentation
  • Tailwind CSS Documentation

License

MIT

GitHub Repofal-ai-community/video-generator-demo
LicenseView License
Use Cases
AI
Stack
Next.jsTailwind

Related Templates

Get Started

  • Templates
  • Supported frameworks
  • Marketplace
  • Domains

Build

  • Next.js on Vercel
  • Turborepo
  • v0

Scale

  • Content delivery network
  • Fluid compute
  • CI/CD
  • Observability
  • AI GatewayNew
  • Vercel AgentNew

Secure

  • Platform security
  • Web Application Firewall
  • Bot management
  • BotID
  • SandboxNew

Resources

  • Pricing
  • Customers
  • Enterprise
  • Articles
  • Startups
  • Solution partners

Learn

  • Docs
  • Blog
  • Changelog
  • Knowledge Base
  • Academy
  • Community

Frameworks

  • Next.js
  • Nuxt
  • Svelte
  • Nitro
  • Turbo

SDKs

  • AI SDK
  • Workflow SDKNew
  • Flags SDK
  • Chat SDK
  • Streamdown AINew

Use Cases

  • Composable commerce
  • Multi-tenant platforms
  • Web apps
  • Marketing sites
  • Platform engineers
  • Design engineers

Company

  • About
  • Careers
  • Help
  • Press
  • Legal
  • Privacy Policy

Community

  • Open source program
  • Events
  • Shipped on Vercel
  • GitHub
  • LinkedIn
  • X
  • YouTube

Loading status…

Select a display theme:
    • AI Cloud
      • v0

        Build applications with AI

      • AI SDK

        The AI Toolkit for TypeScript

      • AI Gateway

        One endpoint, all your models

      • Vercel Agent

        An agent that knows your stack

      • Sandbox

        AI workflows in live environments

    • Core Platform
      • CI/CD

        Helping teams ship 6× faster

      • Content Delivery

        Fast, scalable, and reliable

      • Fluid Compute

        Servers, in serverless form

      • Observability

        Trace every step

    • Security
      • Bot Management

        Scalable bot protection

      • BotID

        Invisible CAPTCHA

      • Platform Security

        DDoS Protection, Firewall

      • Web Application Firewall

        Granular, custom protection

    • Company
      • Customers

        Trusted by the best teams

      • Blog

        The latest posts and changes

      • Changelog

        See what shipped

      • Press

        Read the latest news

      • Events

        Join us at an event

    • Learn
      • Docs

        Vercel documentation

      • Academy

        Linear courses to level up

      • Knowledge Base

        Find help quickly

      • Community

        Join the conversation

    • Open Source
      • Next.js

        The native Next.js platform

      • Nuxt

        The progressive web framework

      • Svelte

        The web’s efficient UI framework

      • Turborepo

        Speed with Enterprise scale

    • Use Cases
      • AI Apps

        Deploy at the speed of AI

      • Composable Commerce

        Power storefronts that convert

      • Marketing Sites

        Launch campaigns fast

      • Multi-tenant Platforms

        Scale apps with one codebase

      • Web Apps

        Ship features, not infrastructure

    • Tools
      • Marketplace

        Extend and automate workflows

      • Templates

        Jumpstart app development

      • Partner Finder

        Get help from solution partners

    • Users
      • Platform Engineers

        Automate away repetition

      • Design Engineers

        Deploy for every idea

  • Enterprise
  • Pricing
Log InContact
Sign Up
Sign Up
Back to Templates
This template is unavailable

Chatbot

A full-featured, hackable Next.js AI chatbot built by Vercel
Chatbot

Fal Image Generator

An open-source AI image generator built with Next.js, the AI SDK, and Fal.
Fal Image Generator

Vercel x DeepInfra Chatbot

An open-source AI chatbot built with Next.js, the AI SDK, and DeepInfra.
Vercel x DeepInfra Chatbot
v0

Build applications with AI

AI SDK

The AI Toolkit for TypeScript

AI Gateway

One endpoint, all your models

Vercel Agent

An agent that knows your stack

Sandbox

AI workflows in live environments

CI/CD

Helping teams ship 6× faster

Content Delivery

Fast, scalable, and reliable

Fluid Compute

Servers, in serverless form

Observability

Trace every step

Bot Management

Scalable bot protection

BotID

Invisible CAPTCHA

Platform Security

DDoS Protection, Firewall

Web Application Firewall

Granular, custom protection

Customers

Trusted by the best teams

Blog

The latest posts and changes

Changelog

See what shipped

Press

Read the latest news

Events

Join us at an event

Docs

Vercel documentation

Academy

Linear courses to level up

Knowledge Base

Find help quickly

Community

Join the conversation

Next.js

The native Next.js platform

Nuxt

The progressive web framework

Svelte

The web’s efficient UI framework

Turborepo

Speed with Enterprise scale

AI Apps

Deploy at the speed of AI

Composable Commerce

Power storefronts that convert

Marketing Sites

Launch campaigns fast

Multi-tenant Platforms

Scale apps with one codebase

Web Apps

Ship features, not infrastructure

Marketplace

Extend and automate workflows

Templates

Jumpstart app development

Partner Finder

Get help from solution partners

Platform Engineers

Automate away repetition

Design Engineers

Deploy for every idea