Open source · MIT
Open Higgsfield developer docs
An open-source AI creative studio (image, video, audio, agent and production studios) that runs on your own computer. Your creations and files stay with you. Models are called with your own API key (VideoRouter by default; OpenRouter and Vercel AI Gateway work too), or run on your own GPU with no key at all.
Try it in your browser Paste your own API key. Your library is yours alone.
Quick start
Requires Python 3.9 or newer. Faceless Studio and pet lip-sync songs also need ffmpeg on your PATH.
git clone https://github.com/synvia-corp/Open-Higgsfield.git
cd Open-Higgsfield
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python app.pyOpen http://localhost:8787. There is no sign-in. The first time you generate with a cloud model, the app opens Settings for your API key
(create one); generations are billed to it. To skip the prompt, set VIDEOROUTER_API_KEY.
What you can do
- Image, Video and Audio pages: every model of your provider in one picker, with reference pictures, first and last frames, editing, extending and upscaling.
- AI Agent: describe a job in a sentence; it plans the generations, asks before it spends, and runs them.
- Workflows: chain image and video steps (each step can use the picture from the one before). You see an estimate and confirm before it runs; ten ready-made ones are in Explore Apps.
- AI Clipping: add a long video with someone talking; it listens, picks the best moments with a chat model, and cuts them into short clips (optionally vertical 9:16). Cutting uses ffmpeg on your computer.
- Vibe Motion: describe an animated graphic; a chat model writes a canvas animation that plays in a sandboxed frame (no network, no access to the page). Remix it, then make the MP4: your browser draws the frames and ffmpeg encodes them. Only the writing is billed.
- AI Influencer: build a character from choices, make the picture, then put the same person in new scenes (the picture is used as a reference).
- Studios (Ads, Marketing, Shorts, Faceless) and tools (lip sync, face swap, motion control, voice changer, music) built on the same providers.
AI Clipping and Vibe Motion need a provider with a chat model (VideoRouter or OpenRouter); AI Clipping also needs speech to text.
API providers
You do not have to use VideoRouter. In Settings, choose where your key is from. Each key is kept in your browser and sent only to that provider.
| Provider | Pictures | Video | AI Clipping and Vibe Motion | Voices, music, lip sync, face swap |
|---|---|---|---|---|
| VideoRouter | yes | yes | yes | yes |
| OpenRouter | yes, with reference pictures | yes: text, first frame, references | yes | no |
| Vercel AI Gateway | yes (edits with the models Vercel lists for it) | yes: text, first and last frame, references. Vercel asks for $10 of gateway credit first, and some models take pictures only as web links | no | no |
The model lists for OpenRouter and Vercel are read from their public model endpoints (cached for six hours), so new models appear without an update. Prices show where the provider gives a plain per-picture or per-second price. Vercel video follows the protocol of Vercel's open-source AI SDK and has not been run with a real key yet.
Run models on your own GPU
A model that can run on your computer has This computer in its list of hosts. Pick it, press Download once, and generate. It needs no API key, and nothing is uploaded.
Weights come from Hugging Face, are pinned to a revision, resume after an interruption, and are checked against a SHA-256 before use. They are stored in ./models.
| Image: Z-Image Turbo | Video: MiniMax H3 | |
|---|---|---|
| Runs in | The app itself (stable-diffusion-cpp-python) | The app itself (stable-diffusion.cpp sd-cli) |
| Tested on | NVIDIA RTX A4000 16 GB | NVIDIA L4 24 GB |
| Download | 6.7 GB | 35.5 GB |
| Modes | Text to image | Text to video, first and last frame |
| Speed we measured | About 30 s per picture, loading included | About 4 min for 2 s, about 9.5 min for 5 s (864x480) |
| License | Apache-2.0 | MiniMax H3 Community License: excludes the US, EU, UK and South Korea, outputs included |
Image engine
CMAKE_ARGS="-DSD_METAL=ON" pip install -r requirements-local.txt # Mac with Apple silicon
CMAKE_ARGS="-DSD_CUDA=ON" pip install -r requirements-local.txt # NVIDIA, with the CUDA toolkit installedVideo engine
You need an NVIDIA card with 24 GB, at least 64 GB of disk, git, cmake, a C++ compiler, the CUDA toolkit and ffmpeg. Build the engine into ./engine (20 to 30 minutes with CUDA), then restart the app:
sh scripts/build_video_engine.shTo use an sd-cli you already have, set SD_CLI to its path. Then on the Video page pick minimax/h3 and the host This computer.
Wan2GP (your own NVIDIA or AMD card)
Wan2GP runs Wan 2.1/2.2, Hunyuan Video 1.5, LTX-2, Flux and Qwen-Image on consumer graphics cards. Install it yourself, then pick a model whose host is Wan2GP and enter, in the box under the prompt, either the Wan2GP folder on this computer (each run is python wgp.py --process) or the address of its MCP server on another computer, started with python wgp.py --mcp --mcp-api-version 1 --mcp-transport streamable-http --mcp-host 0.0.0.0 --mcp-port 7866 and reached as http://<computer>:7866/mcp. Use 0.0.0.0 only on a network you trust. Save checks that Wan2GP answers; Wan2GP downloads a model's weights itself on first use. Wan2GP needs CUDA or ROCm, so on a Mac use the address option. This has been tested against stand-ins for Wan2GP, not on a real GPU.
Limits
- One generation runs at a time, and the model is loaded again for each one. Videos wait their turn.
- Z-Image Turbo: text to image only, no reference pictures, editing or upscaling. The studios and the AI Agent do not use local models.
- MiniMax H3: about 480p in 16:9, 9:16, 1:1, 4:3 or 3:4; about 2 or 5 seconds, always with sound; no reference pictures, videos or audio.
- If you close the app while a video is being made, that video is lost.
- Not tested yet: generating on Mac, Windows, AMD, and cards with less memory than above.
Languages
The interface comes in English, 简体中文, 日本語, 한국어, Español, Português, Français, Deutsch and Русский. Pick one from the menu at the bottom left; it is remembered in your browser. Model names, prices and your own prompts are not translated, and text without a translation stays in English.
To add a language, add it to NAMES in web/js/i18n.js and put an English-to-translated table in web/js/i18n-<code>.js (copy any other one). scripts/i18n_strings.py lists the English text the app shows, and scripts/i18n_build.py turns translated chunks into the table.
Configuration
Environment variables, all optional:
| Variable | Default | |
|---|---|---|
VIDEOROUTER_API_KEY | Use this key instead of asking in the browser | |
VIDEOROUTER_BASE_URL | https://videorouter.sh | API server |
PORT | 8787 | |
HOST | 127.0.0.1 | Address to listen on |
DATA_DIR | ./data | Where your library is kept |
MODELS_DIR | ./models | Where local model files are kept |
SD_CLI | ./engine/build/bin/sd-cli | The program that makes videos on this computer |
The model lists in providers/videorouter_*.json are snapshots; new models appear when they are updated.
How it is built
A small Python backend (FastAPI) serves a static web app. The backend keeps the library and talks to a provider or to a local engine.
| Path | What it does |
|---|---|
app.py | Routes: pages, library, image and video generation, local model download, settings |
providers/ | One module per API provider. base.py is the interface, videorouter.py the default provider |
localgen/ | Models that run on this computer: the model table, downloads, and the image worker process |
library.py | The library: a SQLite index and the files, in DATA_DIR |
audio_routes.py | Speech, voice cloning, voice changer and music |
studios/ | Ads, Marketing, Shorts and Faceless studios |
web/ | The pages and scripts the browser loads |
The app speaks one request format: the fields the page sends, such as model, prompt, aspect_ratio, duration_secs, resolution, start_image_url and input_references.
A provider turns it into its own API calls. Local models take the same fields.
Add an API provider
Add one module to providers/ that defines provider = YourProvider(). With more than one provider, the key screen shows a picker. A provider has to implement:
| Method | Purpose |
|---|---|
catalog(kind) | Models for the picker, "video" or "image": [{key, label, creator, providers: [{slug, provider, modes, price, ...}]}] |
tool_models(tool) | Models for edit, extend and upscale video. Empty when the provider has none |
options() | Which models support extra switches (sound, seed, 21:9, draft, ...) |
check_key(key) | Raise ProviderError if the key does not work |
generate_image(key, body) | Return a list of Output |
start_video(key, body) | Submit a video job and return its id |
video_status(key, job_id) | Return a VideoStatus: pending, done or failed |
publish_file(key, path, content_type) | Upload a local reference file and return a URL the models can read |
audio() | Speech voices, music models, voice changer and cloning. Leave a part out if the provider cannot do it |
Two optional attributes switch on features that need a chat model: chat_models (model ids tried in order) enables Vibe Motion, and with transcribe_models and a transcribe(key, model, audio, filename) method also AI Clipping. Without them those pages say they are not available with that provider. providers/openrouter.py and providers/vercel.py build their catalogs from public model lists.
ProviderError messages are shown to the user as they are, so write them for a person. providers/videorouter.py is a complete example.
Add a local model
Local models are entries in the MODELS table in localgen/__init__.py. The key is local/<name>. An entry has:
key: the cloud catalog's key for the same model. When it matches, This computer is added as one of that model's hosts; otherwise the model gets its own row.label,creator,license(shown to the user before the download),kind("image"or"video"),stepsandcfg_scale.files: every file the model needs. Each has arole(the engine argument that takes it), the Hugging Facerepo, a pinnedrevision, thepathin the repo, the exactsizeand thesha256.
Images run in a separate process (python -m localgen.worker), so running out of memory cannot take the app down. Videos run sd-cli -M vid_gen and are converted to MP4 with ffmpeg. The download endpoints the page uses:
GET /studio/api/local/models/{name} # state: installed, ready, downloading, done_bytes, total_bytes
POST /studio/api/local/models/{name}/download # start or continue the downloadThe engine is stable-diffusion.cpp. The build script pins the commit this app was tested with.
Your data and safety
- Everything is in
./data: a SQLite index and the files. Results are downloaded as soon as they are ready, so they do not expire. Back up or move your library by copying that folder. - When you use a local file as a reference, or clone or change a voice, it is sent to your API provider for that request. Local models send nothing anywhere.
- The app is made for one person on their own computer and has no user accounts. Anyone who can reach it can see the library, and can spend your credits if
VIDEOROUTER_API_KEYis set. Do not put it on a public address without your own sign-in in front of it. - The hosted copy at videorouter.sh/open-higgsfield works differently: each visitor has their own library, found by a keyed hash of their API key. Nothing can be generated or saved before you add a key, and models on a computer are switched off there. Anyone who has your API key can open your library, so do not share it. The code is in the same repository (
OH_HOSTED=1, see the README). - The AI Agent and the studios can spend several generations for one request. The Agent asks before it generates; the studios show an estimate where one is available.
License
The code is MIT. Each model has its own license, shown before you download it. Check it before you use a model's output. This is an independent project. It is not affiliated with, endorsed by or connected to Higgsfield.