Skip to main content

Installation

You can install the VLM Run Node.js SDK using npm, yarn, or pnpm:

Authentication

To use the VLM Run API, you’ll need an API key. You can obtain one by:
  1. Create an account at VLM Run
  2. Navigate to dashboard Settings -> API Keys
Then use it to initialize the client:

Basic Usage

Image Predictions

Here’s a simple example of using the SDK to process an image:

Process an image passing zod schema

Process an image using local file

Document Predictions

Here’s how to process documents:

Process a document passing zod schema

TypeScript Support

The VLM Run Node.js SDK is written in TypeScript and provides full type definitions out of the box. When using TypeScript, you’ll get:
  • Full IntelliSense support
  • Type checking for all API calls
  • Type definitions for request and response objects
  • Autocomplete for configuration options
To get the best development experience, make sure your tsconfig.json includes: