text2image-ai
v2.0.0
Published
Generate AI images from text prompts with style presets, batch generation, save-to-file, and multi-language support. Free & unlimited.
Maintainers
Readme
Text2Image AI 🖼️
✅ Free to use! NO LIMIT!
🖌️ Generate AI-powered images from text prompts with 10 style presets, batch generation, save-to-file, and multi-language support!
🆕 What's New in v2.0.0
🔥 10 Style Presets – realistic, anime, oil, watercolor, pixel, 3d, cyberpunk, fantasy, minimal, sketch
🔥 Generate & Save – One-call image generation + file saving
🔥 Batch Generation – Generate multiple images with progress tracking
🔥 Negative Prompts – Specify what to avoid in generation
🔥 Auto Directory Creation – Saves create missing folders automatically
📦 Installation
npm install text2image-ai🚀 Quick Start
const { generateImage, generateAndSave } = require("text2image-ai");
// Basic generation
const result = await generateImage("a futuristic city at sunset");
console.log(result.base64Image);
// With style preset
const anime = await generateImage("a warrior princess", "en", { style: "anime" });
// Generate and save directly
const { savedPath } = await generateAndSave(
"a cyberpunk city at night",
"output.jpg",
"en",
{ style: "cyberpunk" }
);
console.log(`Saved: ${savedPath}`);🎨 Style Presets
| Style | Description |
|---|---|
| realistic | Ultra realistic, photographic, 8K |
| anime | Anime style, vibrant, cel shaded |
| oil | Oil painting, classical art |
| watercolor | Watercolor, soft edges, pastel |
| pixel | Pixel art, retro, 8-bit |
| 3d | 3D render, Octane, Cinema 4D |
| cyberpunk | Neon lights, dark futuristic |
| fantasy | Magical, ethereal illustration |
| minimal | Minimalist, clean lines |
| sketch | Pencil sketch, hand drawn |
const { getStyles } = require("text2image-ai");
console.log(getStyles()); // See all available style presets📦 Batch Generation
const { batchGenerate } = require("text2image-ai");
const results = await batchGenerate(
["a red dragon", "a blue ocean", "a green forest"],
"en",
{ style: "fantasy" },
(progress) => console.log(`${progress.percent}% - ${progress.lastPrompt}`)
);
console.log(`Generated ${results.filter(r => r.success).length} images`);🌍 Language Support
| Code | Language |
|---|---|
| en | English |
| tr | Turkish |
| es | Spanish |
| fr | French |
| de | German |
📜 License
This project is licensed under the MIT License.
🌟 Support & Contact
- GitHub Issues: Report Bugs or Request Features
- ⭐ Give a Star: If you like this package, support by starring the repo!
🚀 Create something amazing! 🎨✨
