Skip to main content
BYOK (Bring Your Own Key) mode lets you use the FileRouter CLI without a FileRouter account. Add --local to any parse or compare command, set the appropriate provider environment variable, and the CLI calls the provider’s API directly — your document and key never pass through the hosted FileRouter service.

How it works

By default, the CLI routes requests through the hosted FileRouter service using the API key you created with filerouter login. When you pass --local, the CLI skips that entirely and connects straight to the provider you specify. The same output formats and comparison features work exactly as they do in hosted mode.
You don’t need a FileRouter account or API key to use --local mode. The only credential required is the one for your chosen provider.

Provider environment variables

Set the environment variable for each provider you want to use:

LlamaParse

LLAMA_CLOUD_API_KEY

Mistral OCR

MISTRAL_API_KEY

Datalab

DATALAB_API_KEY
Export the variable in your shell, store it in a .env file that your shell loads at startup, or pass it inline on the command line.

Parse with --local

Pass --local to the parse command along with your provider API key:
You can pass the variable inline without exporting it first:
Inline variables are scoped to the single command invocation — they don’t persist in your shell session. This is useful for quick one-off runs or CI pipelines where you want to keep keys out of your environment.

Compare with --local

The compare command supports --local too. Every provider in the comparison uses its own environment variable:

File size limits

In --local mode, file size limits depend entirely on the provider you’re calling — not on the FileRouter service. The hosted service enforces a 100 MB ceiling, but each provider sets its own limits when you contact them directly. Check your provider’s documentation for their current upload restrictions.

Full example

Here’s a complete end-to-end example that parses a PDF with LlamaParse in local mode and saves the result as JSON: