
Security News
MCP Steering Committee Launches Official MCP Registry in Preview
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
text2image-ai
Advanced tools
A simple Node.js wrapper for generating AI images from text prompts with multi-language support.
โ Free to use! NO LIMIT! ๐๏ธ Generate AI-powered images from text prompts! Supports Base64 output and multiple languages.
npm install text2image-ai
โ
AI-powered image generation from text
โ
Supports multiple languages (en
, tr
, es
, fr
, de
)
โ
Returns Base64 encoded images
โ
Lightweight and easy to use
โ
Can be used in CLI or server-side applications
const { generateImage } = require("text2image-ai");
async function main() {
const result = await generateImage("a futuristic city at sunset", "en");
console.log(result);
}
main();
๐ Example Output:
{
"originalPrompt": "a futuristic city at sunset",
"translatedPrompt": "a futuristic city at sunset",
"language": "en",
"base64Image": "/9j/4AAQSkZ..."
}
You can convert the Base64 image to a file using fs
in Node.js.
const { generateImage } = require("text2image-ai");
const fs = require("fs");
async function saveImage() {
const result = await generateImage("a cyberpunk city at night", "en");
// Remove the data URI prefix and convert Base64 to binary
const base64Data = result.base64Image;
const buffer = Buffer.from(base64Data, "base64");
// Save the image
fs.writeFileSync("output.jpg", buffer);
console.log("โ
Image saved as output.jpg");
}
saveImage();
Language Code | Language |
---|---|
en | English |
tr | Turkish |
es | Spanish |
fr | French |
de | German |
If a different language is provided, it defaults to English.
This project is licensed under the MIT License.
๐ Ready to create amazing AI-generated images? ๐
FAQs
A simple Node.js wrapper for generating AI images from text prompts with multi-language support.
We found that text2image-ai demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socketโs new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qixโs account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.