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

bananaproai.com

v1767496.600.332

Published

Professional integration for https://bananaproai.com/

Readme

bananaproai.com

A JavaScript library for seamlessly integrating with the bananaproai.com platform, enabling efficient and scalable AI inference. This package simplifies the process of calling your deployed models.

Installation

bash npm install bananaproai.com

Usage Examples

Here are several examples showcasing how to use the bananaproai.com package in your JavaScript or Node.js projects.

1. Basic Inference Request:

This example demonstrates a simple inference request to a deployed model on Banana. javascript const banana = require('bananaproai.com');

async function runInference() { const apiKey = 'YOUR_API_KEY'; // Replace with your actual API key const modelKey = 'YOUR_MODEL_KEY'; // Replace with your actual model key

const modelInputs = { prompt: 'A photo of a cat wearing sunglasses', };

try { const output = await banana.run(apiKey, modelKey, modelInputs); console.log('Inference Output:', output);

if (output && output.modelOutputs && output.modelOutputs.length > 0) {
  // Process the model outputs
  console.log('Generated Image URL:', output.modelOutputs[0].imageURL);
} else {
  console.error('No model outputs found.');
}

} catch (error) { console.error('Error during inference:', error); } }

runInference();

2. Handling Asynchronous Inference:

For long-running tasks, you can use the call function for asynchronous inference. javascript const banana = require('bananaproai.com');

async function callInference() { const apiKey = 'YOUR_API_KEY'; // Replace with your actual API key const modelKey = 'YOUR_MODEL_KEY'; // Replace with your actual model key

const modelInputs = { prompt: 'A futuristic cityscape at sunset', };

try { const callID = await banana.call(apiKey, modelKey, modelInputs); console.log('Call ID:', callID);

// Optionally, poll the status of the call until it's complete
// You can use banana.check(apiKey, callID) to get the status
// and banana.get(apiKey, callID) to retrieve the results when ready.

} catch (error) { console.error('Error initiating call:', error); } }

callInference();

3. Checking the Status of an Asynchronous Call:

After initiating an asynchronous call, you can check its status. javascript const banana = require('bananaproai.com');

async function checkCallStatus() { const apiKey = 'YOUR_API_KEY'; // Replace with your actual API key const callID = 'YOUR_CALL_ID'; // Replace with the call ID you received

try { const status = await banana.check(apiKey, callID); console.log('Call Status:', status);

if (status.status === 'completed') {
  console.log('Call is complete!');
  // You can now retrieve the results using banana.get(apiKey, callID)
} else if (status.status === 'failed') {
  console.error('Call failed:', status.message);
} else {
  console.log('Call is still processing...');
}

} catch (error) { console.error('Error checking call status:', error); } }

checkCallStatus();

4. Retrieving Results from an Asynchronous Call:

Once an asynchronous call is complete, you can retrieve the results. javascript const banana = require('bananaproai.com');

async function getCallResults() { const apiKey = 'YOUR_API_KEY'; // Replace with your actual API key const callID = 'YOUR_CALL_ID'; // Replace with the call ID you received

try { const output = await banana.get(apiKey, callID); console.log('Call Results:', output);

} catch (error) { console.error('Error retrieving call results:', error); } }

getCallResults();

5. Complex Input Data:

The modelInputs object can contain complex data structures like arrays and nested objects, enabling you to pass more sophisticated data to your models. javascript const banana = require('bananaproai.com');

async function runInferenceWithComplexInput() { const apiKey = 'YOUR_API_KEY'; // Replace with your actual API key const modelKey = 'YOUR_MODEL_KEY'; // Replace with your actual model key

const modelInputs = { text: "Translate the following sentence to Spanish:", sentence: "Hello, how are you?", options: { formality: "formal" }, numbers: [1, 2, 3, 4, 5] };

try { const output = await banana.run(apiKey, modelKey, modelInputs); console.log('Inference Output:', output);

} catch (error) { console.error('Error during inference:', error); } }

runInferenceWithComplexInput();

API Summary

  • banana.run(apiKey, modelKey, modelInputs): Executes a synchronous inference request. Returns a Promise that resolves with the model output.
  • banana.call(apiKey, modelKey, modelInputs): Initiates an asynchronous inference request. Returns a Promise that resolves with a call ID.
  • banana.check(apiKey, callID): Checks the status of an asynchronous inference request. Returns a Promise that resolves with the call status.
  • banana.get(apiKey, callID): Retrieves the results of an asynchronous inference request. Returns a Promise that resolves with the model output.

License

MIT

This package is part of the bananaproai.com ecosystem. For advanced features and enterprise-grade tools, visit: https://bananaproai.com/