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

aryai

v1.0.0

Published

Lightweight wrapper for Aryan Chauhan's AI APIs (gpt5, deepseek, gemini-proxy, llama, lenna, brave, etc.)

Downloads

30

Readme

aryai

A lightweight Node.js wrapper for Aryan Chauhan's AI APIs, providing easy access to multiple AI services including GPT-5, DeepSeek, Gemini, Llama, and more.

🚀 Features

  • Multiple AI Models: Access to GPT-5, DeepSeek, Gemini, Llama-4, and more
  • Simple API: Clean, promise-based interface
  • Lightweight: Zero dependencies (uses Node.js built-in fetch)
  • Image Analysis: Support for image analysis through Gemini Proxy
  • Web Search: Brave search integration
  • TypeScript Ready: Works great with TypeScript projects

📦 Installation

Using npm:

npm install aryai

Using yarn:

yarn add aryai

Using pnpm:

pnpm add aryai

🔧 Requirements

  • Node.js 18+ (required for global fetch API)
  • If using Node.js < 18, you'll need to install and configure node-fetch

📖 Usage

Basic Import

const { gpt5, deepseek, geminiProxy2, lenna, brave } = require('aryai');

// Or import specific functions
const { gpt5 } = require('aryai');

GPT-5

const { gpt5 } = require('aryai');

async function askGPT5() {
  try {
    const response = await gpt5("What is artificial intelligence?", 1, false);
    console.log(response);
  } catch (error) {
    console.error('Error:', error.message);
  }
}

askGPT5();

Parameters:

  • prompt (string): Your question or prompt
  • uid (string|number, optional): User ID (default: 1)
  • reset (boolean, optional): Reset conversation context (default: false)

DeepSeek

const { deepseek } = require('aryai');

async function askDeepSeek() {
  try {
    const response = await deepseek("Explain quantum computing in simple terms");
    console.log(response);
  } catch (error) {
    console.error('Error:', error.message);
  }
}

askDeepSeek();

Gemini Proxy (Image Analysis)

const { geminiProxy } = require('aryai');

async function analyzeImage() {
  try {
    const imageUrl = "https://example.com/image.jpg";
    const response = await geminiProxy("What do you see in this image?", imageUrl);
    console.log(response);
  } catch (error) {
    console.error('Error:', error.message);
  }
}

analyzeImage();

Gemini Proxy 2 (Text Only)

const { geminiProxy2 } = require('aryai');

async function askGemini() {
  try {
    const response = await geminiProxy2("Write a short story about a robot");
    console.log(response);
  } catch (error) {
    console.error('Error:', error.message);
  }
}

askGemini();

GPT-3.5 Turbo

const { gpt35Turbo } = require('aryai');

async function askGPT35() {
  try {
    const response = await gpt35Turbo("What are the benefits of renewable energy?", 1);
    console.log(response);
  } catch (error) {
    console.error('Error:', error.message);
  }
}

askGPT35();

Llama-4

const { llama4 } = require('aryai');

async function askLlama() {
  try {
    const response = await llama4("Explain machine learning algorithms", 123);
    console.log(response);
  } catch (error) {
    console.error('Error:', error.message);
  }
}

askLlama();

Lenna AI

const { lenna } = require('aryai');

async function askLenna() {
  try {
    const response = await lenna("How does blockchain technology work?");
    console.log(response);
  } catch (error) {
    console.error('Error:', error.message);
  }
}

askLenna();

Brave Search

const { brave } = require('aryai');

async function searchBrave() {
  try {
    const response = await brave("latest news about artificial intelligence");
    console.log(response);
  } catch (error) {
    console.error('Error:', error.message);
  }
}

searchBrave();

🎯 Complete Example

const { gpt5, deepseek, geminiProxy2, lenna, brave } = require('aryai');

async function aiComparison() {
  const prompt = "What is the future of artificial intelligence?";
  
  console.log("🤖 Asking multiple AI services the same question...\n");
  
  try {
    // GPT-5 Response
    console.log("🔵 GPT-5 Response:");
    const gpt5Response = await gpt5(prompt);
    console.log(gpt5Response);
    console.log("\n" + "─".repeat(50) + "\n");
    
    // DeepSeek Response
    console.log("🔴 DeepSeek Response:");
    const deepseekResponse = await deepseek(prompt);
    console.log(deepseekResponse);
    console.log("\n" + "─".repeat(50) + "\n");
    
    // Gemini Response
    console.log("🟢 Gemini Response:");
    const geminiResponse = await geminiProxy2(prompt);
    console.log(geminiResponse);
    console.log("\n" + "─".repeat(50) + "\n");
    
    // Lenna Response
    console.log("🟡 Lenna AI Response:");
    const lennaResponse = await lenna(prompt);
    console.log(lennaResponse);
    
  } catch (error) {
    console.error("❌ Error:", error.message);
  }
}

aiComparison();

📝 API Reference

Available Functions

| Function | Description | Parameters | |----------|-------------|------------| | gpt5(prompt, uid, reset) | GPT-5 API wrapper | prompt, uid (optional), reset (optional) | | deepseek(prompt) | DeepSeek API wrapper | prompt | | geminiProxy(prompt, imgUrl) | Gemini image analysis | prompt, imgUrl | | geminiProxy2(prompt) | Gemini text-only | prompt | | gpt35Turbo(prompt, uid, reset) | GPT-3.5 Turbo wrapper | prompt, uid (optional), reset (optional) | | llama4(prompt, uid, url) | Llama-4 Maverick | prompt, uid (optional), url (optional) | | lenna(prompt) | Lenna AI wrapper | prompt | | brave(prompt) | Brave search | prompt |

Error Handling

All functions return promises and should be used with async/await or .then()/.catch() for proper error handling:

// Using async/await (recommended)
try {
  const response = await gpt5("Your prompt here");
  console.log(response);
} catch (error) {
  console.error("API Error:", error.message);
}

// Using .then()/.catch()
gpt5("Your prompt here")
  .then(response => console.log(response))
  .catch(error => console.error("API Error:", error.message));

🔧 TypeScript Support

This package works great with TypeScript. Here's an example:

import { gpt5, deepseek, geminiProxy2 } from 'aryai';

interface AIResponse {
  status: boolean | string;
  message?: string;
  error?: string;
  [key: string]: any;
}

async function getAIResponse(prompt: string): Promise<AIResponse> {
  try {
    const response: AIResponse = await gpt5(prompt, 1, false);
    return response;
  } catch (error) {
    throw new Error(`AI API Error: ${error instanceof Error ? error.message : 'Unknown error'}`);
  }
}

🚀 Deployment on Replit

This package is perfect for Replit projects! Simply install it in your Replit project:

  1. Open the Shell in your Replit project
  2. Run: npm install aryai
  3. Import and use in your code

📊 Rate Limits & Best Practices

  • Be mindful of API rate limits
  • Implement proper error handling
  • Use appropriate uid values for session management
  • Cache responses when possible to reduce API calls

🤝 Contributing

Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.

📄 License

MIT License - see the LICENSE file for details.

🙋‍♂️ Support

If you encounter any issues or have questions:

  1. Check the examples above
  2. Review the error messages (they're descriptive)
  3. Open an issue on the repository

🔗 Related


Made with ❤️ by Aryan Chauhan