aluma.io

The Aluma Developer Hub

Welcome to the Aluma developer hub. You'll find comprehensive guides and documentation to help you start working with Aluma as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started

Overview

The Aluma .NET Client Library is available as a set of NuGet packages:

  • Aluma.Http is a basic client which makes exposes the core functions of the Aluma service and handles all HTTP requests and responses for you, in a reliable way.

  • Aluma.Pipelines is a higher-level client for processing multiple documents either as a one-off operation or continuously as new documents require it.

Installing the Client Library

The packages are available from the public NuGet feed, and can be installed using one of the following mechanisms, as best suits your application:

Package Manager

Install-Package Aluma.Http

dotnet CLI

dotnet add package Aluma.Http

PackageReference project file element

<PackageReference Include="Aluma.Http" Version="1.0.*" />

Getting Started with the HTTP Client

static async Task Main(string[] args)
{
    const string clientID = "<Your-API-client-id>";
    const string clientSecret = "<Your-API-client-secret>";

    const string documentFilePath = "<Your-file-to-process>";
    const string extractorName = "aluma.invoices.gb";

    // Create a new client with your API client credentials
    var client = AlumaClient.Create(clientID, clientSecret);
    
    // Create a new Aluma document from your file on disk
    var document = await client.CreateDocumentAsync(documentFilePath);
    try
    {
        // Process the document. Here we're doing some data extraction, but this could
        // also be classification, creating a searchable PDF or a redacted document for example. 
        var results = await document.ExtractAsync(extractorName);
        foreach (var fieldResult in results.FieldResults)
        {
            Console.WriteLine($"{fieldResult.FieldName}: {fieldResult.Result.Text}");
        }
    }
    catch (Exception ex)
    {
        Console.WriteLine(ex);
    }
    finally
    {
        // It's important to always delete documents when you're done with them,
        // otherwise you may use up your API client's quota
        await document.DeleteAsync();    
    }
}

Updated 10 months ago

Overview


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.