What problem does it solve?
This skill automates media generation through fal.ai's serverless platform, enabling easy creation of images, videos, and audio inside applications without bespoke infrastructure.
Core Features & Use Cases
- Real-time media generation: Generate on-demand visuals and sound effects for apps, demos, and experiments.
- Composable media pipelines: Chain requests to create galleries, video prompts, or dynamic assets driven by user input.
- Use Case: Build an app that generates a hero image and short looping video from a single prompt, updating in real-time as the user types.
Quick Start
Install the client, configure credentials, and request a sample media generation.
- npm install @fal-ai/serverless-client
- import * as fal from '@fal-ai/serverless-client';
- fal.config({ credentials: process.env.FAL_KEY });
- const result = await fal.subscribe('fal-ai/flux/dev', {
input: {
prompt: 'A serene Japanese garden with cherry blossoms',
image_size: 'landscape_16_9',
num_images: 1,
},
});
console.log(result.images?.[0]?.url);