Download the PHP package sightengine/client-php without Composer
On this page you can find all versions of the php package sightengine/client-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sightengine/client-php
More information about sightengine/client-php
Files in sightengine/client-php
Package client-php
Short Description Sightengine PHP client
License
Homepage https://sightengine.com
Rated 2.67 based on 3 reviews
Informations about the package client-php
About
Use the Sightengine Moderation API to instantly moderate images and videos. See http://sightengine.com for more information.
Before starting, please make sure you have created an account on https://sightengine.com
Install
Initialize the client
You will need your API USER and API SECRET to initialize the client. You can find both of them on your Sightengine account.
Moderate an image
The API accepts both standard still images: JPEG, PNG, WEBP etc. and multi-frame GIF images.
Several moderation engines are available for you to choose from (nudity detection, inappropriate content detection etc...). Please refer to the documentation for more.
Moderate an image through a public URL:
Moderate a local image:
Moderate a binary image:
Video and Stream Moderation
You can perform either synchronous or asynchronous Video Moderation.
- Synchronous Moderation is simple and easy: the Moderation result is provided directly in the reponse to your API request. Synchronous Moderation is only available for videos that are less than 1 minute long.
- Asynchronous Moderation is available for any video or stream. Moderation results are provided through a so-called callback mechanism. You define a callback URL and the Moderation Engine will send back moderation events to that URL in realtime.
Synchronous Video Moderation
Beware: this is only for videos that have a duration below 1 minute.
Asynchronous Video Moderation
The first step to moderate a video stream is to submit the video stream to the API, along with a callback URL.
Once you have submitted the video, the API will start POSTing moderation updates to your callback URL.
Please see our Documentation for more details.
Feedback
In order to report a misclassification, you need to report the image that was misclassified, the model that was run on this image (models are nudity, face, type, wad), and the correct class of the image.
For each model, there are different classes that you may report. Here are the details:
The nudity model has 3 classes:
- raw: corresponding to raw nudity
- partial: corresponding to partial nudity
- safe: corresponding to no nudity
The face model has 3 classes:
- none
- single
- multiple
The type model has 2 classes:
- photo
- illustration
The wad model has 3 classes:
- no-weapons
- weapons
- no-alcohol
- alcohol
- no-drugs
- drugs
Example of feedback on a local image:
Example of feedback through a public URL::