Mindee is a class library helper to use the Mindee API. (Official Library)
$ dotnet add package MindeeThe official Mindee API Helper Library for the .NET ecosystem to quickly and easily connect to Mindee's API services.
This library is compatible with:
Here's the TL;DR of getting started.
First, get an API Key
Then, install this library:
dotnet add package Mindee
The API key is retrieved using IConfiguration.
So you could define it in multiple ways:
MindeeApiSettings__ApiKey
"MindeeApiSettings": {
"ApiKey": ""m-api-key"
},
In your Startup.cs or Program.cs file, configure the dependency injection (DI) as follows:
services.AddMindeeClient();This call will configure the client entry point and the pdf library used internally.
Then, in your controller or service instance, pass as an argument the class MindeeClient.
Or, you could also simply instantiate a new instance of MindeeClient:
import Mindee;
IConfiguration configuration;
var mindeeClient = new MindeeClient(configuration);Let's parse an invoice:
var prediction = await _mindeeClient
.LoadDocument(new FileInfo("/path/to/the/file.ext"))
.ParseAsync<InvoiceV3Prediction>();You can also use the client with your custom documents:
CustomEndpoint myEndpoint = new CustomEndpoint(
endpointName: "wnine",
accountName: "john",
version: "1.1" // optional
);
var prediction = await _mindeeClient
.LoadDocument(new FileInfo("/path/to/the/file.ext"))
.ParseAsync(myEndpoint);There's more to it than that for those that need more features, or want to customize the experience.
All the juicy details are described in the Official Guide.
Copyright © Mindee
Available as open source under the terms of the MIT License.