Skip to content

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.

  • Python 3.10+
  • Node.js 18+
  • PostgreSQL
  • A running ComfyUI instance — local, remote, or serverless
Terminal window
git clone https://github.com/ortegarod/flixml.git
cd flixml
# Config: environment variables and your ComfyUI nodes
cp .env.example .env
cp 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.txt
createdb flixml_studio
set -a; . ./.env; set +a
PYTHONPATH=app python -m flixml
# Studio UI, in a second terminal from the repo root
set -a; . ./.env; set +a
cd studio && npm install && npm run dev

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>" } }
]
}

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.

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.

Terminal window
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.