npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

aryanimagine

v1.0.2

Published

Generate anime-style AI images using the Animagine API.

Readme

🎨 aryanimagine

Generate stunning anime-style AI images with a single line of code using the powerful Animagine API.

npm version npm downloads license

✨ 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" Example 1

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:

  1. Visit our GitHub repository
  2. Open an issue or submit a pull request
  3. 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