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

@rynn-k/api

v1.0.5

Published

NekoLabs API Client - Easy-to-use wrapper for NekoLabs API endpoints

Downloads

2

Readme

NekoLabs API Client

Easy-to-use Node.js client untuk NekoLabs API. Module ini menyediakan interface yang simple dan intuitif untuk mengakses semua endpoint NekoLabs API.

Installation

npm install nekolabs-api

Quick Start

const NekoLabsClient = require('nekolabs-api');

// Inisialisasi client
const client = new NekoLabsClient();

// Atau dengan custom base URL
const client = new NekoLabsClient({
  baseURL: 'https://rynekoo-api.hf.space',
  timeout: 30000
});

// Gunakan API
(async () => {
  // Contoh 1: AI Chat
  const response = await client.request('ai/ai4chat', {
    text: 'Hi! How are you?'
  });
  console.log(response);

  // Contoh 2: Generate Image
  const image = await client.request('ai/flux/dev', {
    text: 'Girl wearing glasses',
    ratio: '1:1'
  });
  console.log(image);

  // Contoh 3: TikTok Downloader
  const video = await client.request('downloader/tiktok', {
    url: 'https://tiktok.com/...'
  });
  console.log(video);
})();

Features

  • ✅ Auto-load endpoints dari API
  • ✅ Type-safe dengan TypeScript definitions
  • ✅ Handle dynamic routes
  • ✅ Support multipart/form-data untuk upload
  • ✅ Error handling yang baik
  • ✅ Custom base URL support
  • ✅ Timeout configuration

Usage Examples

Basic GET Request

// Tanpa params
const result = await client.request('random/blue-archive');

// Dengan required params
const result = await client.request('ai/claude/sonnet-4', {
  text: 'What is JavaScript?'
});

// Dengan required dan optional params
const result = await client.request('canvas/quote-chat', {
  text: 'Hello World',
  name: 'Rynn',
  profile: 'https://tmpfiles.org/...',
  color: '#ff5733' // optional
});

POST Request

// POST dengan JSON body
const result = await client.request('cloudflare-ai/text-generation', {
  messages: [
    {
      role: 'user',
      content: 'Hi! How are you?'
    }
  ],
  model: '@cf/microsoft/phi-2'
});

Dynamic Routes

// Single dynamic parameter
const result = await client.request('example/:id', {
  id: '12345'
});

// Multiple dynamic parameters
const result = await client.request('example/:category/:slug', {
  category: 'technology',
  slug: 'nodejs-tutorial'
});

File Upload

const fs = require('fs');

// Upload image
const result = await client.request('example/upload-image', {
  image: fs.createReadStream('./image.jpg'),
  title: 'My Image' // optional
});

Shortcut Methods

// GET shortcut
const result = await client.request('ai/ai4chat', {
  text: 'Hello'
});

// POST shortcut
const result = await client.post('example/method/post', {
  title: 'Post Title',
  content: 'Post Content'
});

Advanced Usage

Change Base URL

const client = new NekoLabsClient();

// Switch ke URL alternatif
client.setBaseURL('https://rynekoo-api.hf.space');

// Gunakan API dengan URL baru
const result = await client.request('ai/ai4chat', {
  text: 'Hello'
});

Get Available Endpoints

// Load semua endpoints
const endpoints = await client.requestEndpoints();
console.log(endpoints);

// Get info endpoint tertentu
const info = await client.requestEndpointInfo('ai/ai4chat');
console.log(info);
/*
{
  alias: 'AI 4Chat (Text Generation)',
  method: 'GET',
  path: '/ai/ai4chat',
  category: 'AI',
  status: 'ready',
  parameters: {
    required: [
      {
        name: 'text',
        description: 'Input text for generating response.',
        type: 'string',
        example: 'Hi! How are you?'
      }
    ],
    optional: []
  }
}
*/

Custom Axios Options

// Dengan custom headers atau options
const result = await client.request('ai/ai4chat', 
  { text: 'Hello' },
  {
    headers: {
      'Custom-Header': 'value'
    },
    timeout: 5000
  }
);

API Response Format

Success Response

{
  success: true,
  result: {
    // response data
  },
  timestamp: '2025-10-23T17:50:37.601Z',
  responseTime: '1ms'
}

Module akan otomatis return result jika success.

Error Response

{
  success: false,
  message: 'Error message',
  timestamp: '2025-10-23T17:50:37.601Z'
}

Module akan otomatis return message jika gagal.

Configuration Options

const client = new NekoLabsClient({
  baseURL: 'https://api.nekolabs.my.id', // default API URL
  timeout: 30000 // request timeout in milliseconds (default: 30000)
});

Error Handling

try {
  const result = await client.request('ai/ai4chat', {
    text: 'Hello'
  });
  console.log(result);
} catch (error) {
  console.error('Error:', error.message);
}

TypeScript Support

import NekoLabsClient from 'nekolabs-api';

const client = new NekoLabsClient({
  baseURL: 'https://api.nekolabs.my.id'
});

const response = await client.request('ai/ai4chat', {
  text: 'Hello'
});

License

MIT

Author

@rynekooo

Support

Untuk bug reports dan feature requests, silakan buat issue di repository GitHub.

Links

  • API Documentation: https://api.nekolabs.my.id
  • Alternative URL: https://rynekoo-api.hf.space