Connect to AI
AI & Machine Learning API Key

fal.ai REST API

Fast, scalable AI image generation and processing APIs

fal.ai provides serverless inference APIs for state-of-the-art AI models including Stable Diffusion, FLUX, and custom fine-tuned models. Developers use fal.ai for real-time image generation, upscaling, background removal, and video processing with guaranteed low latency and automatic scaling. The platform handles model optimization, GPU allocation, and request queuing automatically.

Base URL https://fal.run

API Endpoints

MethodEndpointDescription
POST/fal-ai/flux/schnellGenerate images using FLUX Schnell model with fast inference
POST/fal-ai/flux-proGenerate high-quality images using FLUX Pro model
POST/fal-ai/stable-diffusion-v3-mediumGenerate images using Stable Diffusion 3 Medium model
POST/fal-ai/fast-sdxlGenerate images using optimized SDXL with reduced inference time
POST/fal-ai/rembgRemove backgrounds from images automatically
POST/fal-ai/esrganUpscale images using ESRGAN super-resolution model
POST/fal-ai/face-to-stickerConvert face photos into stylized stickers
POST/fal-ai/stable-videoGenerate videos from text prompts or images
POST/fal-ai/controlnet-cannyGenerate images with edge-guided ControlNet
POST/fal-ai/illusion-diffusionCreate optical illusion images with hidden patterns
GET/queue/{request_id}/statusCheck the status of a queued request
GET/queue/{request_id}Retrieve results from a completed request
POST/subscribeSubscribe to real-time updates via webhooks for long-running requests
GET/modelsList all available AI models and their endpoints
POST/fal-ai/loraGenerate images using custom LoRA fine-tuned models

Code Examples

curl -X POST https://fal.run/fal-ai/flux/schnell \
  -H "Authorization: Key YOUR_FAL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A serene mountain landscape at sunset with vibrant colors",
    "image_size": "landscape_16_9",
    "num_inference_steps": 4,
    "num_images": 1,
    "enable_safety_checker": true
  }'

Use fal.ai from Claude / Cursor / ChatGPT

Get a hosted MCP endpoint for fal.ai. Paste your fal.ai API key, copy back one URL, drop it into Claude Desktop, Cursor, or any AI client that supports remote MCP. Your AI calls fal.ai directly with your credentials — no local install, works on mobile.

generate_image Generate images from text prompts using FLUX or Stable Diffusion models with customizable parameters
remove_background Automatically remove backgrounds from images and return transparent PNG files
upscale_image Enhance image resolution using AI super-resolution models like ESRGAN
check_generation_status Monitor the status of queued image generation requests and retrieve results when ready
generate_video Create short videos from text prompts or animate static images using AI video models

Connect in 60 seconds

Paste your fal.ai key → get an MCP URL → paste into Claude/Cursor. Hosted by IOX, encrypted at rest.

Connect fal.ai to your AI →

Related APIs