NSFW Image Detector API - Dart/Flutter Client

NSFW Image Detector is an NSFW detection API that checks whether an image contains explicit adult content. Upload a JPG, PNG or GIF up to 5 MB, or pass an image URL, to get isNSFW and isSafe flags.

pub package License: MIT

This is the Dart/Flutter client for the NSFW Image Detector API.

Installation

Add this to your pubspec.yaml:

dependencies:
  apiverve_nsfwimagedetector: ^1.2.7

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage

import 'package:apiverve_nsfwimagedetector/apiverve_nsfwimagedetector.dart';

void main() async {
  final client = NsfwimagedetectorClient('YOUR_API_KEY');

  try {
    // This API requires a file upload — a JSON body is rejected with a 400.
    final response = await client.executeWithFile('/path/to/your-file');

    print('Status: ${response.status}');
    print('Data: ${response.data}');
  } catch (e) {
    print('Error: $e');
  }
}

Response

{
  "status": "ok",
  "error": null,
  "data": {
    "isNSFW": false,
    "isSafe": true,
    "confidence": 0.987,
    "category": "neutral"
  }
}

API Reference

Authentication

All requests require an API key. Get yours at apiverve.com.

License

MIT License - see LICENSE for details.


Built with Dart for APIVerve

Libraries

apiverve_nsfwimagedetector
NSFW Image Detector API client for Dart/Flutter