media-proxy

Featured

Shared helper that routes ALL paid media generation (FAL image/video, ElevenLabs music) through the GooseWorks proxies so every call bills the Ads agent — never a provider SDK's default host. Host-swaps the FAL queue URLs, loads the agent token from ~/.gooseworks/credentials.json, and returns the result CDN URL. Every video-ad media capability imports this; templates never call a provider directly.

Data & Documents 1,055 stars 194 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# media-proxy The foundation capability for paid media in the video-ad pipeline. It fixes the auth-path conflict where engine scripts called FAL/ElevenLabs **directly** (billing the wrong account): all paid calls now go through `<api_base>/api/internal/{fal-proxy,elevenlabs-proxy}` with `?token=&agent_id=`, which **bills the Ads agent**. ## Crash-resume (never lose / double-bill a paid render) A FAL submit BILLS immediately, but the local backend can blip during a multi-minute render. Two built-in protections (automatic for every capability that imports this): - **Poll-through-outage** — `_fal_run`'s poll loop re-attaches to the same status/result URL through `connection refused` / timeout blips instead of crashing. - **Persist + resume** — each submit's `request_id` + poll URLs are written to `~/.gooseworks/pending-fal-jobs/`. If the poller still dies, **re-attach instead of re-firing** (re-firing double-bills): `resume_fal(request_id)` in Python, or the CLI: ```bash resume.py --list # resumable (submitted, unfinished) jobs resume.py --request-id <id> --out final.mp4 # poll to completion + download ``` `resume_fal` NEVER re-submits, so it can't double-charge. ## Use it ```python from media_proxy import fal_generate, fal_generate_video, eleven_music, download # image (nano-banana / gpt-image / etc.) — inputs must be PUBLIC urls img = fal_generate("fal-ai/nano-banana/edit", {"prompt": p, "image_urls": [pr...

Details

Author
gooseworks-ai
Repository
gooseworks-ai/goose-skills
Created
4 months ago
Last Updated
3 days ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category