@file_router/sdk on npm. It gives you a single, provider-neutral API for document parsing — either through the hosted FileRouter service or directly with your own provider keys. Before you install, make sure you’re running Node.js 22.14.0 or later.
Install the package
Choose your preferred package manager and run one of the commands below.Optional peer dependencies
By default,@file_router/sdk has no peer dependencies that you need to install manually. The optional packages below are only required when you use direct BYOK mode and want to call LlamaParse or Mistral OCR with your own API keys. If you only use the hosted FileRouterClient, you can skip this section entirely.
LlamaParse
Required when you instantiate the
llamaparse() adapter from @file_router/sdk/llamaparse.npm
Mistral OCR
Required when you instantiate the
mistralOcr() adapter from @file_router/sdk/mistral.npm
Datalab does not require an additional peer dependency — the
datalab() adapter communicates directly with the Datalab API over HTTP.Sub-path exports
The SDK ships several focused entry points so you only import what you need. Tree-shaking removes anything you don’t use.Your first import
Once the package is installed, importFileRouterClient from the main entry point and you’re ready to make your first parse call.
client.ts