Exocortex MediaForge
====================

This is a local Windows desktop app for forging organized image and video runs with OpenAI APIs or a local ComfyUI workflow.

Important:
- This package does NOT include any API key.
- Each user must use their own OPENAI_API_KEY.
- No account data, billing data, or local outputs are bundled in this release.

Quick start
-----------
1. Run FIRST_TIME_SETUP.bat
2. If needed, let it open the OpenAI API keys and billing pages
3. Create your own OpenAI API key and paste it into the setup prompt
4. The app will launch when setup finishes
5. In the app, choose an output folder
6. Choose Engine = openai or comfyui
7. If you use OpenAI, choose Mode = image or video
8. If you use ComfyUI, pick a running local server, choose a local preset if you want, and point it at an API-format workflow file
9. Click Upload File if you want to use the included JSON prompt pack
10. Click Run / Generate

Model notes
-----------
- Image mode includes newer GPT Image models plus `dall-e-3` and `dall-e-2`
- Video mode includes `sora-2`, `sora-2-pro`, and pinned snapshot IDs
- There is also a Custom Model field for advanced users
- Local ComfyUI mode can batch images or saved video clips from a running ComfyUI server
- Curated local presets include `SDXL Base 1.0`, `FLUX.1-schnell`, `Chroma-unlocked v50`, `Wan 2.1 T2V 1.3B`, and `HunyuanVideo`
- Local mode can fetch real model lists from the running ComfyUI server and override a workflow loader node with a selected local model
- The app includes a `Preset Help` button that opens the matching setup note from the app folder

Included prompt files
---------------------
- prompts_to_generate.txt
  A simple one-prompt-per-line text file.

- immune_roguelike_asset_prompts.json
  A structured JSON prompt pack.

- sample.txt / sample.csv / sample.json / sample_video.json
  Small example prompt files.

- CHROMA_WORKFLOW_RECIPE.md
  A short setup recipe for local `chroma-unlocked-v50.safetensors` workflows in ComfyUI.

- WAN_WORKFLOW_RECIPE.md
  A short setup recipe for local `Wan 2.1 T2V 1.3B` workflows in ComfyUI.

- SDXL_WORKFLOW_RECIPE.md / FLUX_WORKFLOW_RECIPE.md / HUNYUANVIDEO_WORKFLOW_RECIPE.md
  Short setup notes for the other built-in local presets.

API key
-------
OpenAI mode uses OPENAI_API_KEY from the Windows user environment.
The key is never stored in the GUI and is not hardcoded in the app.
The helper points OpenAI users to the OpenAI API Platform pages:
- API keys: https://platform.openai.com/api-keys
- Billing overview: https://platform.openai.com/settings/organization/billing/overview
- Credit balance: https://platform.openai.com/settings/organization/billing/credit-balance

If you get a billing or quota error
-----------------------------------
That means the OpenAI API account tied to your key needs credits or a billing fix.
Use your own OpenAI billing dashboard to resolve it, then retry failed items in the app.

If you use local ComfyUI
------------------------
- Run ComfyUI locally first
- Save your workflow in API format
- Point the app at the local server URL and workflow JSON
- Use a local preset if you want the app to fill common defaults for a known model family
- Set the prompt node id or title the app should overwrite for each prompt

Sharing this app
----------------
You can zip this whole folder and share it.
The recipient should extract the full folder before running START_APP.bat.
