Installation
Install the Core Package
Section titled “Install the Core Package”npm install @teamflojo/floimgOr with your preferred package manager:
pnpm add @teamflojo/floimgyarn add @teamflojo/floimgAdd Plugins
Section titled “Add Plugins”floimg uses a plugin architecture. Install only the generators you need:
# AI image generation (choose one or more)npm install @teamflojo/floimg-openai # DALL-E 3npm install @teamflojo/floimg-stability # Stable Diffusion (SDXL, SD3)npm install @teamflojo/floimg-google # Google Imagennpm install @teamflojo/floimg-replicate # 1000+ AI modelsnpm install @teamflojo/floimg-ollama # Local models (no API key)npm install @teamflojo/floimg-xai # Grok
# Charts and data visualizationnpm install @teamflojo/floimg-quickchartnpm install @teamflojo/floimg-d3
# Diagramsnpm install @teamflojo/floimg-mermaid
# Utilitiesnpm install @teamflojo/floimg-qrnpm install @teamflojo/floimg-screenshotVerify Installation
Section titled “Verify Installation”Create a simple test file:
import createClient from '@teamflojo/floimg';import openai from '@teamflojo/floimg-openai';
const floimg = createClient();floimg.registerGenerator(openai({ apiKey: process.env.OPENAI_API_KEY }));
const image = await floimg.generate({ generator: 'openai', params: { prompt: 'A serene mountain landscape at sunset' }});
await floimg.save(image, './test-image.png');console.log('Image saved to test-image.png');Run it:
OPENAI_API_KEY=sk-... npx tsx test.tsNext Steps
Section titled “Next Steps”- Quick Start - Build your first workflow
- Core Concepts - Understand how floimg works
- Plugins - Explore available generators