All Plugins
OpenAI / DALL-E
AIGenerate AI images using OpenAI DALL-E. Create photorealistic images, illustrations, and art from text prompts.
Installation
npm install @teamflojo/floimg-openai Quick Start
import createClient from "@teamflojo/floimg";
import openai from "@teamflojo/floimg-openai";
const floimg = createClient();
floimg.registerGenerator(openai());
const image = await floimg.generate({
generator: "openai",
params: {
prompt: "A futuristic city at sunset with flying cars",
model: "dall-e-3",
size: "1024x1024",
quality: "hd"
}
});
await floimg.save(image, "./futuristic-city.png"); API Reference
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Text description of the image to generate |
model | "dall-e-2" | "dall-e-3" | No | DALL-E model version (default: dall-e-3) |
size | "256x256" | "512x512" | "1024x1024" | "1792x1024" | "1024x1792" | No | Output image size |
quality | "standard" | "hd" | No | Image quality (DALL-E 3 only) |
style | "vivid" | "natural" | No | Image style (DALL-E 3 only) |
Examples
Futuristic City
AI-generated cityscape at sunset
await floimg.generate({
generator: "openai",
params: {
prompt: "A futuristic city at sunset",
model: "dall-e-3",
quality: "hd"
}
});
Product Photo
AI-generated product photography
await floimg.generate({
generator: "openai",
params: {
prompt: "Professional product photo of wireless headphones",
model: "dall-e-3",
style: "natural"
}
});
Abstract Art
AI-generated abstract gradient
await floimg.generate({
generator: "openai",
params: {
prompt: "Abstract flowing gradient with teal and blue",
model: "dall-e-3"
}
});