openvino-node brings the OpenVINO™ Runtime to Node.js. Deploy deep learning models with high-performance, hardware-accelerated inference directly from JavaScript and TypeScript applications. The package provides bindings to a subset of the OpenVINO Runtime API.
Prebuilt native addons and the OpenVINO runtime are fetched during npm install. You do not need a separate OpenVINO SDK installation for typical use.
- 📦 Ready-to-use Runtime: Read, compile, and run OpenVINO IR, ONNX, TensorFlow, TFLite, and PaddlePaddle models directly from Node.js.
- 📥 Plug-and-play install: Prebuilt native addons and the OpenVINO runtime are downloaded on
npm install— no manual OpenVINO installation for typical use. - 🖥️ In-process inference: Run models directly inside your Node.js application process — no separate inference service or access tokens.
- 🚀 Performance Optimization: Hardware-specific optimizations for CPU, GPU, and NPU devices, with synchronous and asynchronous inference.
- 👨💻 Programming Language Support: API aligned with the OpenVINO Python/C++ APIs where possible, with TypeScript type definitions included.
- 🧰 Preprocessing Support: Built-in pre/post-processing (layout, resize, element type conversion) via
PrePostProcessor.
openvino-node can run any model supported by OpenVINO Runtime. The following tasks are demonstrated by the bundled samples and notebooks:
- Image classification - Recognize the main object in an image.
- Asynchronous inference - Run multiple inference requests in parallel for higher throughput.
- Object detection - Detect and localize objects with bounding boxes (SSD), including model reshaping.
- Optical character recognition (OCR) - Detect and recognize text in images.
- Image segmentation & background removal - Produce per-pixel masks to segment or remove the background.
- Semantic segmentation - Classify each pixel of an image into a category.
- Pose estimation - Estimate human body keypoints.
- Question answering (NLP) - Answer questions about a given text context.
npm install openvino-nodeconst { addon: ov } = require("openvino-node");Node.js ≥ 21. Refer to the supported platforms for more details.
| OS | x86 | ARM |
|---|---|---|
| Windows | ✅ | ❌ |
| Linux | ✅ | ✅ |
| macOS | ❌ | ✅ |
Prebuilt binaries are downloaded for your OS/arch during npm install. If a platform is unsupported, you can build from source per the JavaScript API Developer Documentation.
OpenVINO works best with models converted to OpenVINO IR (for example with Optimum Intel or ovc). ONNX, TensorFlow, TFLite, and PaddlePaddle models can also be read directly. See the model preparation documentation for more details.
Initialize the runtime Core, read a model, compile it for a device, and run inference:
const { addon: ov } = require("openvino-node");
async function main() {
const core = new ov.Core(); // OpenVINO's starting point, one Core instance per application
// Read and compile a model (OpenVINO IR, ONNX, TF, TFLite, or Paddle)
const compiledModel = await core.compileModel("/path/to/model.xml", "CPU");
// Allocate an input tensor (fill it with real input data for your model)
const input = compiledModel.inputs[0];
const inputTensor = new ov.Tensor(ov.element.f32, input.shape);
// Create an infer request and run inference
const inferRequest = compiledModel.createInferRequest();
const result = inferRequest.infer([inputTensor]);
// Read the output
console.log(result[compiledModel.outputs[0]].data);
}
main();Refer to the complete description of the addon API in the
documentation.
More runnable examples are available in the OpenVINO Node.js samples.
To use the package in development of Electron applications on Windows, make sure that the Desktop development with C++ component from Build Tools for Visual Studio is installed.
For more details, refer to the OpenVINO™ JavaScript API Developer Documentation
Contributions are always welcome! Read the Contribution Guide to learn how you can get involved.
The OpenVINO™ repository is licensed under Apache License Version 2.0. By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.