Getting Started
FlixML runs on your own hardware. You need a machine (or machines) that can run ComfyUI, plus a small API and UI that route work to it.
Prerequisites
Section titled “Prerequisites”- Python 3.10+
- Node.js 18+
- PostgreSQL
- A running ComfyUI instance — local, remote, or serverless
Install
Section titled “Install”git clone https://github.com/ortegarod/flixml.gitcd flixml
# Config: environment variables and your ComfyUI nodescp .env.example .envcp config.example.json config.json# Edit .env and config.json for your machine
# API (from the repo root). Migrations run automatically.pip install -r requirements.txtcreatedb flixml_studioset -a; . ./.env; set +aPYTHONPATH=app python -m flixml
# Studio UI, in a second terminal from the repo rootset -a; . ./.env; set +acd studio && npm install && npm run devConfigure your GPU
Section titled “Configure your GPU”Add your ComfyUI URL to config.json so FlixML can route jobs to it. See Providers & GPU Nodes for the full shape.
{ "gpu_nodes": [ { "id": "gpu-1", "roles": ["image"], "comfyui": { "url": "http://<your-comfyui-host>:<port>" } } ]}Secure your install
Section titled “Secure your install”A fresh install requires no key, so anyone who can reach it has full access. Before you expose it beyond your own machine, create an admin key in Studio under Settings → API keys, then set "security": { "require_api_key": true } in config.json. API Keys & Access has the steps, including a command for machines without a browser.
Key environment variables
Section titled “Key environment variables”| Variable | Description |
|---|---|
FLIXML_API_URL |
URL the Studio UI uses to reach the backend |
DATABASE_URL |
PostgreSQL connection string |
FLIXML_OUTPUT_DIR |
Directory where generated media is stored |
FLIXML_TRAINING_DIR |
Required. Local folder for LoRA training datasets and configs |
FLIXML_LORA_OUTPUT_DIR |
Required. Local folder where trained LoRAs are saved |
FLIXML_COMFY_LORA_DIR |
Required. ComfyUI models/loras folder trained LoRAs are copied to |
ELEVENLABS_API_KEY |
Optional. Lists ElevenLabs voices at /api/tts/voices and speaks lines at /api/tts/generate. |
ELEVENLABS_VOICE_ID |
Optional. Default voice for /api/tts/generate when the request names none. |
See .env.example for the full list.
Your first generation
Section titled “Your first generation”curl -X POST <your-api-url>/api/image/generate \ -H "Authorization: Bearer <your-key>" \ -H "Content-Type: application/json" \ -d '{ "workflow": "<workflow-id>", "prompt": "portrait of a woman in a red dress, soft studio lighting", "provider": "<provider-id>", "width": 1024, "height": 1024 }'Leave out the Authorization header if your install doesn’t require keys. Discover what your install can run with GET /api/workflows, and which GPU to send it to with GET /api/nodes — that one reports whether a node is online and how much VRAM it has, which /api/providers doesn’t. Full request/response details are in the Agent API reference.