Framepack Image to Video

fal-ai/framepack
Framepack is an efficient Image-to-video model that autoregressively generates videos.
Inference
Commercial use

Input

Additional Settings

Customize your input with more control.

Result

Idle
This generation takes approximately 3m.

Your request will cost $0.0333 per second.

Logs

Readme

Framepack: Efficient Image-to-Video Generation

Transform static images into dynamic videos with Framepack, an advanced image-to-video model that autoregressively generates high-quality video content. Perfect for developers and creative professionals working with video production, content creation, and digital media.

Overview

Framepack is an efficient neural network that converts single images into compelling video sequences using text prompts to guide the generation process. The model generates videos frame-by-frame in an autoregressive manner, creating smooth motion and realistic video content from your input images.

Key Benefits

Create engaging video content with advanced AI capabilities:

  • Transform static images into dynamic video sequences
  • Generate videos up to 180 frames with customizable resolution
  • Control video generation with detailed text prompts
  • Support for multiple aspect ratios (16:9, 4:3, 1:1, 9:16, 3:4)
  • Commercial use allowed for generated content
  • Built-in safety checker for content moderation
Getting Started

Getting started with Framepack takes just a few minutes. First, install your preferred SDK:

For JavaScript/TypeScript:

bash
npm install --save @fal-ai/client

For Python:

bash
pip install fal-client

Configure your authentication:

javascript
import { fal } from "@fal-ai/client";
fal.config({
  credentials: "YOUR_FAL_KEY_HERE"
});
Basic Usage

Here's a simple example of image-to-video generation:

javascript
import { fal } from "@fal-ai/client";

const result = await fal.subscribe("fal-ai/framepack", {
  input: {
    prompt: "A mesmerising video of a deep sea jellyfish moving through an inky-black ocean. The jellyfish glows softly with an amber bioluminescence.",
    image_url: "https://your-image-url.com/image.jpg",
    aspect_ratio: "16:9",
    resolution: "480p",
    num_frames: 180
  }
});

console.log(result.data.video.url);
Advanced Configuration

Framepack offers comprehensive controls for professional video generation:

Video Parameters
  • prompt: Text description to guide video generation (max 500 characters)
  • negative_prompt: Specify what to avoid in the generation
  • image_url: URL or base64 data URI of your input image
  • aspect_ratio: Choose from 16:9, 4:3, 1:1, 9:16, or 3:4
  • resolution: Select 480p or higher quality options
  • num_frames: Control video length (up to 180 frames)
Quality Controls
  • cfg_scale: Adjust classifier-free guidance (default: 1)
  • guidance_scale: Fine-tune prompt adherence (default: 10)
  • seed: Set for reproducible results
  • enable_safety_checker: Content moderation (default: true)
Queue Management

For production applications, use the queue API for better control:

javascript
// Submit request
const { request_id } = await fal.queue.submit("fal-ai/framepack", {
  input: {
    prompt: "Your video description here",
    image_url: "your-image-url"
  },
  webhookUrl: "https://your-webhook-endpoint.com/results"
});

// Check status
const status = await fal.queue.status("fal-ai/framepack", {
  requestId: request_id,
  logs: true
});

// Get result when complete
const result = await fal.queue.result("fal-ai/framepack", {
  requestId: request_id
});
File Handling

Framepack supports multiple input methods:

URL Input
javascript
input: {
  image_url: "https://publicly-accessible-image.com/image.jpg"
}
Base64 Data URI
javascript
input: {
  image_url: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ..."
}
File Upload via fal Storage
javascript
const file = new File([imageData], "image.jpg", { type: "image/jpeg" });
const url = await fal.storage.upload(file);

const result = await fal.subscribe("fal-ai/framepack", {
  input: {
    image_url: url,
    prompt: "Your description"
  }
});
Best Practices

For optimal results with Framepack:

  • Image Quality: Use high-quality input images for better video output
  • Prompt Writing: Be specific and descriptive in your text prompts
  • Processing Time: Allow approximately 3 minutes for video generation
  • Error Handling: Implement proper try-catch blocks for network issues
  • Rate Limiting: Monitor your API usage to avoid hitting limits
  • Webhook Integration: Use webhooks for long-running requests
  • File Formats: Accepted formats include jpg, jpeg, png, webp, gif, avif
Output Format

Framepack returns a video object with the following structure:

javascript
{
  "video": {
    "url": "https://storage.googleapis.com/falserverless/framepack/output_video.mp4",
    "content_type": "video/mp4",
    "file_name": "generated_video.mp4",
    "file_size": 2048576
  },
  "seed": 123456789
}
Authentication

Set your API key as an environment variable:

bash
export FAL_KEY="your_api_key_here"

Or configure it programmatically:

javascript
import { fal } from "@fal-ai/client";
fal.config({
  credentials: "YOUR_FAL_KEY"
});
Technical Support

For additional support and resources:

  • API Documentation: docs.fal.ai
  • Model Gallery: Browse all available models at fal.ai/models
  • Community Support: Join the developer community
  • Enterprise Support: Contact support@fal.ai for business needs
Pricing and Usage

Framepack uses transparent per-second pricing:

  • Cost: $0.0333 per second of generated video
  • Example: A 5-second video costs approximately $0.17
  • Billing: Pay only for successful generations
  • Commercial Use: Generated content can be used commercially

For detailed pricing information, visit fal.ai/pricing or contact support@fal.ai for enterprise solutions.

Model Variants

Framepack is also available in additional variants:

  • fal-ai/framepack: Standard model
  • fal-ai/framepack/f1: Alternative variant with similar capabilities

Both variants share the same API interface and pricing structure.