Mindee is a class library helper to use the Mindee API. (Official Library)
$ dotnet add package MindeeQuickly and easily connect to Mindee's API services using .NET.
The following .NET versions are tested and supported:
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"
},
You can instantiate the client either manually or by using dependency injection.
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:
using Mindee;
var mindeeClient = MindeeClientInit.Create("my-api-key");using Mindee;
using Mindee.Parsing.Invoice;
string apiKey = "my-api-key";
string filePath = "/path/to/the/file.ext";
MindeeClient mindeeClient = MindeeClientInit.Create(apiKey);
var documentParsed = await mindeeClient
.LoadDocument(File.OpenRead(filePath), System.IO.Path.GetFileName(filePath))
.ParseAsync<InvoiceV4Inference>();
System.Console.WriteLine(documentParsed.ToString());using Mindee;
using Mindee.Parsing.Us.BankCheck;
string apiKey = "my-api-key";
string filePath = "/path/to/the/file.ext";
MindeeClient mindeeClient = MindeeClientInit.Create(apiKey);
var documentParsed = await mindeeClient
.LoadDocument(File.OpenRead(filePath), System.IO.Path.GetFileName(filePath))
.ParseAsync<BankCheckV1Inference>();
System.Console.WriteLine(documentParsed.ToString());using Mindee;
using Mindee.Parsing;
string apiKey = "my-api-key";
string filePath = "/path/to/the/file.ext";
MindeeClient mindeeClient = MindeeClientInit.Create(apiKey);
CustomEndpoint myEndpoint = new CustomEndpoint(
endpointName: "my-endpoint",
accountName: "my-account"
);
var documentParsed = await mindeeClient
.LoadDocument(new FileInfo(filePath))
.ParseAsync(myEndpoint);
System.Console.WriteLine(documentParsed.ToString());Complete details on the working of the library are available in the following guides:
You can view the source code on GitHub.
You can also take a look at the Reference Documentation.
Copyright © Mindee
Available as open source under the terms of the MIT License.