NSFW Detection API Usage & Content Analysis
Analyze images for NSFW content using Voyantβs AI models. Supports single and batch image processing via secure signed requests.
Base URL: https://api.voyantnetworks.com
Endpoints:
β’ /v1/nsfw/analyze
β’ /v1/nsfw/analyze/batch
Endpoints:
β’ /v1/nsfw/analyze
β’ /v1/nsfw/analyze/batch
Official SDKs & Libraries
Use official SDKs for faster integration across platforms.
Node.js
Backend / Server-side
JavaScript (Browser)
Frontend / Web
Flutter
Mobile / Web Apps
Python
Backend / ML / Scripts
Three Step Request Flow
Send a multipart/form-data REST API request. Upload one image using image or multiple images using images .
Step 1: Create Payload
{
"accountId":"...",
"projectId":"...",
"apiKey":"..."
}
Single:
image=file.jpg
Batch:
images=file1.jpg
images=file2.jpg
Step 2: Generate Signature
signature =
HMAC_SHA256(
JSON.stringify(payload),
API_SECRET
)
Header:
x-signature: signature
Step 3: Send Request
POST /v1/nsfw/analyze
or
POST /v1/nsfw/analyze/batch
Content-Type:
multipart/form-data
SDK Usage (Recommended)
// nodejs usage below // read sdk readme from above links
const creds = {
apiKey: "YOUR_API_KEY",
accountId: "YOUR_ACCOUNT_ID", // π₯ REQUIRED
apiSecret: "YOUR_API_SECRET"
};
const nsfw = new VoyantClient.NsfwApiClient({
credentials: creds,
projectId: "YOUR_PROJECT_ID"
});
// single
await nsfw.analyze(file);
// batch
await nsfw.analyzeBatch([file1, file2]);
Response
{ "success": true, "nsfw": false }
Next Steps
Manage and optimize your NSFW API usage: