AntiScamAI.SDK
1.0.2
dotnet add package AntiScamAI.SDK --version 1.0.2
NuGet\Install-Package AntiScamAI.SDK -Version 1.0.2
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="AntiScamAI.SDK" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AntiScamAI.SDK" Version="1.0.2" />
<PackageReference Include="AntiScamAI.SDK" />
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 AntiScamAI.SDK --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AntiScamAI.SDK, 1.0.2"
#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 AntiScamAI.SDK@1.0.2
#: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=AntiScamAI.SDK&version=1.0.2
#tool nuget:?package=AntiScamAI.SDK&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
AntiScamAI.SDK
AI-powered request inspection middleware for ASP.NET Core.
Register two lines in Program.cs and every incoming request is automatically screened by a trained AI model for scams, phishing, social engineering, and fraudulent content.
Install
dotnet add package AntiScamAI.SDK
Quick Start
// Program.cs
builder.Services.AddAntiScamAI(options =>
{
options.ApiKey = builder.Configuration["AntiScam:ApiKey"]!;
options.Mode = "block"; // "block" | "flag" | "monitor"
options.OnThreat = threat =>
{
logger.LogWarning("Threat detected: score={Score} level={Level}",
threat.Score, threat.RiskLevel);
return Task.CompletedTask;
};
});
var app = builder.Build();
app.UseRouting();
app.UseAntiScamAI(); // ← add before UseAuthorization
app.UseAuthorization();
app.MapControllers();
app.Run();
What Gets Blocked
| Threat | Example |
|---|---|
| Phishing messages | "Your account is suspended — verify now" |
| Investment fraud | "Guaranteed 500% ROI — risk-free" |
| Lottery / prize scams | "You've won $50,000 — claim your prize" |
| Social engineering | "I'm from Apple Support, share your OTP" |
| Phishing URLs in body | http://secur3-paypal.xyz/verify |
| Prompt injection (LLM) | "Ignore previous instructions…" |
| Credential phishing | "Enter your password to verify identity" |
HTTP 403 on Blocked Request
{
"error": "Request blocked by AntiScam AI",
"requestId": "a4f2c1d3...",
"riskLevel": "HIGH",
"reason": "High urgency language + suspicious patterns detected"
}
Read the Inspection Result in a Controller
[HttpPost("contact")]
public IActionResult Contact([FromBody] ContactRequest request)
{
var result = HttpContext.GetAntiScamResult();
// result.ThreatScore → double 0–100
// result.RiskLevel → "MINIMAL" | "LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
// result.Decision → "allow" | "flag" | "block"
// result.Threats → List<ThreatDetail>
return Ok();
}
Modes
| Mode | Behaviour |
|---|---|
block |
Requests scoring ≥65 return HTTP 403 (default) |
flag |
Allowed but sets X-AntiScam-Flag: true response header |
monitor |
All requests pass; threats are only logged |
Configuration Reference
builder.Services.AddAntiScamAI(options =>
{
options.ApiKey = "required";
options.Endpoint = "http://localhost:5000"; // AntiScam AI gateway
options.Mode = "block"; // block | flag | monitor
options.TimeoutMs = 3000;
options.OnError = "allow"; // allow (fail-open) | block
options.ExcludePaths = new[] { "/health", "/metrics", "/swagger" };
options.InspectMethods = new[] { "POST", "PUT", "PATCH" };
options.OnThreat = threat => { /* ... */ return Task.CompletedTask; };
});
Or via appsettings.json:
{
"AntiScam": {
"ApiKey": "YOUR_KEY",
"Endpoint": "http://localhost:5000",
"Mode": "block"
}
}
Self-Hosting
git clone https://github.com/antiscamai/backend
cd backend/deploy/docker
docker-compose up -d
Requirements
- .NET 8.0+
- ASP.NET Core 8.0+
License
MIT © AntiScam AI
| Product | Versions 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.