--json is passed, every command emits structured JSON.
While the MCP server is the best fit for assistants that speak the Model Context Protocol, genmedia needs nothing but a shell — so it also works in CI/CD pipelines, shell scripts, and agents driven purely by shell commands.
This is not the
fal CLI. For deploying and managing your own fal applications — fal deploy, fal run, fal apps — see the CLI Reference.Installation
- Linux and macOS
- Windows
~/.genmedia and puts genmedia on your PATH.
genmedia requires a fal API key. If you don’t have one yet, create one here.
Quick Start
1
Set your API key
genmedia setup to save it encrypted to your local config.2
Find a model
3
Generate an image
Commands
genmedia covers configuration, model discovery, execution, file uploads, documentation search, and agent onboarding. Rungenmedia --help --json for the complete machine-readable command list.
setup
Interactive wizard that configures your API key (saved encrypted locally),.env auto-loading, default output mode, and automatic updates.
models
Search and inspect fal’s catalog. Pass a query, a category filter, or both. When you give a query without--category, genmedia classifies it and applies an inferred category for you.
schema
Get the full input/output parameters for any model. Use this beforerun to see what options are available.
run
Run any fal model. By default, submits to the queue and waits for the result.
Model parameters are passed as
--key value flags, and the key names match the model’s input schema exactly. To see a specific model’s parameters rendered as CLI flags:
status
Check the status of an async job, fetch the result, or cancel it.upload
Upload a local file or URL to fal’s CDN. Returns a URL you can pass to any model.cdn_url like https://v3b.fal.media/files/b/... that works with any model parameter that accepts a URL.
pricing
Get the cost of running a model.docs
Search the fal documentation for guides, API references, and examples.gallery
Every successfulgenmedia run records its outputs into a per-session, self-contained HTML page under ~/.genmedia/gallery/sessions/, aggregating every image, video, audio, and 3D asset produced in one agent session into a filterable grid.
GENMEDIA_NO_GALLERY=1 to disable recording.
init and skills
Install agent skills so coding agents in a project know how to use genmedia without reading--help first.
init writes into .agents/skills/ if the project has an .agents/ directory, otherwise .claude/skills/. Commit that directory so teammates and other agents get the same context.
version and update
GENMEDIA_NO_UPDATE=1 to disable them; genmedia update still works.
Output and JSON
Output adapts to where it’s going:- In a terminal — a compact, human-readable view.
- Piped, redirected, or with
--json— structured JSON.
genmedia setup --non-interactive --output-format json.
Errors are written to stderr as JSON with a non-zero exit code:
details object with context such as request_id, status, or validation_errors. Success responses vary by command but always include the relevant data as a JSON object.
Examples
End-to-end image generation
Video generation (async)
Image-to-video with file upload
Parameter names are per-endpoint. This endpoint takes
start_image_url (plus an optional end_image_url), not image_url. Run genmedia run <endpoint_id> --help to see exactly what a model accepts.Use with AI agents
The fastest way to teach an agent about genmedia is to install the skill bundle in your project:commands map giving each command’s description, usage, arguments, options, and output fields — everything an agent needs to discover capabilities without guessing.
Next Steps
AI Tools
Connect MCP-compatible assistants to the full fal platform
Get Your API Key
Create and manage the keys genmedia authenticates with
Async Inference
How async submission, status polling, and webhooks work
GitHub Repository
View the source code, report issues, or contribute