ANTINUDE.IO / SDK v0.9 / iOS · ANDROIDALL SYSTEMS · 47ms p50
AN
AntiNudev0.9
ProductPricingDocsSecurity
GETTING STARTED / Quickstart

Quickstart.

Add AntiNude to your iOS or Android app in under 10 minutes. The model runs entirely on-device — no images leave the user's phone.

§01 / INSTALL

Install the SDK.

Package.swift · SPMcopy
1dependencies: [
2 .package(url: "https://github.com/AntiNude/an-sdk-ios.git", from: "0.9.0"),
3]
§02 / INIT

Initialize an ANClient.

Construct an ANClient with your API key. Do this once per process — the model loads on construction.

Swiftcopy
1import ANSdk
2
3let client = try ANClient(apiKey: "ak_live_…")
4// Model loads lazily on first scan (~30 ms).
§03 / SCAN

Run your first scan.

Swiftcopy
1let data = try Data(contentsOf: imageURL)
2let result = try await client.scanImage(data)
3
4if result.verdict == "unsafe" {
5 // top class, e.g. "FEMALE_BREAST_EXPOSED" + score 0.94
6 reportToModeration(result.topCategory, result.topScore)
7} else {
8 showImage(data)
9}
[!]
Default verdict rule (hardcoded).
The SDK marks a scan unsafe if any of the five “exposed” classes (female breast / genitalia, male genitalia, buttocks, anus) scores above 0.50. To customise this — e.g. block at a lower score, or treat a different subset as unsafe — inspect result.detections yourself. See Custom verdict rules.
§04 / RESPONSE

What you get back.

FIELDTYPEEXAMPLENOTES
verdictString"safe" / "unsafe"Derived from detections
topCategoryString?"FEMALE_BREAST_EXPOSED"Highest-scoring class, if any
topScoreDouble?0.940.0–1.0 · confidence of the top detection
detections[Detection]?[…]All detections incl. bbox (on-device only)
latencyMsInt47Wall-clock on-device
modelVersionString"nudenet-320n-v3.4"Pinned per SDK release
requestIdString?"req_9af2…"nil if reportToServer=false or telemetry failed