Local workbench for FLUX.2 image and FLUX 3 Video workflows: prompt libraries, reference images, FLUX image tools, video scripting with keyframe permutations, a server-owned generation queue, model evaluation records, output provenance, local asset recovery, and agent-friendly routes.
This repo is local-first. It is safe to run as a developer tool, it is not a hosted public image generator. Keep paid FLUX execution on your machine through env vars or macOS Keychain, and use the optional Cloudflare Worker only as a token-protected archive for generated outputs.
API.Dashboard.mp4
cd ui
npm install
npm run dev -- --port 3017Open http://localhost:3017.
Run checks:
cd ui
npm test
npm run lint
npm run build- Generate FLUX.2 images through local Next.js API routes.
- Generate FLUX 3 Video: text-to-video, one to ten ordered or explicitly timed keyframes, video continuation, synchronized audio, and deterministic draft-to-1080p enhancement.
- Plan Video Script batches: collection-driven keyframe permutations, prompt assignment modes, batch timing templates imported from audio markers, and a live job-count/cost preview before any paid run.
- Run every paid job through one server-owned generation queue with image, tool, and video lanes, pause/retry/cancel, restart recovery from saved provider request IDs, and estimated-versus-actual cost reconciliation.
- Capture each run as a normalized evaluation record with prompts, settings, timings, and cost; rate, tag, and export JSON/JSONL from the Evaluate tab, the CLI, or MCP.
- Run FLUX Erase, Virtual Try-On, Outpaint, and Deblur from saved gallery assets.
- Manage prompts, prompt combos, reference roles, costs, credits, and run logs.
- Save outputs as image, prompt text, JSON metadata, and PNG metadata.
- Recover local filesystem outputs and optional Cloudflare R2/D1 archive records.
- Vectorize saved images into SVG/PNG glyph assets.
- Prepare reference collections, caption jobs, LoRA datasets, and finetune runs.
- Expose local HTTP/MCP-compatible routes for agents.
The UI never returns a raw provider key from status or MCP routes.
Resolution order for paid local API calls:
- Per-request
apiKeyoverride. BFL_API_KEY.FLUX_API_KEY.- macOS Keychain item saved by the top-bar lock button.
Use .env.example or ui/.env.local.example as placeholders only. Do not commit
real .env, .env.local, Worker tokens, output metadata with account details,
or generated media unless deliberately curated as a public sample.
There are two complementary surfaces:
- Official FLUX MCP at
https://mcp.bfl.aifor BFL-hosted OAuth, direct generation, edits, history, and account operations. - Local dashboard routes/MCP wrapper for prompts, run plans, generation queue control, evaluation records, output recovery, glyph vectorization, reference archives, and artifacts that should appear in this repo's gallery.
Hosted FLUX MCP setup:
codex mcp add FLUX --url https://mcp.bfl.ai
codex mcp login FLUXLocal dashboard MCP wrapper:
cd ui
BFL_DASHBOARD_URL=http://localhost:3017 npm run mcpSee MCP And Agent Guide.
The Cloudflare Worker stores generated images, prompts, and metadata in R2 and searchable D1 rows. Configure it only when you want a durable remote archive:
- Cloudflare Worker README
BFL_ASSET_WORKER_URLBFL_ASSET_WORKER_TOKEN
Without those env vars, the UI stays filesystem/localStorage/IndexedDB only.
- Control Surface Guide: expanded setup, features, local routes, security posture, and release notes.
- MCP And Agent Guide: official FLUX MCP plus local dashboard API usage.
- FLUX 3 Video Scripts PRD: product requirements for video prompts, keyframe permutations, and the universal generation queue, with API constraints verified against the live BFL docs.
- FLUX 3 Implementation Plan: queue architecture, provider lifecycle split, failure taxonomy, and phasing.
- Asset Workbench Readiness: BFL asset workflow direction.
- Public Release Checklist: what to verify before tagging or publishing.
- UI README: detailed Next.js app notes.
ui/: Next.js dashboard, route handlers, local MCP wrapper, tests.cloudflare/: optional token-protected R2/D1 archive Worker.pipeline/: Python prompt and generation helpers.configs/: public-safe sample prompt plans kept as tutorials and smoke-test fixtures, not a private prompt library.docs/: public-facing implementation and release notes.experiments/andnotes/: local-only working material, intentionally not tracked in the public repo.
MIT. Copyright (c) 2026 Koshi (koshimazaki).
You may use, adapt, and redistribute this code, including commercially, as long as the copyright notice and permission notice travel with it.
Two things the licence does not cover, because they are not mine to grant:
- The FLUX models and the BFL API itself — those are governed by Black Forest Labs' own terms, and you need your own API key.
- The BFL brand mark and the webfonts referenced from
bfl.aiinui/app/styles/fonts.cssandui/components/top-bar.tsx. They are hotlinked third-party assets, not part of this work. Self-host your own before shipping anything derived from this.