# Repository Briefing: wide-trace/open-higgsfield
> Source: https://repoforai.com/repo/wide-trace/open-higgsfield (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/wide-trace/open-higgsfield
- **Official Docs / Website**: https://openhiggsfield.ai
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: TypeScript
- **License**: See repository
- **Engineering Health**: B (55/100 · Maintenance 20/35 · Adoption 23/25 · Releases 6/20 · License 6/20)
- **Review Snapshot**: 2026-12-01
- **Deployment / Stack Signals**: Self-Hosted, API
- **Momentum**: 7,610 ★ total (+53 24h / +519 7d) · 1,588 forks
- **When to Use**: Best for: Creators or small teams with a compatible generation API who want a self-hosted interface for prompt iteration, reference media, and result review. Skip if: You need offline inference, private-only media links, durable shared history across devices, or confirmed redistribution rights out of the box.

## Overview
```text
### Architecture & Core Mechanics
OpenHiggsfield is a TypeScript studio built on Next.js and React. `src/app/` exposes the single-page studio and `/api/blob`, `src/openhiggsfield/` contains the composer and gallery UI, and `src/generation/` owns request mapping, server actions, catalog, and state. The composer builds `{ model, prompt, media, settings }`; server actions resolve the model against the catalog, map inputs to upstream fields such as `image_urls` and `aspect_ratio`, and handle authenticated submission and status checks. They are the only callers of the generation API.

`src/generation/catalog/` drives the picker, settings rail, and media roles, so adding a supported model does not require a parallel set of UI controls. Five Zustand stores cover image/video prompts and media, model-keyed settings, and active state. Uploads follow a separate path: `/api/blob` issues scoped tokens and the browser transfers files directly to Vercel Blob. Local `blob:` URLs are used only for previews.

### Key Capabilities & Differentiators
The shared composer exposes 38 catalog entries: eight image and 30 video, including Flux, Ideogram, Soul Cinema, Seedance, Kling, and Wan. Controls such as aspect ratio, duration, audio, and output format appear only where the selected model allows them. Models can define inputs such as start and end frames, references, audio, and video, with per-role caps. Users can attach earlier uploads or finished outputs from the asset picker.

A submission can produce up to four results, using the upstream model’s count control where available and separate requests otherwise. The studio polls status every four seconds until a terminal state or a ten-minute deadline, with results appearing independently. The masonry gallery supports favorites, bulk actions, downloads, and reuse that restores model, prompt, and settings. Failed, canceled, and NSFW runs leave tiles with the reason and a retry path.

### Trade-offs & Limitations
Compared with Higgsfield AI’s hosted studio, this design lets teams host and modify the interface without operating an inference stack. The boundary matters: model requests still require a compatible upstream API and a platform key, so hosting the studio does not remove upstream costs, availability constraints, or API dependencies. When a model lacks native batching, one click can fan out into several requests; factor that into upstream quotas and cost estimates.

Uploads become public URLs so the generation service can fetch them. A scoped upload token limits what the uploader can do; it does not make those URLs private. History is browser-local in IndexedDB with a 60-record cap that exempts favorites, but favoriting does not extend the lifetime of an upstream result URL. Treat the gallery as a working history, not an archive. The unspecified license also leaves commercial modification and redistribution rights unresolved.

### Hardware & Deployment Guide
Use a Node.js environment with pnpm. Set the server-only `HF_API_BASE_URL` to a compatible generation API origin and configure `OPEN_HIGGSFIELD_READ_WRITE_TOKEN` for Vercel Blob uploads. Run `pnpm install` and `pnpm dev` for development at `http://localhost:3000`, or use `pnpm build` followed by `pnpm start` for production. Enter the platform key in `id:secret` form through the studio; a server action stores it in an HttpOnly cookie. The hosted studio at `openhiggsfield.ai` avoids local setup but still requires a platform key.

Self-hosting runs the studio, not the models. The app host needs no GPU for inference; size it for concurrent browser sessions and the server-side submission and polling workload rather than model VRAM. Generation depends on the upstream API, and media uploads depend on Vercel Blob, so this is not an offline deployment. The root tree contains no container manifest, and there is no tagged release to use as a versioned deployment baseline.
```

## Key Capabilities
```text
- Catalog: 38 entries—8 image and 30 video—with model-specific settings and media-role limits.
- API boundary: Next.js server actions submit `POST /{model}` and check `GET /requests/{id}/status`; the platform key is stored in an HttpOnly cookie.
- Media upload: `/api/blob` issues scoped tokens for direct browser uploads to Vercel Blob; generation requests carry public URLs.
- Batch execution: Up to four results per submission, using a native count setting where available or separate upstream requests otherwise.
- Job lifecycle: Status checks run every four seconds, with a ten-minute deadline and retry controls on failed tiles.
- History: Browser-local IndexedDB retention targets 60 records, with favorites exempt from eviction; result media stays at upstream URLs.
```

## Quick Start / Clone
```bash
pnpm install
pnpm dev            # http://localhost:3000
```
