genmedia
genmedia CLI: fal.ai endpoint runner
genmedia is the agent-first CLI for fal.ai. It works in a terminal for humans (pretty output) and equally well for agents (structured JSON when piped or with --json). All other skills in this repo call genmedia for execution, they do not wrap the fal.ai HTTP API directly.
For the full command surface (every flag, every option, every example), see references/full-reference.md.
Critical rules
- Always use
--jsonwhen an agent will read the output. Pretty mode is for humans only. - Prefer smart routing for default-quality requests.
genmedia run "<prompt>"(no endpoint, no--promptneeded) classifies the prompt and routes to a sensible default per modality. Only do explicit endpoint discovery when the user names a model, asks for a non-default behavior (specific style, quality tier, parameter), or the smart-route default is wrong for the task. - Never invent endpoint IDs. When you do need a specific endpoint, use
genmedia models "<query>"to discover (auto-filters by inferred modality) andgenmedia models --endpoint_id <id>to verify. - Inspect schema before running with custom params.
genmedia schema <endpoint_id> --jsonshows the exact field names. Smart routing only needsprompt; explicit endpoints with custom params need a schema check first or guessed flags fail with 422. - Save files with
--download, not curl. The CLI handles authentication, naming, and file format detection. - Use
--asyncfor long-running generation. Image work usually completes inline; video/audio/3D usually need queue + status polling.
Command index
More from fal-ai-community/skills
fal-image-edit
Edit images using AI on fal.ai. Style transfer, object removal, background changes, and more. Use when the user requests "Edit image", "Remove object", "Change background", "Apply style", or similar image editing tasks.
859fal-generate
Generate images and videos using fal.ai AI models with queue support. Use when the user requests "Generate image", "Create video", "Make a picture of...", "Text to image", "Image to video", "Search models", or similar generation tasks.
316fal-audio
Text-to-speech and speech-to-text using fal.ai audio models. Use when the user requests "Convert text to speech", "Transcribe audio", "Generate voice", "Speech to text", "TTS", "STT", or similar audio tasks.
269fal-upscale
Upscale and enhance image resolution using AI. Use when the user requests "Upscale image", "Enhance resolution", "Make image bigger", "Increase quality", or similar upscaling tasks.
243fal-platform
fal.ai Platform APIs for model management, pricing, usage tracking, and cost estimation. Use when user asks "show pricing", "check usage", "estimate cost", "setup fal", "add API key", or platform management tasks.
187fal-workflow
Generate production-ready fal.ai workflow JSON files. Use when user requests "create workflow", "chain models", "multi-step generation", "image to video pipeline", or complex AI generation pipelines.
181