Skip to content

Commit eb5e74e

Browse files
author
agrandiere
committed
update readme
1 parent 8fbb103 commit eb5e74e

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

README.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,32 @@ $output = $client->check(['nudity', 'type', 'properties', 'wad', 'face'])->set_b
5959
```
6060

6161
# Video and Stream Moderation
62-
The first step to detect nudity in a video stream is to submit the video stream to the API.
62+
63+
You can perform either _synchronous_ or _asynchronous_ Video Moderation.
64+
65+
* 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.
66+
* 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.
67+
68+
## Synchronous Video Moderation
69+
70+
Beware: this is only for videos that have a duration below 1 minute.
6371

6472
```php
65-
$client->check(['nudity', 'wad'])->video('https://sightengine.com/assets/stream/examples/funfair.mp4', 'https://example.com/yourcallback')
73+
$client->check(['nudity', 'wad'])->video_sync('https://sightengine.com/assets/stream/examples/funfair.mp4')
6674
```
6775

68-
You can also moderate a video synchronously. This only works for videos that are shorter than a minute.
76+
## Asynchronous Video Moderation
77+
78+
The first step to moderate a video stream is to submit the video stream to the API, along with a callback URL.
79+
6980
```php
70-
$client->check(['nudity', 'wad'])->video_sync('https://sightengine.com/assets/stream/examples/funfair.mp4')
81+
$client->check(['nudity', 'wad'])->video('https://sightengine.com/assets/stream/examples/funfair.mp4', 'https://example.com/yourcallback')
7182
```
7283

84+
Once you have submitted the video, the API will start POSTing moderation updates to your callback URL.
85+
86+
Please see our [Documentation](https://sightengine.com/docs) for more details.
87+
7388
# Feedback
7489
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.
7590

0 commit comments

Comments
 (0)