# Mindee

> Read invoices, receipts, forms and other documents with your Mindee models and get their fields back as data, and manage the reference documents that teach a model by example.

App · 10 actions. Web page: https://docs.lodol.com/docs/integrations/mindee

## Actions

### Delete reference document

Delete a reference document so it no longer guides the model.

**Inputs**

- Reference document (`document_id`, text, required): The reference document. Pick one, or give its id from 'Upload reference document' or an earlier step.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `document_id` (text): The reference document deleted

**Example output**

```json
{
  "deleted": true,
  "document_id": "e24d4b8e-2856-41c2-8809-116b932f6fdb"
}
```

### Extract data from a document

Read an invoice, receipt, form or any document with one of your Mindee models and get its fields back as data. Waits for the answer, usually a few seconds. Each document uses Mindee credits.

**Inputs**

- Model (`model_id`, text, required): The Mindee model that reads the document, such as an invoice model. Pick one, or give its id from an earlier step.
- Document (`file`, text, required): The document to read: upload one, pick a file from an earlier step (such as an email attachment), or give a public https:// link. PDFs, JPG, PNG, TIFF and more.
- Your reference (`alias`, text): A label of your own to tag the document with, such as an invoice number or record id. It comes back on the job and the result.
- Score each value's confidence (`confidence`, true/false): Add how sure Mindee is of each value (Certain, High, Medium or Low). Useful for deciding what a person should check. Default: `false`.
- Include the document's full text (`raw_text`, true/false): Also return all the text Mindee read from the document. Default: `false`.
- Include where each value is (`polygon`, true/false): Add the position of each value on its page, as a box, in the result's fields. Default: `false`.
- Use reference documents (`rag`, true/false): Let active reference documents on the model guide the reading (see 'Upload reference document'). Default: `false`.
- Extra instructions (`text_context`, text): Extra context for the model for this document only, such as 'Amounts are in Canadian dollars'.
- Wait up to (seconds) (`wait_seconds`, number): How long to wait for Mindee before giving up, 5 to 300. Defaults to 90. The document keeps being read; its job id is in the error. From 5 to 300.

**Outputs**

- `alias` (text): Your reference, if you gave one
- `data` (object): Every field as a plain value, named as in the model: for an invoice supplier_name, invoice_number, date, total_amount, line_items and so on
- `fields` (object): Mindee's full answer for each field, with its confidence and, if asked for, its location
- `file_name` (text): The document's file name
- `inference_id` (text): The result's id (same as the job's)
- `job_id` (text): The job that produced it
- `mime_type` (text): The document's detected type
- `model_id` (text): The model that read the document
- `options` (object): Which options were on for this reading
- `page_count` (number): Pages in the document
- `rag_document_id` (text): The reference document that guided the reading, if any
- `raw_text` (text): All the document's text, if asked for

**Example output**

```json
{
  "alias": "INV-2026-0042",
  "data": {
    "date": "2026-03-15",
    "invoice_number": "INV-2026-0042",
    "line_items": [
      {
        "description": "Office chair",
        "quantity": 4.0,
        "total_price": 480.0
      }
    ],
    "supplier_name": "Acme Supplies Ltd",
    "total_amount": 1518.0
  },
  "fields": {
    "supplier_name": {
      "confidence": "Certain",
      "value": "Acme Supplies Ltd"
    }
  },
  "file_name": "invoice.pdf",
  "inference_id": "a9ad3299-d322-4c1a-9ea0-ea835a736c66",
  "job_id": "a9ad3299-d322-4c1a-9ea0-ea835a736c66",
  "mime_type": "application/pdf",
  "model_id": "2dd7ea55-71d2-4f11-afdc-af307a3e6207",
  "options": {
    "confidence": true,
    "raw_text": true
  },
  "page_count": 1,
  "rag_document_id": "",
  "raw_text": "INVOICE Invoice number: INV-2026-0042"
}
```

### Get extraction result

Get the fields Mindee read from a document, once its job is Processed. The result's id is the job's id.

**Inputs**

- Job or result ID (`inference_id`, text, required): The id of a finished job, from 'Start an extraction' or 'Get job'.

**Outputs**

- `alias` (text): Your reference, if you gave one
- `data` (object): Every field as a plain value, named as in the model: for an invoice supplier_name, invoice_number, date, total_amount, line_items and so on
- `fields` (object): Mindee's full answer for each field, with its confidence and, if asked for, its location
- `file_name` (text): The document's file name
- `inference_id` (text): The result's id (same as the job's)
- `job_id` (text): The job that produced it
- `mime_type` (text): The document's detected type
- `model_id` (text): The model that read the document
- `options` (object): Which options were on for this reading
- `page_count` (number): Pages in the document
- `rag_document_id` (text): The reference document that guided the reading, if any
- `raw_text` (text): All the document's text, if asked for

**Example output**

```json
{
  "alias": "INV-2026-0042",
  "data": {
    "date": "2026-03-15",
    "invoice_number": "INV-2026-0042",
    "line_items": [
      {
        "description": "Office chair",
        "quantity": 4.0,
        "total_price": 480.0
      }
    ],
    "supplier_name": "Acme Supplies Ltd",
    "total_amount": 1518.0
  },
  "fields": {
    "supplier_name": {
      "confidence": "Certain",
      "value": "Acme Supplies Ltd"
    }
  },
  "file_name": "invoice.pdf",
  "inference_id": "a9ad3299-d322-4c1a-9ea0-ea835a736c66",
  "job_id": "a9ad3299-d322-4c1a-9ea0-ea835a736c66",
  "mime_type": "application/pdf",
  "model_id": "2dd7ea55-71d2-4f11-afdc-af307a3e6207",
  "options": {
    "confidence": true,
    "raw_text": true
  },
  "page_count": 1,
  "rag_document_id": "",
  "raw_text": "INVOICE Invoice number: INV-2026-0042"
}
```

### Get job

Check how far Mindee has got with a document: Processing, Processed or Failed, and why if it failed.

**Inputs**

- Job ID (`job_id`, text, required): The job's id, from 'Start an extraction'.

**Outputs**

- `job` (object): The job

**Example output**

```json
{
  "job": {
    "alias": "INV-2026-0042",
    "completed_at": "2026-11-18T18:55:02.008010Z",
    "created_at": "2026-11-18T18:54:57.232815Z",
    "error": "",
    "file_name": "invoice.pdf",
    "job_id": "a9ad3299-d322-4c1a-9ea0-ea835a736c66",
    "model_id": "2dd7ea55-71d2-4f11-afdc-af307a3e6207",
    "result_url": "https://api-v2.mindee.net/v2/products/extraction/results/a9ad3299-d322-4c1a-9ea0-ea835a736c66",
    "status": "Processed"
  }
}
```

### Get reference document

Get a reference document: its status and the fields Mindee read from it.

**Inputs**

- Reference document (`document_id`, text, required): The reference document. Pick one, or give its id from 'Upload reference document' or an earlier step.

**Outputs**

- `document` (object): The reference document

**Example output**

```json
{
  "document": {
    "annotation": {
      "fields": {
        "supplier_name": {
          "guidelines": null,
          "selected": false,
          "value": "Acme Supplies Ltd"
        }
      }
    },
    "created_at": "2026-11-18T18:55:29.952605Z",
    "filename": "invoice.pdf",
    "id": "e24d4b8e-2856-41c2-8809-116b932f6fdb",
    "last_match_at": "",
    "model_id": "2dd7ea55-71d2-4f11-afdc-af307a3e6207",
    "status": "Draft",
    "total_matches": 0
  }
}
```

### List models

List the models in your Mindee organization with their ids, names and types, optionally by name or type.

**Inputs**

- Name contains (`name`, text): Only models whose name contains this text.
- Type (`model_type`, text): Only models of this type. Leave empty for all. One of: `extraction` (Data extraction), `classification`, `crop`, `ocr` (OCR (text only)), `split`.
- Page (`page`, number): Which page of results, starting at 1. Defaults to 1. At least 1.
- Page size (`per_page`, number): How many to return a page, 1 to 100. Defaults to 50. From 1 to 100.

**Outputs**

- `count` (number): How many are on this page
- `has_more` (true/false): True if there is another page after this one
- `models` (list): The models
- `page` (number): This page's number, from 1
- `per_page` (number): How many a page holds
- `total_items` (number): How many there are in all
- `total_pages` (number): How many pages there are

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "models": [
    {
      "id": "2dd7ea55-71d2-4f11-afdc-af307a3e6207",
      "model_type": "extraction",
      "name": "Invoice",
      "webhooks": []
    }
  ],
  "page": 1,
  "per_page": 50,
  "total_items": 1,
  "total_pages": 1
}
```

### List reference documents

List a model's reference documents, optionally by file name.

**Inputs**

- Model (`model_id`, text, required): The data-extraction model the reference document belongs to.
- File name contains (`filename`, text): Only documents whose file name contains this text.
- Page (`page`, number): Which page of results, starting at 1. Defaults to 1. At least 1.
- Page size (`per_page`, number): How many to return a page, 1 to 100. Defaults to 50. From 1 to 100.

**Outputs**

- `count` (number): How many are on this page
- `documents` (list): The documents
- `has_more` (true/false): True if there is another page after this one
- `page` (number): This page's number, from 1
- `per_page` (number): How many a page holds
- `total_items` (number): How many there are in all
- `total_pages` (number): How many pages there are

**Example output**

```json
{
  "count": 1,
  "documents": [
    {
      "annotation": {
        "fields": {
          "supplier_name": {
            "guidelines": null,
            "selected": false,
            "value": "Acme Supplies Ltd"
          }
        }
      },
      "created_at": "2026-11-18T18:55:29.952605Z",
      "filename": "invoice.pdf",
      "id": "e24d4b8e-2856-41c2-8809-116b932f6fdb",
      "last_match_at": "",
      "model_id": "2dd7ea55-71d2-4f11-afdc-af307a3e6207",
      "status": "Draft",
      "total_matches": 0
    }
  ],
  "has_more": false,
  "page": 1,
  "per_page": 50,
  "total_items": 1,
  "total_pages": 1
}
```

### Start an extraction

Send a document to Mindee and return at once with a job, without waiting. For long documents: check it with 'Get job' and read it with 'Get extraction result'.

**Inputs**

- Model (`model_id`, text, required): The Mindee model that reads the document, such as an invoice model. Pick one, or give its id from an earlier step.
- Document (`file`, text, required): The document to read: upload one, pick a file from an earlier step (such as an email attachment), or give a public https:// link. PDFs, JPG, PNG, TIFF and more.
- Your reference (`alias`, text): A label of your own to tag the document with, such as an invoice number or record id. It comes back on the job and the result.
- Score each value's confidence (`confidence`, true/false): Add how sure Mindee is of each value (Certain, High, Medium or Low). Useful for deciding what a person should check. Default: `false`.
- Include the document's full text (`raw_text`, true/false): Also return all the text Mindee read from the document. Default: `false`.
- Include where each value is (`polygon`, true/false): Add the position of each value on its page, as a box, in the result's fields. Default: `false`.
- Use reference documents (`rag`, true/false): Let active reference documents on the model guide the reading (see 'Upload reference document'). Default: `false`.
- Extra instructions (`text_context`, text): Extra context for the model for this document only, such as 'Amounts are in Canadian dollars'.

**Outputs**

- `job` (object): The job

**Example output**

```json
{
  "job": {
    "alias": "INV-2026-0042",
    "completed_at": "",
    "created_at": "2026-11-18T18:54:57.232815Z",
    "error": "",
    "file_name": "invoice.pdf",
    "job_id": "a9ad3299-d322-4c1a-9ea0-ea835a736c66",
    "model_id": "2dd7ea55-71d2-4f11-afdc-af307a3e6207",
    "result_url": "",
    "status": "Processing"
  }
}
```

### Update reference document

Choose which of a reference document's fields guide the model, add guidelines, and switch it Active or back to Draft. A document needs at least one chosen field to be Active.

**Inputs**

- Reference document (`document_id`, text, required): The reference document. Pick one, or give its id from 'Upload reference document' or an earlier step.
- Fields to use (`use_fields`, list): Names of the fields to use as the reference, such as supplier_name. They are the keys in the document's annotation (see 'Get reference document').
- Fields to stop using (`ignore_fields`, list): Names of fields to take out of the reference.
- Guidelines (`guidelines`, text): A note telling the model how to use the chosen fields. Applies to each field in 'Fields to use'.
- Status (`status`, text): Active uses the document as a reference; Draft keeps it unused. Leave empty to keep it as it is. One of: `Active` (Active: used as a reference), `Draft` (Draft: not used yet).

**Outputs**

- `document` (object): The reference document

**Example output**

```json
{
  "document": {
    "annotation": {
      "fields": {
        "supplier_name": {
          "guidelines": null,
          "selected": false,
          "value": "Acme Supplies Ltd"
        }
      }
    },
    "created_at": "2026-11-18T18:55:29.952605Z",
    "filename": "invoice.pdf",
    "id": "e24d4b8e-2856-41c2-8809-116b932f6fdb",
    "last_match_at": "",
    "model_id": "2dd7ea55-71d2-4f11-afdc-af307a3e6207",
    "status": "Processing",
    "total_matches": 0
  }
}
```

### Upload reference document

Add an example document to a model. Mindee reads it, and once you choose its fields and make it Active, it helps the model read similar documents (turn on 'Use reference documents').

**Inputs**

- Model (`model_id`, text, required): The data-extraction model the reference document belongs to.
- Reference document (`file`, text, required): The example document: upload one, pick a file from an earlier step, or give a public https:// link.

**Outputs**

- `document` (object): The reference document

**Example output**

```json
{
  "document": {
    "annotation": {
      "fields": {
        "supplier_name": {
          "guidelines": null,
          "selected": false,
          "value": "Acme Supplies Ltd"
        }
      }
    },
    "created_at": "2026-11-18T18:55:29.952605Z",
    "filename": "invoice.pdf",
    "id": "e24d4b8e-2856-41c2-8809-116b932f6fdb",
    "last_match_at": "",
    "model_id": "2dd7ea55-71d2-4f11-afdc-af307a3e6207",
    "status": "Processing",
    "total_matches": 0
  }
}
```
