Object Detection API

The Object Detection API provides fast and accurate image object recognition using advanced neural networks developed by machine learning experts.

/v1/objectdetection POST

https://api.api-ninjas.com/v1/objectdetection

Given an input image, return a list of detected objects labels, confidence percentages and bounding boxes. Objects with confidence less than 0.3 (30%) are filtered out.


Files

  • image  required

    Image file. Must be either JPEG or PNG format and smaller than 2000 by 2000.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Sample Request Live Demo!

https://api.api-ninjas.com/v1/objectdetection

Sample Response

JSON
1

Code Examples

1 2 3 4 5 6 7 import requests api_url = 'https://api.api-ninjas.com/v1/objectdetection' image_file_descriptor = open('YOUR_IMAGE.jpeg', 'rb') files = {'image': image_file_descriptor} r = requests.post(api_url, files=files) print(r.json())

If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.