Evaluate a trained model
Generally available; Added in 8.3.0
POST
/_ml/trained_models/{model_id}/_infer
curl \
--request POST 'http://api.example.com/_ml/trained_models/{model_id}/_infer' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '"{\n \"docs\":[{\"text\": \"The fool doth think he is wise, but the wise man knows himself to be a fool.\"}]\n}"'
Request example
An example body for a `POST _ml/trained_models/lang_ident_model_1/_infer` request.
{
"docs":[{"text": "The fool doth think he is wise, but the wise man knows himself to be a fool."}]
}