> ## Documentation Index
> Fetch the complete documentation index at: https://docs.documind.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

## System Requirements

To run **Documind**, your system should meet the following requirements:

* **Node.js**: Version 16 or higher
* **npm**: For package management
* **Ghostscript**: Required for PDF processing
  * [Installation guide for Ghostscript](https://ghostscript.com/releases/index.html)
* **GraphicsMagick**: For image processing
  * [Installation guide for GraphicsMagick](http://www.graphicsmagick.org/download.html)

***

## Install the Package

To install **Documind**, run the following command:

```bash theme={"system"}
npm install documind
```

## Set Up Environment Variables

Create a `.env` file and configure your environment variables based on the model you want to use. Here's a list of supported models:

| Provider   | Models                                                                                                                                     | Variable         |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------- |
| **OpenAI** | `gpt-4o-mini`<br />`gpt-4o`                                                                                                                | `OPENAI_API_KEY` |
| **Google** | `gemini-2.0-flash-001`<br />`gemini-2.0-flash-lite-preview-02-05`<br />`gemini-1.5-flash`<br />`gemini-1.5-flash-8b`<br />`gemini-1.5-pro` | `GEMINI_API_KEY` |
| **Ollama** | `llama3.2-vision`                                                                                                                          | `BASE_URL`       |

## Usage

Here's an example of how to use **Documind**:

<Note> If you don't set a model, `gpt-4o-mini` will be used by default. </Note>

```javascript theme={"system"}
import { extract } from 'documind';

const result = await extract({
  file: 'https://example.com/bank_statement.pdf',
  model: 'gpt-4o-mini',
  schema: []
});

console.log(result);
```
