Query parameters
-
Controls the amount of time to wait for inference results.
Values are
-1or0.External documentation
Body
Required
-
An array of objects to pass to the model for inference. The objects should contain a fields matching your configured trained model input. Typically, for NLP models, the field name is
text_field. Currently, for NLP models, only a single value is allowed. -
The inference configuration updates to apply on the API call
POST
/_ml/trained_models/{model_id}/_infer
curl \
--request POST 'http://api.example.com/_ml/trained_models/{model_id}/_infer' \
--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."}]
}