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

@ainize-team/ainize-js

v1.3.6

Published

A JavaScript library for the Ainize, a system for running AI models on the AI Network.

Readme

ainize-js

A JavaScript library for the Ainize, a system for running AI models on the AI Network.

Requirements

node >= 18

Installation

// from NPM
npm install @ainize-team/ainize-js

// from Yarn
yarn add @ainize-team/ainize-js

Then import the libraries in your code:

// ES6
import Ainize from '@ainize-team/ainize-js';

// CommonJS
const Ainize = require('@ainize-team/ainize-js').default;

Create account

You should login to ainize with AI Network account before deploy the container.
If you don't have an AI Network account, you can create one with the following script.

import Ainize from '@ainize-team/ainize-js';
const wallet = Ainize.createAinAccount();
console.log(wallet);
// {
//   address: '0x44f2...985B',
//   private_key: '14ba...4e67',
//   public_key: '5fec...7784'
// }

Login

import Ainize from '@ainize-team/ainize-js';
const ainize = new Ainize(1);// 0 for testnet, 1 for mainnet. You can earn testnet AIN at https://faucet.ainetwork.ai/.
ainize.login(<YOUR_PRIVATE_KEY>);

You can also login using AIN Wallet on the web.

import Ainize from '@ainize-team/ainize-js';
const ainize = new Ainize(1);
ainize.loginWithSigner();

This feature is supported from AIN Wallet version 2.0.5 or later.

Using model

You can use a model using ainize.getModel(<MODEL_NAME>). For example, you can use the meta-llama/Llama-3.1-8B-instruct model, which runs Meta's Llama-3.1-8B-instruct model.

import Ainize from '@ainize-team/ainize-js';
const ainPrivateKey = ''; // Insert your private key here

const main = async () => {
  try {
    const ainize = new Ainize(1);
    await ainize.login(ainPrivateKey);
    const inferenceModel = await ainize.getModel('meta-llama/Llama-3.1-8B-instruct');
    const request = {
      "prompt": "Hi! How’s it going?"
    };
    const response = await inferenceModel.request(request);
    console.log(response);
    ainize.logout();
  } catch(e) {
    console.log(e);
  }
}
main();

Currently supported models

| Model | MODEL_NAME | Insight Link | | -------- | ------- | ------- | | LLaMA 3.1 8B | meta-llama/Llama-3.1-8B-instruct | Link |

Deploy

You can deploy your AI model to ainize. Anyone can use your AI model with AIN token. You need AIN tokens for deploying models.

CONFIGURATION(JSON)

  • modelName: The name you want to deploying model.
  • modelUrl: Inference URL wrapped with ainize-wrapper-server.
import { Ainize } from '@ainize-team/ainize-js';
const ainPrivateKey = ''; // Insert your private key here

const main = async () => {
  try {
    const ainize = new Ainize(1);
    await ainize.login(ainPrivateKey);
    const deployConfig = {
      modelName: 'YOUR_MODEL_NAME', // e.g. meta-llama/Llama-3.1-8B-instruct
      modelUrl: 'https://ainize-free-inference.ainetwork.xyz' // This URL is for tutorial.
    }
    const model = await ainize.deploy(deployConfig);
    console.log(model.modelName);
    ainize.logout();
  } catch(e) {
    console.log(e);
  }
}
main();