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,201 stars 206 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 94/100

Stars 20%
100
Recency 20%
90
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
6 months ago
Last Updated
1 weeks ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Featured

create-video-fal

Image-to-video (or text-to-video) via any FAL video model (Kling, Seedance, Veo), ROUTED THROUGH THE GooseWorks fal-proxy so the call bills the Ads agent. The template recipe names the model + params; image_url inputs must be public URLs (the orchestrator hosts local frames via MCP get_upload_url -> get_download_url). Returns the result video URL and downloads it. Use for the generative base clip of any video-ad format.

1,201 Updated 1 weeks ago
gooseworks-ai
AI & Automation Featured

create-image-fal

Generate or edit an image via any FAL image model (nano-banana edit, gpt-image, flux, ...), ROUTED THROUGH THE fal-proxy so it bills the Ads agent. image_urls must be public URLs (orchestrator hosts local product refs via MCP upload->presign). The recipe names the model + prompt. Use for keyframes, flat-cover transforms, product hero edits. (For the OpenAI gpt-image family specifically, create-image-gpt-image-fal also exists.)

1,201 Updated 1 weeks ago
gooseworks-ai
AI & Automation Listed

media-gen

Photoreal image + video generation and upscaling via fal.ai (pay-per-use, one API key, always-current models: Kling, Seedance, FLUX, nano-banana Pro, Topaz). Use for image-to-video ("animate this image", "turn this photo into a video"), photoreal video clips for websites/demos, hero video loops, upscaling images/video, or any gen-media need beyond simple local generation. Rewrites rough prompts into model-optimized ones, routes to the cheapest model that fits, saves outputs locally. NOT for code-rendered motion graphics or scroll-driven cinematic flythroughs — that needs dedicated tooling this plugin doesn't ship. For simple illustrations/UI imagery, a separate Gemini-based image skill (if the user has one installed) is usually cheaper — reach for media-gen when a named fal.ai model, image-to-video, photoreal quality, or upscaling is actually needed. ("nano-banana Pro" below is a fal.ai model slug, unrelated to any separately-installed nano-banana skill.)

5 Updated 5 days ago
ManceRayder42