Holiday Sale! Get over 30% off when you subscribe to an annual plan!

Object Detection API

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

(4.4)

From 4,110 users

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
355ms392ms418ms800ms1278ms

Didn't find what you were looking for? Suggest an improvement


/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.

Response

Returns an array of object detection objects, each containing:

  • label

    The detected object class or label (e.g., "person", "car", "dog").

  • confidence

    Confidence score between 0 and 1, indicating how certain the detection is.

  • x

    The x-coordinate of the top-left corner of the bounding box.

  • y

    The y-coordinate of the top-left corner of the bounding box.

  • width

    Width of the bounding box in pixels.

  • height

    Height of the bounding box in pixels.

Sample Request Live Demo!

Try this API endpoint with all available parameters in our API playground

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

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
1

Code Examples

1 2 3 curl -X POST "https://api.api-ninjas.com/v1/objectdetection" \ -H "X-Api-Key: YOUR_API_KEY" \ -F "image=@YOUR_IMAGE.jpeg"

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.