analytics-metrics
Build data visualization and analytics dashboards. Use when creating charts, KPI displays, metrics dashboards, or data visualization components. Triggers on…
Generate images, videos, and audio with fal.ai serverless AI. Use when building AI image generation, video generation, image editing, or real-time AI features. Triggers on fal.ai, fal, AI image generation, Flux, SDXL, real-time AI, serverless AI.
$ npx -y skills add hoodini/ai-agents-skills --skill fal-ai --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/fal-aiContext preview
The summary Claude sees to decide when to auto-load this skill.
Generate images, videos, and audio with fal.ai serverless AI. Use when building AI image generation, video generation, image editing, or real-time AI features. Triggers on fal.ai, fal, AI image generation, Flux, SDXL, real-time AI, serverless AI.
name: fal-ai description: Generate images, videos, and audio with fal.ai serverless AI. Use when building AI image generation, video generation, image editing, or real-time AI features. Triggers on fal.ai, fal, AI image generation, Flux, SDXL, real-time AI, serverless AI.
Generate images, videos, and audio with fal.ai's fast serverless inference.
npm install @fal-ai/serverless-client
import * as fal from '@fal-ai/serverless-client';
fal.config({
credentials: process.env.FAL_KEY,
});
// Generate image with Flux
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);// Option 1: Environment variable (recommended)
// Set FAL_KEY in .env
fal.config({ credentials: process.env.FAL_KEY });
// Option 2: Direct config
fal.config({ credentials: 'your-api-key' });
// Option 3: Proxy (for client-side apps)
// Use fal.config({ proxyUrl: '/api/fal/proxy' }) on client// Flux Dev - Best quality
const result = await fal.subscribe('fal-ai/flux/dev', {
input: {
prompt: 'Professional headshot of a business executive',
image_size: 'square_hd', // 1024x1024
num_inference_steps: 28,
guidance_scale: 3.5,
num_images: 1,
enable_safety_checker: true,
},
});
// Flux Schnell - Ultra fast (~0.5s)
const fast = await fal.subscribe('fal-ai/flux/schnell', {
input: {
prompt: 'A cute robot',
image_size: 'square',
num_inference_steps: 4, // Schnell needs fewer steps
},
});
// Flux Pro - Highest quality
const pro = await fal.subscribe('fal-ai/flux-pro', {
input: {
prompt: 'Hyperrealistic portrait',
image_size: 'portrait_4_3',
safety_tolerance: '2',
},
});type ImageSize =
| 'square_hd' // 1024x1024
| 'square' // 512x512
| 'portrait_4_3' // 768x1024
| 'portrait_16_9' // 576x1024
| 'landscape_4_3' // 1024x768
| 'landscape_16_9' // 1024x576
| { width: number; height: number }; // Custom// SDXL
const sdxl = await fal.subscribe('fal-ai/fast-sdxl', {
input: {
prompt: 'Fantasy landscape',
negative_prompt: 'blurry, low quality',
image_size: 'landscape_16_9',
num_inference_steps: 25,
guidance_scale: 7.5,
scheduler: 'DPM++ 2M Karras',
},
});
// Stable Diffusion 3
const sd3 = await fal.subscribe('fal-ai/stable-diffusion-v3-medium', {
input: {
prompt: 'A mountain lake at sunset',
negative_prompt: 'ugly, deformed',
image_size: 'landscape_16_9',
},
});// Image to image
const result = await fal.subscribe('fal-ai/flux/dev/image-to-image', {
input: {
prompt: 'Transform to watercolor painting style',
image_url: 'https://example.com/photo.jpg',
strength: 0.75, // How much to change (0-1)
num_inference_steps: 28,
},
});
// Inpainting (edit specific areas)
const inpaint = await fal.subscribe('fal-ai/flux/dev/inpainting', {
input: {
prompt: 'A red sports car',
image_url: 'https://example.com/street.jpg',
mask_url: 'https://example.com/mask.png', // White = edit area
},
});// Generate with pose/edge control
const controlled = await fal.subscribe('fal-ai/flux-controlnet', {
input: {
prompt: 'A professional dancer',
control_image_url: 'https://example.com/pose.jpg',
controlnet_conditioning_scale: 0.8,
},
});const video = await fal.subscribe('fal-ai/kling-video/v1/standard/text-to-video', {
input: {
prompt: 'A golden retriever running through a field of flowers',
duration: '5', // seconds
aspect_ratio: '16:9',
},
});
console.log(video.video.url);const i2v = await fal.subscribe('fal-ai/kling-video/v1/standard/image-to-video', {
input: {
prompt: 'The person starts walking forward',
image_url: 'https://example.com/person.jpg',
duration: '5',
},
});const luma = await fal.subscribe('fal-ai/luma-dream-machine', {
input: {
prompt: 'A timelapse of clouds moving over mountains',
aspect_ratio: '16:9',
},
});import * as fal from '@fal-ai/serverless-client';
// Real-time image generation with streaming
const stream = await fal.stream('fal-ai/flux/dev', {
input: {
prompt: 'A beautiful sunset',
image_size: 'landscape_16_9',
},
});
for await (const event of stream) {
if (event.images) {
console.log('Generated:', event.images[0].url);
}
}// Ultra-low latency for interactive apps
const realtime = await fal.subscribe('fal-ai/fast-lcm-diffusion', {
input: {
prompt: 'Abstract art',
image_size: 'square',
num_inference_steps: 4, // LCM needs very few steps
},
});// Remove background
const nobg = await fal.subscribe('fal-ai/birefnet', {
input: {
image_url: 'https://example.com/photo.jpg',
},
});
// Upscale image
const upscaled = await fal.subscribe('fal-ai/creative-upscaler', {
input: {
image_url: 'https://example.com/small.jpg',
scale: 2,
creativity: 0.5,
prompt: 'High quality, detailed',
},
});
// Face swap
const swapped = await fal.subscribe('fal-ai/face-swap', {
input: {
base_image_url: 'https://example.com/target.jpg',
swap_image_url: 'https://example.com/face.jpg',
},
});// app/api/generate/route.ts import * as fa
🧠 AI Agent Skills Repository - A curated collection of specialized skills for AI coding agents (Claude Code, GitHub Copilot, Cursor, Windsurf). Created by Yuval Avidani using GitHub Copilot via VS Code Insiders.
Repo: hoodini/ai-agents-skills
Build data visualization and analytics dashboards. Use when creating charts, KPI displays, metrics dashboards, or data visualization components. Triggers on…
Manage AWS accounts, organizations, IAM, and billing. Use when setting up AWS Organizations, managing IAM policies, controlling costs, or implementing…
Build a new AI agent on AWS and deploy it easily, OR wrap and deploy an agent you already have, using the Amazon Bedrock AgentCore harness. Explains what an…
Build AI agents with the Strands Agents SDK - the open-source framework (the agent "brain") for writing agent logic, tools, and multi-agent systems in Python.…
Build fast applications with Bun JavaScript runtime. Use when creating Bun projects, using Bun APIs, bundling, testing, or optimizing Node.js alternatives.…
Build a premium cinematic landing page with mouse-scrub video hero and brand-driven narrative-arc sections. Use whenever the user provides a hero video plus a…