> ## Documentation Index
> Fetch the complete documentation index at: https://unfold-0a6049eb.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Install the TypeScript SDK and parse a document with Unfold.

## Requirements

* Node.js 22.14 or newer
* A Unfold API key from the [dashboard](https://unfold.unfold-app.workers.dev/dashboard)

## Install the SDK

<CodeGroup>
  ```bash npm theme={null}
  npm install @file_router/sdk
  ```

  ```bash pnpm theme={null}
  pnpm add @file_router/sdk
  ```

  ```bash yarn theme={null}
  yarn add @file_router/sdk
  ```
</CodeGroup>

## Parse a document

```ts theme={null}
import { Unfold } from "@file_router/sdk"

const router = new Unfold({
  apiKey: process.env.FILEROUTER_API_KEY,
})

const result = await router.parse("https://example.com/report.pdf", {
  provider: "llamaparse",
  outputs: ["markdown"],
})

console.log(result.outputs.markdown)
```

`Unfold` stores the document, creates a durable hosted job, waits for it to finish, and returns the normalized result. Its default timeout is ten minutes.

## Use an environment variable

If `FILEROUTER_API_KEY` is set, you can omit the constructor options:

```bash theme={null}
export FILEROUTER_API_KEY="fr_..."
```

```ts theme={null}
const router = new Unfold()
```

<Tip>
  Prefer direct processing instead? See [Processing
  modes](/concepts/processing-modes) before choosing a setup.
</Tip>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.