> For the complete documentation index, see [llms.txt](https://docs.eyepop.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eyepop.ai/sdks/node.md). Agents can also search and read this documentation through its [MCP server](https://docs.eyepop.ai/~gitbook/mcp).

# Node

Call EyePop from Node, the browser, and React Native

The EyePop Node SDK calls the inference and data APIs from TypeScript or JavaScript. Install it, set an API key, and run a Pop against an image, video, or stream.

{% tabs %}
{% tab title="Node" %}

```shell
npm install --save @eyepop.ai/eyepop
```

{% endtab %}

{% tab title="Browser" %}

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

{% endtab %}

{% tab title="React Native" %}

```shell
npm install --save @eyepop.ai/react-native-eyepop \
    react-native-canvas react-native-file-access@3.1.1 \
    react-native-tcp-socket react-native-webrtc
```

{% endtab %}
{% endtabs %}

### Your first prediction

```typescript
import { EyePop, PopComponentType } from '@eyepop.ai/eyepop'

const endpoint = await EyePop.workerEndpoint({
    pop: {
        components: [
            { type: PopComponentType.INFERENCE, ability: 'eyepop.person:latest' },
        ],
    },
}).connect()

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

`process()` resolves to a `ResultStream`, an `AsyncIterable` of predictions. An image normally produces one; a video or animated container produces one per frame.

Pass the Pop when you create the endpoint so the pipeline is ready before any media is processed.

To run on your own hardware instead of EyePop's cloud, point the SDK at an [on-premise instance](https://docs.eyepop.ai/developer-documentation/cli/on-premise) with **local mode**, `isLocalMode: true`. See [Local mode](https://docs.eyepop.ai/sdks/node/configuration.md#local-mode).

### Next steps

* [Configuration](https://docs.eyepop.ai/sdks/node/configuration.md) — credentials and session options
* [Running Inference](https://docs.eyepop.ai/sdks/node/inference.md) — files, streams, URLs, and image groups
* [Composable Pops](https://docs.eyepop.ai/sdks/node/composable-pops.md) — chain models into a pipeline
* [Visualization](https://docs.eyepop.ai/sdks/node/visualization.md) — draw predictions on a canvas


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.eyepop.ai/sdks/node.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
