media is a file-based Termlings app for image and video generation.
It exposes two concrete command surfaces:
termlings image ...termlings video ...
V1 is Google first and stores local jobs under:
.termlings/store/media/
jobs/*.json
outputs/*
Inspect the contracts first:
termlings image schema
termlings video schemaImage generation uses --stdin-json:
printf '%s\n' '{"prompt":"pixel-art founder dashboard hero"}' \
| termlings image generate --stdin-json --json
printf '%s\n' '{"prompt":"restyle this image","image":"./input.png","out":"./hero.png"}' \
| termlings image generate --stdin-json --json
termlings image list --json
termlings image show --params '{"id":"img_abc123"}' --jsonVideo generation uses --stdin-json and poll uses --params:
printf '%s\n' '{"prompt":"8 second launch teaser","image":"./hero.png"}' \
| termlings video generate --stdin-json --json
printf '%s\n' '{"prompt":"vertical product teaser","aspect":"9:16","duration":"6","wait":false}' \
| termlings video generate --stdin-json --json
termlings video poll --params '{"id":"vid_abc123"}' --json
termlings video list --json
termlings video show --params '{"id":"vid_abc123"}' --jsonAdd this to .termlings/.env:
GEMINI_API_KEY=your_google_gemini_api_keyOptional fallback:
GOOGLE_API_KEY=your_google_gemini_api_keyAgents should request it through requests:
termlings request env GEMINI_API_KEY "Needed for media generation" --scope termlingsimage generateis synchronous and writes a completed local job plus the output file.video generatecreates a local job, starts a provider operation, and either waits or returns early with"wait": false.video pollrefreshes an in-flight video job and downloads the final MP4 when it completes.imageaccepts either a local file path or a completed image job id.designcan consume completed media images through<Image src="img_abc123" />or direct.termlings/store/media/outputs/...paths.- Media emits shared app activity like
media.image.completed,media.video.started, andmedia.video.failed.
Disable it for the whole workspace in .termlings/workspace.json:
{
"apps": {
"defaults": {
"media": false
}
}
}Per-agent access is narrowed in .termlings/agents/<slug>/SOUL.md with the apps: allowlist. See APPS.md.