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

@eyepop.ai/eyepop

v3.15.0

Published

The official Node.js / Typescript library for EyePop.ai's inference API

Downloads

2,329

Readme

EyePop.ai Node SDK

The EyePop.ai Node SDK provides JavaScript and TypeScript access to EyePop worker sessions for image and video inference.

Installation

Node

The SDK is tested with Node 20 LTS and newer.

npm install --save @eyepop.ai/eyepop

See the Node examples for runnable scripts.

Browser

Browser applications can use the bundled SDK directly:

<script src="https://cdn.jsdelivr.net/npm/@eyepop.ai/eyepop/dist/eyepop.min.js"></script>

API keys must not be used in browser code. Browser apps should connect with sessions created by your trusted backend.

React Native

React Native applications should use the React Native package:

npm install --save @eyepop.ai/react-native-eyepop

See the React Native example.

Authentication

The SDK supports these authentication patterns:

  • API key authentication for trusted server-side code.
  • Persistent worker session selection for provisioned deployments.
  • Browser OAuth for dashboard users building local demos.

Server-Side API Key

Set EYEPOP_API_KEY in your server environment. API keys are secrets and must not be exposed in browser bundles, mobile app bundles, or public repositories.

export EYEPOP_API_KEY=<your_api_key>

For provisioned persistent worker sessions, also set EYEPOP_SESSION_UUID.

import { EyePop } from '@eyepop.ai/eyepop'

;(async () => {
    const endpoint = await EyePop.workerEndpoint().connect()
    try {
        await endpoint.changePop({
            components: [
                {
                    type: 'inference',
                    model: 'eyepop.person:latest',
                    categoryName: 'person',
                },
            ],
        })

        const results = await endpoint.process({ source: { path: 'examples/example.jpg' } })
        for await (const result of results) {
            console.log(result)
        }
    } finally {
        await endpoint.disconnect()
    }
})()

You can also pass the key explicitly from server-side configuration:

const endpoint = await EyePop.workerEndpoint({
    auth: { apiKey: process.env.EYEPOP_API_KEY },
}).connect()

Persistent Sessions

If EyePop has provisioned a persistent worker session for your deployment, set EYEPOP_SESSION_UUID in the trusted server environment or pass sessionUuid explicitly.

export EYEPOP_API_KEY=<your_api_key>
export EYEPOP_SESSION_UUID=<your_session_uuid>
import { EyePop } from '@eyepop.ai/eyepop'

;(async () => {
    const endpoint = await EyePop.workerEndpoint({
        sessionUuid: process.env.EYEPOP_SESSION_UUID,
    }).connect()

    try {
        const results = await endpoint.process({ source: { path: 'sample.mp4' } })
        for await (const result of results) {
            console.log(result)
        }
    } finally {
        await endpoint.disconnect()
    }
})()

Persistent sessions are normally preconfigured. In that case, process media directly and do not call changePop() unless your deployment is meant to accept runtime Pop changes.

Browser and Mobile Clients

Do not put EYEPOP_API_KEY in browser or mobile application code. Create EyePop sessions from a trusted backend, then pass only the session JSON to the client.

Browser OAuth for Local Dashboard Demos

Dashboard users can run local browser demos with the current browser session:

<script>
    document.addEventListener('DOMContentLoaded', async () => {
        const endpoint = await EyePop.workerEndpoint({ auth: { oAuth2: true } }).connect()
        try {
            await endpoint.changePop({
                components: [
                    {
                        type: 'inference',
                        model: 'eyepop.person:latest',
                        categoryName: 'person',
                    },
                ],
            })
        } finally {
            await endpoint.disconnect()
        }
    })
</script>

Processing Media

Local Files

const results = await endpoint.process({ source: { path: 'examples/example.jpg' } })
for await (const result of results) {
    console.log(result)
}

process() returns an AsyncIterable of predictions. Images normally produce one prediction. Videos and animated image containers produce one prediction per frame.

Readable Streams

Streams require an explicit MIME type:

import fs from 'node:fs'

const stream = fs.createReadStream('examples/example.jpg')
const results = await endpoint.process({
    source: { stream, mimeType: 'image/jpeg' },
})

Public URLs

Public HTTP(S), RTSP, and RTMP URLs can be processed without uploading the file from your application.

const results = await endpoint.process({
    source: { url: 'https://demo-eyepop-videos.s3.amazonaws.com/test1_vlog.mp4' },
})

Canceling Jobs

Queued and in-progress jobs can be cancelled from the result iterator:

const results = await endpoint.process({
    source: { url: 'https://demo-eyepop-videos.s3.amazonaws.com/test1_vlog.mp4' },
})

for await (const result of results) {
    console.log(result)
    if ((result.seconds ?? 0) >= 10) {
        results.cancel()
    }
}

Endpoint Options

By default, EyePop.workerEndpoint().connect() starts a worker when needed and cancels queued jobs on that worker when it connects.

Disable worker startup:

const endpoint = await EyePop.workerEndpoint({ autoStart: false }).connect()

Keep pending jobs:

const endpoint = await EyePop.workerEndpoint({ stopJobs: false }).connect()

Visualization

Rendering helpers are provided by @eyepop.ai/eyepop-render-2d.

Data Endpoint Preview

EyePop.dataEndpoint() provides preview support for dataset management and model optimization workflows. This API is experimental and subject to change.

Composable Pops Preview

See Composable Pops for a preview of client-side Pop composition.