Client Libraries / SDKs

Our client libraries are the preferred way of integrating with the Mindee platform.

Some useful tools are also provided, for example PDF processing and image compression.

You can use the client libraries to make API requests following the polling and webhook patterns.

All our client libraries are open-source (MIT license) and hosted on GitHub.

Installation Instructions

Requires Python ≥ 3.9. Python ≥ 3.10 is highly recommended.

Simply install the PyPi package using pip:

pip install mindee>=4.29.1

Don't see support for your favorite language or framework? Make a feature request!

Basic Usage

To get started, take a look at the Quick Start page.

Usage Details

Overall, the steps to using the Mindee service are:

  1. Configure the Client

    1. Initialize the Mindee client.

    2. Set inference parameters, in particular the model ID to use.

  2. Load and Adjust a File

    1. Load a file from various supported sources: path, bytes, etc.

    2. Optional: adjust the source file before sending.

  3. Send a File or URL

    1. Send the file or an URL with the proper parameters.

  4. Process the Response

    1. Optional: load from a webhook.

    2. Optional: access document metadata

  5. Process Result Fields

    1. Handle the field values extracted from the document

    2. Optional: access field metadata (polygons, confidence score)

Frequently Asked Questions

Can I send requests in parallel?

Yes. All clients can be used to send requests in parallel.

The exact implementation is left to the user:

  • For Node.js, you'll want to use asynchronous processing.

  • For all others, you'll want to use threads or processes.

Can I use the v1 and v2 APIs together?

Yes. Each client library has support for both v1 and v2 APIs.

You'll need to make a separate instance of the client classes:

  • .NET and Java, use MindeeClient and MindeeClientV2

  • all others, use Client and ClientV2

The code to make requests and to process results is completely different between v1 and v2.

We highly recommend having different files (or even modules) for handling each API version.

Which library features are officially supported?

Anything documented here is officially supported and is considered stable for production use.

Anything in a library that is not documented here, is not officially supported and subject to change or removal.

Can I send only a specific page of a multi-page PDF?

Yes. All libraries have support for cutting/extracting PDF pages.

Check the Manipulate PDF Pages section.

How to stop PDFs with too many pages from being sent?

Do not use file size, a text PDF with 200 pages can be smaller than a single photo.

Much more reliable to count the actual number of pages in the PDF document.

Use the built-in file metadata methods and properties to easily add business rules based on the number of pages (among other data).

Check the Source File Metadata section.

I'm using a Supabase edge function, should I use the API directly?

We recommend using the Mindee Node.js client library in Supabase.

You can install it in your edge function(s) using npm.

Last updated

Was this helpful?