curl --request POST \
--url https://api.epigos.ai/predict/classify/{model_id}/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"image": "https://example.org/image.jpg"
}
'{
"category": "cat",
"confidence": 0.854,
"predictions": [
{
"category": "cat",
"confidence": 0.854
},
{
"category": "dog",
"confidence": 0.146
}
]
}{
"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
Image classification
Run inference on classification 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
/
classify
/
{model_id}
/
curl --request POST \
--url https://api.epigos.ai/predict/classify/{model_id}/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"image": "https://example.org/image.jpg"
}
'{
"category": "cat",
"confidence": 0.854,
"predictions": [
{
"category": "cat",
"confidence": 0.854
},
{
"category": "dog",
"confidence": 0.146
}
]
}{
"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?

