{
  "openapi": "3.1.0",
  "info": {
    "title": "Object Detection API",
    "version": "1.0.0",
    "description": "Labels, confidence scores and bounding boxes for the objects in any image, with an on-platform model.\n\nDetect the objects in an image and get labels, confidence scores and bounding boxes, with a minimum-confidence filter. Send an image URL or POST the bytes, JPEG, PNG or WebP up to 2.5 MB. The model runs on the platform, so no third-party keys and no data leaves it.",
    "contact": {
      "name": "Data and APIs",
      "url": "https://dataandapis.com/contact"
    },
    "termsOfService": "https://dataandapis.com/terms-of-service",
    "license": {
      "name": "Data and APIs Terms of Service",
      "url": "https://dataandapis.com/terms-of-service"
    },
    "x-logo": {
      "url": "https://dataandapis.com/images/object-detection.webp"
    }
  },
  "externalDocs": {
    "description": "Documentation, live tester and pricing",
    "url": "https://dataandapis.com/apis/object-detection"
  },
  "servers": [
    {
      "url": "https://api-object-detection.dataandapis.com"
    }
  ],
  "tags": [
    {
      "name": "AI",
      "description": "Object Detection API belongs to the AI category of the Data and APIs catalog."
    }
  ],
  "paths": {
    "/v1/detect": {
      "get": {
        "operationId": "detectObjects",
        "summary": "Detect Objects",
        "description": "Detect Objects endpoint of the Object Detection API. Costs 25 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/object-detection/detect-objects"
        },
        "parameters": [
          {
            "name": "min_score",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "0.5"
          },
          {
            "name": "url",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "https://upload.wikimedia.org/wikipedia/commons/3/3a/Cat03.jpg"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "count": 1,
                  "min_score": 0.5,
                  "objects": [
                    {
                      "label": "cat",
                      "score": 0.9983,
                      "box": {
                        "xmin": 0,
                        "ymin": 3,
                        "xmax": 1087,
                        "ymax": 790
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      },
      "post": {
        "operationId": "detectObjectsPost",
        "summary": "Detect Objects (POST)",
        "description": "Detect Objects (POST) endpoint of the Object Detection API. Costs 25 tokens per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/object-detection/detect-objects-post"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "url": "https://upload.wikimedia.org/wikipedia/commons/3/3a/Cat03.jpg"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "count": 1,
                  "min_score": 0.5,
                  "objects": [
                    {
                      "label": "cat",
                      "score": 0.9983,
                      "box": {
                        "xmin": 0,
                        "ymin": 3,
                        "xmax": 1087,
                        "ymax": 790
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Create a free key at https://dataandapis.com/sign-up. 500 tokens a month on the Free plan; this API costs 25 tokens per call."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}