Scanii 7.2.0

dotnet add package Scanii --version 7.2.0
                    
NuGet\Install-Package Scanii -Version 7.2.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="Scanii" Version="7.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Scanii" Version="7.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Scanii" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Scanii --version 7.2.0
                    
#r "nuget: Scanii, 7.2.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.
#:package Scanii@7.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Scanii&version=7.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Scanii&version=7.2.0
                    
Install as a Cake Tool

scanii-dotnet

.NET client for the Scanii content processing API.

Installation

dotnet add package Scanii --version 7.2.0

SDK Principles

  1. Light. Zero runtime dependencies, stdlib only.
  2. Up to date. Always current with the latest Scanii API.
  3. Integration-only. Wraps the REST API — retries, concurrency, and batching are the caller's responsibility.

Quickstart

using Scanii;

var client = ScaniiClients.CreateDefault(ScaniiTarget.Us1, "your-api-key", "your-api-secret");
var result = await client.Process("/path/to/file.pdf");
if (result.Findings.Count == 0)
    Console.WriteLine("Content is safe!");
else
    Console.WriteLine($"Findings: {string.Join(", ", result.Findings)}");

API Reference

Full API documentation: https://scanii.github.io/openapi/v22/

All methods are on IScaniiClient, created via ScaniiClients.CreateDefault.

Method Description
Process(path/stream, callback?, metadata?) Synchronous file scan
ProcessAsync(path/stream, callback?, metadata?) Server-side async scan, returns pending result
ProcessFromUrl(url, callback?, metadata?) Synchronous scan of a remote URL (v2.2 preview)
Fetch(url, callback?, metadata?) Server-side fetch-and-scan of a remote URL
Retrieve(id) Retrieve a previous scan result
RetrieveTrace(id) Retrieve processing event trace; returns null on 404 (v2.2 preview)
CreateAuthToken(timeoutSeconds) Mint a short-lived auth token
RetrieveAuthToken(id) Inspect an auth token
DeleteAuthToken(id) Revoke an auth token
Ping() Health check

Regional Endpoints

var client = ScaniiClients.CreateDefault(ScaniiTarget.Eu1, key, secret);
Target Endpoint
ScaniiTarget.Us1 https://api-us1.scanii.com
ScaniiTarget.Ca1 https://api-ca1.scanii.com
ScaniiTarget.Eu1 https://api-eu1.scanii.com
ScaniiTarget.Eu2 https://api-eu2.scanii.com
ScaniiTarget.Ap1 https://api-ap1.scanii.com
ScaniiTarget.Ap2 https://api-ap2.scanii.com
ScaniiTarget.Auto https://api.scanii.comdeprecated, does not guarantee regional data placement

Error Handling

try
{
    var result = await client.Process("/path/to/file");
}
catch (ScaniiAuthException)
{
    // HTTP 401 — bad credentials
}
catch (ScaniiRateLimitException)
{
    // HTTP 429 — rate limit hit
}
catch (ScaniiException ex)
{
    // other API errors
}

Local Testing with scanii-cli

docker run -d --name scanii-cli -p 4000:4000 ghcr.io/scanii/scanii-cli:latest server
var client = ScaniiClients.CreateDefault("key", "secret",
    target: new ScaniiTarget("http://localhost:4000"));

License

Apache 2.0. See LICENSE.

Product Compatible and additional computed target framework versions.
.NET 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

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
7.2.0 35 5/5/2026
7.1.0 44 5/2/2026
7.0.0 60 4/27/2026