v1

latestOpenAPI 3.0.12026-07-14453659.5 KB
Vision Prediction

Make Prediction

Returns a prediction from an image or multi-label model for the specified image.

post/v2/vision/predict

Request body

modelIdstring required

ID of the model that makes the prediction.

numResultsinteger

Number of probabilities to return.

sampleBase64Contentstring

The image contained in a base64 string.

sampleIdstring

String that you can pass in to tag the prediction. Optional. Can be any value, and is returned in the response.

sampleLocationstring

URL of the image file.

Example request

{
  "modelId": "WJH4YCA7YX4PCWVNCYNWYHBMY4",
  "numResults": 3,
  "sampleBase64Content": "SomeBase64EncodedImage"
}

Response

Prediction Result

objectstring
sampleIdstring

Value passed in when the prediction call was made. Returned only if the sampleId request parameter is provided.

Example response

{
  "object": "predictresponse",
  "sampleId": "Sample1"
}