If you need a service to spot inappropriate photos in real-time without a server, Imagga offers a powerful image recognition API. It offers a wide range of features, including image tagging, visual search, face recognition and content moderation. Imagga's API can automatically classify images and create thumbnails, and it can be customized with machine learning for your own categories. The API can be used in several ways, including cloud, on-premise and edge/mobile, so it can be adapted to a variety of needs.
Another good option is NSFW JS, a JavaScript library that runs an indecency detection model directly in a web browser for privacy and to avoid potentially disturbing images. It's got a high accuracy rate and a relatively small model size, so it's good for situations where you need to moderate content in real time, like a website that needs to screen what people submit. It can handle camera input and blur protection, too, so it's a good choice if you want to keep things family friendly.