aryanimagine
v1.0.2
Published
Generate anime-style AI images using the Animagine API.
Maintainers
Readme
🎨 aryanimagine
Generate stunning anime-style AI images with a single line of code using the powerful Animagine API.
✨ Features
- 🚀 Easy to use - Generate anime images with just one function call
- 🎭 High quality - Powered by advanced AI models for anime-style art
- ⚡ Fast - Quick image generation via optimized API
- 🔧 No dependencies - Lightweight package with minimal footprint
- 🌐 Web-ready - Works in Node.js environments
- 🎨 Customizable - Support for detailed prompts and descriptions
📦 Installation
Install the package using npm:
npm install aryanimagine🚀 Quick Start
const { animagine } = require('aryanimagine');
(async () => {
try {
const result = await animagine('cute anime girl with blue hair');
console.log('Generated Image URL:', result.url);
} catch (error) {
console.error('Error:', error.message);
}
})();📖 API Documentation
animagine(prompt)
Generates an anime-style image based on the provided text prompt.
Parameters
prompt(string, required): A descriptive text prompt for the anime image you want to generate
Returns
Returns a Promise that resolves to an object with the following structure:
{
status: 'success',
operator: 'Aryan Chauhan',
url: 'https://i.ibb.co/example/image.png'
}Error Handling
The function throws an error if:
- No prompt is provided
- API request fails
- Invalid response from the server
💡 Usage Examples
Basic Usage
const { animagine } = require('aryanimagine');
async function generateImage() {
try {
const result = await animagine('anime girl with long pink hair and green eyes');
console.log('✅ Image generated successfully!');
console.log('🔗 URL:', result.url);
console.log('👤 Operator:', result.operator);
} catch (error) {
console.error('❌ Error generating image:', error.message);
}
}
generateImage();Advanced Example with Multiple Images
const { animagine } = require('aryanimagine');
const prompts = [
'cute anime cat girl with purple hair',
'cyberpunk anime warrior with neon armor',
'magical anime princess in a fantasy forest',
'anime boy with spiky blonde hair and blue eyes'
];
async function generateMultipleImages() {
console.log('🎨 Generating multiple anime images...\n');
for (let i = 0; i < prompts.length; i++) {
try {
console.log(`📝 Prompt ${i + 1}: "${prompts[i]}"`);
const result = await animagine(prompts[i]);
console.log(`✅ Generated: ${result.url}`);
console.log('---');
} catch (error) {
console.error(`❌ Failed to generate image ${i + 1}:`, error.message);
console.log('---');
}
}
}
generateMultipleImages();Express.js Web Server Example
const express = require('express');
const { animagine } = require('aryanimagine');
const app = express();
app.use(express.json());
app.get('/', (req, res) => {
res.send(`
<html>
<body>
<h1>Anime Image Generator</h1>
<form action="/generate" method="post">
<input type="text" name="prompt" placeholder="Enter anime description..." required>
<button type="submit">Generate Image</button>
</form>
</body>
</html>
`);
});
app.post('/generate', async (req, res) => {
try {
const { prompt } = req.body;
const result = await animagine(prompt);
res.send(`
<html>
<body>
<h1>Generated Anime Image</h1>
<p><strong>Prompt:</strong> ${prompt}</p>
<img src="${result.url}" alt="Generated anime image" style="max-width: 500px;">
<br><br>
<a href="/">Generate Another</a>
</body>
</html>
`);
} catch (error) {
res.status(500).send(`Error: ${error.message}`);
}
});
app.listen(5000, '0.0.0.0', () => {
console.log('🌐 Server running on http://0.0.0.0:5000');
});🖼️ Example Generated Images
Here are some examples of images generated using different prompts:
Prompt: "cute anime girl with blue hair"

Prompt: "cyberpunk anime warrior"
const result = await animagine('cyberpunk anime warrior with neon armor');
// Result: { status: 'success', operator: 'Aryan Chauhan', url: 'https://...' }Prompt: "magical anime princess"
const result = await animagine('magical anime princess in enchanted forest');
// Result: { status: 'success', operator: 'Aryan Chauhan', url: 'https://...' }🎯 Best Practices
Effective Prompts
- Be specific: Instead of "anime girl", use "anime girl with long red hair and blue dress"
- Include details: Mention hair color, eye color, clothing, background, etc.
- Use descriptive adjectives: cute, beautiful, elegant, fierce, mysterious
- Specify style: cyberpunk, fantasy, school uniform, magical girl, etc.
Examples of Good Prompts
// Good prompts for better results
const goodPrompts = [
'cute anime girl with twin tails, school uniform, cherry blossom background',
'fierce anime warrior with silver armor and glowing sword',
'elegant anime princess with golden hair and royal dress',
'cyberpunk anime hacker with neon hair and futuristic outfit',
'magical anime witch with purple robes and floating crystals'
];🔧 Error Handling
const { animagine } = require('aryanimagine');
async function robustImageGeneration(prompt) {
try {
// Validate input
if (!prompt || typeof prompt !== 'string') {
throw new Error('Valid prompt string is required');
}
if (prompt.length < 3) {
throw new Error('Prompt must be at least 3 characters long');
}
const result = await animagine(prompt);
// Verify result
if (!result.url) {
throw new Error('No image URL in response');
}
return result;
} catch (error) {
console.error('Generation failed:', error.message);
// Handle specific error types
if (error.message.includes('HTTP Error')) {
console.log('🔄 API might be temporarily unavailable. Try again later.');
} else if (error.message.includes('Prompt is required')) {
console.log('📝 Please provide a valid prompt.');
}
throw error;
}
}🌟 Contributing
We welcome contributions! If you have suggestions, bug reports, or want to contribute code:
- Visit our GitHub repository
- Open an issue or submit a pull request
- Follow our coding standards and guidelines
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
👨💻 Author
Aryan Chauhan - @arychauhann
🔗 Links
📊 Stats
- ⭐ Easy to use: One function call to generate images
- 🚀 Fast: Typical generation time under 10 seconds
- 🎨 High quality: AI-powered anime-style image generation
- 📦 Lightweight: Minimal dependencies and small package size
Happy generating! 🎨✨
Made with ❤️ by Aryan Chauhan
