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

@actorhubai/sdk

v0.1.0

Published

Official JavaScript/TypeScript SDK for ActorHub.ai - Verify AI-generated content against protected identities

Readme

ActorHub JavaScript/TypeScript SDK

Official JavaScript/TypeScript SDK for ActorHub.ai - Verify AI-generated content against protected identities.

Installation

npm install @actorhub/sdk
# or
yarn add @actorhub/sdk
# or
pnpm add @actorhub/sdk

Quick Start

import { ActorHub } from '@actorhub/sdk';

// Initialize the client
const client = new ActorHub({ apiKey: 'your-api-key' });

// Verify if an image contains protected identities
const result = await client.verify({
  imageUrl: 'https://example.com/image.jpg'
});

if (result.protected) {
  console.log('Protected identity detected!');
  for (const identity of result.identities) {
    console.log(`  - ${identity.displayName} (similarity: ${identity.similarityScore})`);
  }
}

Features

  • TypeScript First: Full type definitions included
  • Universal: Works in Node.js and browsers
  • Identity Verification: Check if images contain protected identities
  • Consent Checking: Verify consent before AI generation
  • Marketplace Access: Browse and license identities
  • Automatic Retries: Built-in retry logic with exponential backoff
  • Error Handling: Typed error classes for easy handling

Usage Examples

Verify Image

import { ActorHub } from '@actorhub/sdk';

const client = new ActorHub({ apiKey: 'your-api-key' });

// From URL
const result = await client.verify({
  imageUrl: 'https://example.com/image.jpg'
});

// From base64
const result = await client.verify({
  imageBase64: 'base64-encoded-data...'
});

console.log(`Protected: ${result.protected}`);
console.log(`Faces detected: ${result.facesDetected}`);

Check Consent (for AI Platforms)

const result = await client.checkConsent({
  imageUrl: 'https://example.com/face.jpg',
  platform: 'runway',
  intendedUse: 'video',
  region: 'US'
});

if (result.protected) {
  for (const face of result.faces) {
    console.log(`Consent for video: ${face.consent.videoGeneration}`);
    console.log(`License available: ${face.license.available}`);
  }
}

Browse Marketplace

// Search listings
const listings = await client.listMarketplace({
  query: 'actor',
  category: 'ACTOR',
  sortBy: 'popular',
  limit: 10
});

for (const listing of listings) {
  console.log(`${listing.title} - $${listing.basePriceUsd}`);
}

Purchase License

import { LicenseType, UsageType } from '@actorhub/sdk';

const purchase = await client.purchaseLicense({
  identityId: 'uuid-here',
  licenseType: LicenseType.STANDARD,
  usageType: UsageType.COMMERCIAL,
  projectName: 'My AI Project',
  projectDescription: 'Creating promotional content',
  durationDays: 30,
});

// Redirect user to Stripe checkout
console.log(`Checkout URL: ${purchase.checkoutUrl}`);

Get My Licenses

const licenses = await client.getMyLicenses({ status: 'active' });

for (const license of licenses) {
  console.log(`${license.identityName} - ${license.licenseType} - Expires: ${license.expiresAt}`);
}

Error Handling

import {
  ActorHub,
  AuthenticationError,
  RateLimitError,
  ValidationError,
  NotFoundError,
} from '@actorhub/sdk';

const client = new ActorHub({ apiKey: 'your-api-key' });

try {
  const result = await client.verify({
    imageUrl: 'https://example.com/image.jpg'
  });
} catch (error) {
  if (error instanceof AuthenticationError) {
    console.error('Invalid API key');
  } else if (error instanceof RateLimitError) {
    console.error(`Rate limit exceeded. Retry after: ${error.retryAfter} seconds`);
  } else if (error instanceof ValidationError) {
    console.error(`Validation error: ${error.message}`);
  } else if (error instanceof NotFoundError) {
    console.error('Resource not found');
  }
}

Configuration

const client = new ActorHub({
  apiKey: 'your-api-key',
  baseUrl: 'https://api.actorhub.ai',  // Custom base URL
  timeout: 30000,                       // Request timeout in ms
  maxRetries: 3,                        // Max retry attempts
});

API Reference

ActorHub Client

| Method | Description | |--------|-------------| | verify() | Verify if image contains protected identities | | getIdentity() | Get identity details by ID | | checkConsent() | Check consent status for AI generation | | listMarketplace() | Search marketplace listings | | getMyLicenses() | Get user's purchased licenses | | purchaseLicense() | Purchase a license | | getActorPack() | Get Actor Pack status |

Browser Usage

The SDK works in browsers with native fetch:

<script type="module">
  import { ActorHub } from 'https://esm.sh/@actorhub/sdk';

  const client = new ActorHub({ apiKey: 'your-api-key' });
  const result = await client.verify({ imageUrl: '...' });
</script>

Requirements

  • Node.js 16+ (for Node.js usage)
  • Modern browser with ES2020 support

License

MIT License - see LICENSE for details.

Links