- TypeScript 82.6%
- CSS 17.4%
Link key creation to the platform API keys page instead of a documentation page. Use Router onboarding for Cinematic Studio and Comfy API onboarding for Reshoot. Confidence: high Scope-risk: narrow Tested: Platform route and onboarding implementation; README link assertions; git diff --check Not-tested: Creating a real API key |
||
|---|---|---|
| app | ||
| components | ||
| lib | ||
| test | ||
| .env.example | ||
| .gitignore | ||
| LICENSE | ||
| next-env.d.ts | ||
| next.config.ts | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
Cinematic Studio
A standalone app for generating cinematic images with Comfy Router.
Run locally
-
Install Node.js 22.6 or newer and create a Comfy API key for a workspace with Router access and credits.
-
Clone and configure the app:
git clone https://github.com/Comfy-Org/comfy-cinematic-studio.git cd comfy-cinematic-studio cp .env.example .env.local -
Put your key in
COMFY_API_KEYin.env.local, then install and start:npm ci npm run dev -
Open http://localhost:3000, describe a scene, choose the shot, camera, light, and look, then select Generate image. Each run uses Comfy credits from the workspace that owns the API key.
Keep COMFY_API_KEY in .env.local; only the server route reads it. Do not prefix it with NEXT_PUBLIC_ or commit the file.
Request flow
Generate image posts the scene and selected shot, camera, lighting, and look to /api/generate. The route validates these values, combines them into a prompt with cinematicPrompt() in lib/prompt.ts, and calls bfl/flux-2-pro through the Comfy SDK. The server fetches the result and returns the image to the browser.
This app uses Comfy Router's hosted model API. It does not submit a Comfy workflow.
Make a change
Add the option to the corresponding list in lib/prompt.ts and add a matching <option> in components/app-runner.tsx. The prompt preview and API route both call cinematicPrompt() from lib/prompt.ts.
app/api/generate/route.ts calls bfl/flux-2-pro with a prompt. To use another model, update the model ID and parameters to match its schema, then update lib/flux-output.ts for its response. The current parser reads an HTTPS image URL from result.sample.
If a run fails
- Missing key: make sure
.env.localhasCOMFY_API_KEY, then restartnpm run dev. - Insufficient credits or access: check Router access and balance for the workspace that created the key.
- Image unavailable: if Router returns no usable image, the error includes its request ID when available.
License
MIT. See LICENSE.