Mindee 3.12.0

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package Mindee --version 3.12.0
NuGet\Install-Package Mindee -Version 3.12.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Mindee" Version="3.12.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Mindee --version 3.12.0
#r "nuget: Mindee, 3.12.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Mindee as a Cake Addin
#addin nuget:?package=Mindee&version=3.12.0

// Install Mindee as a Cake Tool
#tool nuget:?package=Mindee&version=3.12.0

License: MIT GitHub Workflow Status NuGet NuGet

Mindee API Helper Library for .NET

Quickly and easily connect to Mindee's API services using .NET.

Requirements

The following .NET versions are tested and supported:

  • Standard 2.0
  • 4.7.2, 4.8 (Windows only)
  • 6.0, 7.0 (Linux, macOS, Windows)

Quick Start

Here's the TL;DR of getting started.

First, get an API Key

Then, install this library:

dotnet add package Mindee

Define the API Key

The API key is retrieved using IConfiguration.

So you could define it in multiple ways:

  • From an environment variable
Mindee__ApiKey
  • From an appsettings.json file
"Mindee": {
    "ApiKey":  "my-api-key"
},

Instantiate The Client

You can instantiate the client either manually or by using dependency injection.

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.

Manually

Or, you could also simply instantiate a new instance of MindeeClient:

using Mindee;

MindeeClient mindeeClient = new MindeeClient("my-api-key");

Loading a File and Parsing It

Global Documents
using Mindee;
using Mindee.Input;
using Mindee.Product.Invoice;

string apiKey = "my-api-key";
string filePath = "/path/to/the/file.ext";

// Construct a new client
MindeeClient mindeeClient = new MindeeClient(apiKey);

// Load an input source as a path string
// Other input types can be used, as mentioned in the docs
var inputSource = new LocalInputSource(filePath);

// Call the API and parse the input
var response = await mindeeClient
    .ParseAsync<InvoiceV4>(inputSource);

// Print a summary of the predictions
System.Console.WriteLine(response.Document.ToString());

// Print the document-level predictions
// System.Console.WriteLine(response.Document.Inference.Prediction.ToString());
Region-Specific Documents
using Mindee;
using Mindee.Input;
using Mindee.Product.Us.BankCheck;

string apiKey = "my-api-key";
string filePath = "/path/to/the/file.ext";

MindeeClient mindeeClient = new MindeeClient(apiKey);

// Load an input source as a path string
// Other input types can be used, as mentioned in the docs
var inputSource = new LocalInputSource(filePath);

// Call the API and parse the input
var response = await mindeeClient
    .ParseAsync<BankCheckV1>(inputSource);

// Print a summary of the predictions
System.Console.WriteLine(response.Document.ToString());

// Print the document-level predictions
// System.Console.WriteLine(response.Document.Inference.Prediction.ToString());
Custom Document (API Builder)
using Mindee;
using Mindee.Http;
using Mindee.Parsing;

string apiKey = "my-api-key";
string filePath = "/path/to/the/file.ext";

MindeeClient mindeeClient = new MindeeClient(apiKey);

// Load an input source as a path string
// Other input types can be used, as mentioned in the docs
var inputSource = new LocalInputSource(filePath);

// Set the endpoint configuration 
CustomEndpoint myEndpoint = new CustomEndpoint(
    endpointName: "my-endpoint",
    accountName: "my-account"
    // optionally, lock the version
    //, version: "1.1"
);

// Call the API and parse the input
var response = await mindeeClient.ParseAsync(
    inputSource, myEndpoint);

// Print a summary of all the predictions
System.Console.WriteLine(response.Document.ToString());

// Print a summary of the predictions
System.Console.WriteLine(response.Document.ToString());

// Print the document-level predictions
// System.Console.WriteLine(response.Document.Inference.Prediction.ToString());

Further Reading

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.

License

Copyright © Mindee

Available as open source under the terms of the MIT License.

Questions?

Join our Slack

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Framework net472 is compatible.  net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.12.0 126 4/8/2024
3.11.1 22 4/5/2024
3.11.0 101 3/26/2024
3.10.0 362 3/6/2024
3.9.0 239 1/30/2024
3.8.0 659 12/20/2023
3.7.1 99 12/20/2023
3.7.0 256 11/22/2023
3.6.0 162 11/17/2023
3.5.0 106 11/13/2023
3.4.0 290 10/20/2023
3.3.0 309 9/22/2023
3.2.0 170 9/13/2023
3.1.0 474 8/9/2023
3.0.0 1,034 7/28/2023
2.2.1 428 5/30/2023
2.2.0 376 3/16/2023
2.1.2 123 3/9/2023
2.1.1 120 3/8/2023
2.1.1-preview2 130 3/8/2023
2.1.1-preview1 150 3/8/2023
2.1.0 145 2/20/2023
2.0.0 1,855 2/3/2023
1.4.0 338 1/4/2023
1.3.0 333 12/22/2022
1.2.0 316 12/9/2022
1.1.0 377 11/28/2022
1.0.0 369 11/17/2022
1.0.0-rc1 126 11/16/2022

CHANGELOG.md