@@ -34,19 +34,28 @@ Several moderation engines are available for you to choose from (nudity detectio
3434``` php
3535# Detect nudity in an image
3636
37- $output = $client->check(['nudity'])->image ('http://img09.deviantart.net/2bd0/i/2009/276/c/9/magic_forrest_wallpaper_by_goergen.jpg')
37+ $output = $client->check(['nudity'])->set_url ('http://img09.deviantart.net/2bd0/i/2009/276/c/9/magic_forrest_wallpaper_by_goergen.jpg')
3838
3939# Detect nudity, weapons, alcohol, drugs, likely fruadulant users, celebrities and faces in an image, along with image properties and type
40- $output = $client->check(['nudity', 'type', 'properties', 'wad', 'face', 'scam', 'celebrity'])->image ('http://img09.deviantart.net/2bd0/i/2009/276/c/9/magic_forrest_wallpaper_by_goergen.jpg')
40+ $output = $client->check(['nudity', 'type', 'properties', 'wad', 'face', 'scam', 'celebrity'])->set_url ('http://img09.deviantart.net/2bd0/i/2009/276/c/9/magic_forrest_wallpaper_by_goergen.jpg')
4141```
4242
4343## Moderate a local image:
4444``` php
4545# Detect nudity in an image
46- $output = $client->check(['nudity'])->image ('/full/path/to/image.jpg')
46+ $output = $client->check(['nudity'])->set_file ('/full/path/to/image.jpg')
4747
4848# Detect nudity, weapons, alcohol, drugs and faces in an image, along with image properties and type
49- $output = $client->check(['nudity', 'type', 'properties', 'wad', 'face'])->image('/full/path/to/image.jpg')
49+ $output = $client->check(['nudity', 'type', 'properties', 'wad', 'face'])->set_file('/full/path/to/image.jpg')
50+ ```
51+
52+ ## Moderate a binary image:
53+ ``` php
54+ # Detect nudity in an image
55+ $output = $client->check(['nudity'])->set_bytes($binary_image)
56+
57+ # Detect nudity, weapons, alcohol, drugs and faces in an image, along with image properties and type
58+ $output = $client->check(['nudity', 'type', 'properties', 'wad', 'face'])->set_bytes($binary_image)
5059```
5160
5261# Video and Stream Moderation
0 commit comments