Skip to main content
POST
/
models
/
v2
/
facebook
/
detr-resnet-50
object-detection
curl --request POST \
  --url https://api.bytez.com/models/v2/facebook/detr-resnet-50 \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4d/Cat_November_2010-1a.jpg/1200px-Cat_November_2010-1a.jpg",
  "base64": "data:image/jpg;base64,...BASE_64_GOES_HERE (Only use this is you are not using a url)"
}
'
{
  "error": "<string>",
  "output": [
    {
      "score": 0.9996581077575684,
      "label": "cat",
      "box": {
        "xmin": 255,
        "ymin": 175,
        "xmax": 1110,
        "ymax": 1531
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Set Authorization header to BYTEZ_KEY 'Authorization: YOUR_BYTEZ_KEY_HERE'

Body

application/json

Schema for object-detection models

url
string
required
Example:

"https://upload.wikimedia.org/wikipedia/commons/thumb/4/4d/Cat_November_2010-1a.jpg/1200px-Cat_November_2010-1a.jpg"

base64
string
Example:

"data:image/jpg;base64,...BASE_64_GOES_HERE (Only use this is you are not using a url)"

Response

Successful object-detection response.

error
string | null
required

Null on success; otherwise an error message.

output
array
required

Successful response with detected objects

Example:
[
{
"score": 0.9996581077575684,
"label": "cat",
"box": {
"xmin": 255,
"ymin": 175,
"xmax": 1110,
"ymax": 1531
}
}
]