curl --request POST \
--url https://api.epigos.ai/predict/detect/{model_id}/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"image": "https://example.org/image.jpg"
}
'{
"image": "base64",
"detections": [
{
"label": "car",
"confidence": 0.954,
"x": 281,
"y": 187,
"width": 46,
"height": 36
},
{
"label": "person",
"confidence": 0.854,
"x": 21,
"y": 87,
"width": 40,
"height": 30
}
],
"labelsCount": [
{
"label": "car",
"total": 1
},
{
"label": "person",
"total": 1
}
]
}{
"type": "error",
"code": "bad_request",
"status": 400,
"message": "Missing '****' field",
"details": [
{
"location": "body",
"type": "value_error.missing",
"pointer": "/image",
"message": "field required"
}
]
}{
"type": "error",
"code": "unauthorized",
"status": 401,
"message": "Invalid or missing credentials",
"details": []
}Prediction
Object detection
Run inference on object detection models hosted on Epigos AI.
Once your models are deployed on the Epigos AI platform, they come with a readily accessible REST API.
POST
/
predict
/
detect
/
{model_id}
/
curl --request POST \
--url https://api.epigos.ai/predict/detect/{model_id}/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"image": "https://example.org/image.jpg"
}
'{
"image": "base64",
"detections": [
{
"label": "car",
"confidence": 0.954,
"x": 281,
"y": 187,
"width": 46,
"height": 36
},
{
"label": "person",
"confidence": 0.854,
"x": 21,
"y": 87,
"width": 40,
"height": 30
}
],
"labelsCount": [
{
"label": "car",
"total": 1
},
{
"label": "person",
"total": 1
}
]
}{
"type": "error",
"code": "bad_request",
"status": 400,
"message": "Missing '****' field",
"details": [
{
"location": "body",
"type": "value_error.missing",
"pointer": "/image",
"message": "field required"
}
]
}{
"type": "error",
"code": "unauthorized",
"status": 401,
"message": "Invalid or missing credentials",
"details": []
}Authorizations
APIKeyHeaderAPIKeyQuery
Path Parameters
Body
application/json
You can POST a base64 encoded image directly to your model endpoint. Or you can pass a URL as the image parameter in the request body if image is already hosted elsewhere
Response
Successful Response
The API inference route hosted by us returns a JSON object that includes a predictions array. Each prediction within this array comprises the following attributes:
Was this page helpful?

