media-genlisted
Install: claude install-skill ManceRayder42/jarvis-os
# media-gen — fal.ai cost-router
One fal.ai key covers every current image/video model, pay-per-use — no
subscription, no monthly minimum. You prepay credit on fal.ai's dashboard and
each request draws down from it: **spend is real money — be surgical.**
## Auth
Read the key from the environment first; fall back to the hub's `.env` (the
`/jarvis-setup` page's Media section writes it there). The hub itself
resolves the same way the SessionStart hook does: `JARVIS_HUB` env var first,
else the pointer file at `~/.jarvis-hub-path` written by `/jarvis-setup`,
else `~/jarvis-hub`. Never hardcode a path to it and never echo/print/log the
value:
```bash
hub="${JARVIS_HUB:-$(cat ~/.jarvis-hub-path 2>/dev/null)}"
hub="${hub:-$HOME/jarvis-hub}"
FAL_KEY="${FAL_KEY:-$(grep '^FAL_KEY=' "$hub/.env" 2>/dev/null | cut -d= -f2-)}"
```
If `FAL_KEY` is still empty after that, stop and tell the user to add it via
`/jarvis-setup` — do not hunt for it elsewhere. Every request:
header `Authorization: Key $FAL_KEY`.
## Cost discipline (the point of this skill)
- **Images are cheap** (fractions of a cent). Iterate freely.
- **Video bills per second.** Default 3–5s, never more without an explicit ask.
5s vs 10s = real dollars. State the model + estimated cost BEFORE a video run
and get the user's go-ahead unless they already gave one this session.
- Cheapest-fit routing: draft/test → FLUX schnell; final image → FLUX dev or
nano-banana Pro; image→video → Kling (best value) before Seedance (