The package enables easy and convenient use of Acupixel's cloud service, including processing, analysis, data extraction, and verification of the authenticity of identity documents in various ways, as well as verifying the identity of the person appearing in the document.
$ dotnet add package Acupixel.CloudService.SDKThe Acupixel Cloud Service SDK is a comprehensive .NET library for integrating document data extraction, identity verification, and document authentication into your applications.
It enables developers to securely submit identity documents and related images (such as selfies or holographic captures) to the Acupixel Cloud, where advanced AI-driven processing extracts structured data, verifies personal identity, and authenticates document integrity.
With this SDK, you can easily:
This SDK provides a streamlined, asynchronous API designed for high reliability, simple integration, and scalability across verification workflows.
The Acupixel Cloud Service SDK enables developers to send identity documents and related media to the Acupixel Cloud for automated validation and data extraction.
Core components include:
CloudManager - Initializes and configures SDK access, environments, and authorization.DocumentManager - Handles all document-related cloud operations.ProcessDocumentRequest and ProcessDocumentRequestImages - Represent input structures for processing identity documents.CloudResponse<T> - Wraps the structured response returned from the cloud.DocumentInfo, DocumentField, ForensicAuthentications, TemplateInfo - Define the rich structured data returned by document verification.CloudManagerThe entry point for initializing and establishing a secure connection with the SDK.
Responsibilities:
HttpClient instance for all requestsInitializeAsyncInitialization Example:
bool success = await CloudManager.Instance.InitializeAsync(
ServiceEnvironments.Sandbox,
"YOUR_API_KEY_HERE",
"yyyy-MM-dd"
);
if (!success)
throw new Exception("Failed to authenticate SDK.");
The SDK performs a test request (
/v1/UserManagement/GetUserTransactionsReport) to validate credentials and connectivity.
DocumentManagerManages cloud-based document processing requests.
Supports multiple input formats:
FileInfo)All formats map to the same endpoint:
v1/Document/ProcessDocumentFromFiles
Usage Example:
var images = new ProcessDocumentRequestImages<FileInfo>
{
FrontSide = new FileInfo("front.jpg"),
BackSide = new FileInfo("back.jpg"),
SelfieImage = new FileInfo("selfie.jpg")
};
var request = new ProcessDocumentRequest
{
ReturnDocumentForensicAuthentications = true,
PerformBarcodeInspection = true,
PerformIdentityVerification = true
};
var result = await DocumentManager.Instance.ProcessDocumentAsync(images, request);
DocumentInfo document = result.Data;
The SDK automatically constructs a multipart form upload, validates configuration, attaches authentication headers (x-api-key), and returns a structured response.
ProcessDocumentRequestSpecifies document-processing options and output preferences such as whether to include cropped images, perform authentication, or verify against government databases.
Key Fields:
ReturnDocumentForensicAuthentications - Full authentication to verify the authenticity of the identification document.ReturnFrontImage, ReturnBackImage, ReturnFaceImage - Include specific visual elements.PerformIdentityVerification, PerformAAMVADriverLicenseVerification - Enable deeper identity checks.FetchWebFields - Enrich results with online data sources.CheckForSelfieLiveness - Evaluate selfie authenticity.These options let you fine-tune trade-offs between latency, cost, and depth of verification.
ProcessDocumentRequestImages<T>Defines all possible image types the SDK can send to the cloud.
Supports visible, infrared, ultraviolet, holographic, and other capture types:
var images = new ProcessDocumentRequestImages<byte[]>
{
FrontSide = frontBytes,
BackInfraredImage = backIRBytes,
HologramsImage = hologramBytes
};
CloudRequestA base class for all request types, providing universal request metadata such as ApiKey, Environment, and TraceId for tracking requests through the system.
CloudResponse<T>A generic wrapper for all server responses.
Provides utilities for JSON persistence and strongly-typed deserialization.
Key Members:
Id - Transaction ID.Data - Strongly-typed payload (e.g., DocumentInfo).SaveToJson() - Save response to a local JSON file.FromJson() - Reconstruct a CloudResponse from JSON.await response.SaveToJsonAsync("response.json");
Console.WriteLine(response.Data.DocumentCountry.CountryName);
DocumentInfoEncapsulates the results of the identity document analysis - from extracted fields to forensic and biometric results.
Contains:
DocumentType, DocumentRegion, DocumentCountryFields (list of DocumentField objects)ForensicAuthentications and DocumentColorAuthenticationsFrontImage, BackImage, etc.)DocumentFieldRepresents a specific extracted field, its raw and normalized values, bounding box, and validation state.
Console.WriteLine($"{field.Label}: {field.Text.Value}");
Each field includes type info (DocumentFieldIds), extraction source (FieldSources), and FieldValidations results.
ForensicAuthenticationsIncludes full audit details of forensic tests, barcode analysis, and document authenticity scoring.
Fields such as WasAuthenticationPerformed, DocumentAuthenticityScore, and DocumentAuthenticityAdditionalDescriptions quantify reliability.
TemplateInfoMetadata about the document’s official template - such as issuing authority, circulation status, RealID status, and UV features.
AddressValidationRepresents the validation results of the address appearing on the identification document, along with breakdown details and extraction metadata.
Includes the validation status, the source of the field, and detailed address information.
AgeVerificationProvides age and date-of-birth validation results obtained by comparing extracted document data against authoritative databases.
Indicates whether the country is supported, whether a person was found, calculated age, and whether the age meets the specified limit.
CountryInfoContains comprehensive metadata about the issuing country of the identification document - including ISO codes, jurisdiction, and region.
This model helps identify document origin and jurisdiction hierarchy.
FieldValidationsDefines a rich set of validation checks applied to each field extracted from the document.
Covers multiple validation types, such as OCR accuracy, barcode and MRZ matches, date consistency, jurisdiction checks, and logical data integrity.
FieldValueRepresents the normalized field value, including parsed date components and character alphabet detection.
Automatically constructs a valid DateTime when applicable.
ForensicBarcodeInspectionProvides details about the barcode inspection performed on the ID document - including extracted barcode image, location, and inspection results.
Useful for assessing barcode integrity and readability.
ForensicDataInspectionContains information about data integrity checks performed on the document’s fields, including whether the document has expired, field validations passed, and general data consistency.
IdentityVerificationMatchRepresents identity verification results comparing document data against external databases.
Includes detailed match confidence for multiple identity aspects - name, address, date of birth, SSN, driver license, and contact details.
PostalCodeValidationContains the validation results of postal codes extracted from the document.
Includes structured postal information, test results, and overall validation status with the source of extraction.
AAMVAVerificationRepresents detailed verification results against AAMVA (American Association of Motor Vehicle Administrators) state databases.
Evaluates identity data (e.g., names, document number, dates, and demographics) for accuracy and legitimacy.
// Initialize SDK
await CloudManager.Instance.InitializeAsync(ServiceEnvironments.Production, "API_KEY");
// Create processing input
var request = new ProcessDocumentRequest
{
PerformIdentityVerification = true,
ReturnDocumentForensicAuthentications = true
};
var images = new ProcessDocumentRequestImages<FileInfo>
{
FrontSide = new FileInfo("front.png"),
BackSide = new FileInfo("back.png"),
SelfieImage = new FileInfo("selfie.png")
};
// Submit for cloud processing
CloudResponse<DocumentInfo> response =
await DocumentManager.Instance.ProcessDocumentAsync(images, request);
// Work with results
Console.WriteLine($"Document Type: {response.Data.DocumentType}");
Console.WriteLine($"Holder Name: {response.Data.GetFieldByKind(DocumentFieldIds.FullName)}");
Task-based)CloudManager, DocumentManager)Custom exception types provide detailed error contexts:
BadRequestExceptionUnauthorizedUserExceptionForbiddenExceptionInternalServerErrorExceptionThese are thrown based on HTTP status codes received from the Acupixel Cloud API.
This SDK is proprietary to Acupixel.
All rights reserved. Usage is subject to the Acupixel developer license agreement.