Skip to content

Plant Health Assessment

TerezaJurak edited this page Feb 10, 2023 · 30 revisions

Send ill plant photos to our back end, and get the JSON result with information about the plant's health and specific problems.

See the Plant.id Health Assessment product page.

Request

Endpoint:

  • https://api.plant.id/v2/health_assessment

Request method:

  • POST

Required parameters:

  • images - a list of one or more images of the plant you want to identify (images should be encoded as strings in Base64)

Optional parameters:

  • latitude - geographic coordinate (float) - increases the identification accuracy
  • longitude - geographic coordinate (float) - increases the identification accuracy
  • modifiers - list of strings, that influences the identification process and results (speed, accuracy, response content), see the list of available modifiers
  • disease_details - list of strings, that determines which information about the plant diseases (e.g. description, treatment) will be included in the response, see the list of available disease details
  • language - language code (ISO 639-1, default "en") determining the language of the response (supported languages: English - "en", German - "de", Czech - "cs", Spanish - "es", French "fr", Italien "it", Dutch "nl", Polish "pl", Swedish "sv", Chinese "zh")
  • languages - list of up to 3 language codes (ISO 639-1) determining languages of the response (do not combine with the parameter language) When used, the respective fields in the response will turn into dictionaries with the language code as a key.
  • custom_id - unique identifier you can set for your purpose (int) - can be used for handling network connection errors
  • datetime - timestamp in seconds (int)
  • identification_timeout - timeout limit in seconds (int, default 20 second, max. 20 seconds) If the identification takes more than the given number of seconds, identification info without any suggestion is returned.

See the request examples in different programming languages in our repository.

Response

The result in the JSON format contains information about the health status of the plant and a list of suggestions of possible diseases. There are 9 root categories: Abiotic, Animalia, Bacteria, Canker, Chromista, Dead plant, Fungi, Senescence, and Viruses. Each suggestion contains:

  • entity_id - a unique identifier for each disease that will not change over time
  • name - the name of the disease in our database (Latin or English)
  • probability - certainty level that the suggested disease is in the picture
  • redundant - a boolean value indicating that the class can be discarded when the difference between the predicted probability of parent (higher in the hierarchy) and child class (lower in the hierarchy) is insignificant
  • similar_images - a list of representative images of the identified disease carefully selected by the model so it resembles the input image (Similar images are included in the result only if you add the value similar_image in the modifiers list in the request.), the list contains dictionaries with image data (id, similarity, url, url_small)
  • disease_details - info you requested (if available) about suggested diseases, see Disease details documentation page

The information about health status contains is_healthy_probability (the probability that the plant has a disease) and a boolean attribute is_healthy, suggesting whether the plant is healthy or sick.

Response example

See the JSON response example.

Asynchronous response retrieval

You can retrieve the indetification results later with the use of identification ID or CUSTOM_ID.

Do not forget to check whether identification with given ID (or your CUSTOM_ID) has been already proceeded and return its result.

URIs:

  • https://api.plant.id/v2/get_identification_result/ID

  • https://api.plant.id/v2/get_identification_result/custom_id/CUSTOM_ID

Request method:

  • POST

Optional parameters:

  • disease_details - list of strings, that determines which information about the plant diseases (e.g. description, treatment) will be included in the response, see the list of available disease details
  • language - language code (ISO 639-1, default "en") determining the language of the response (supported languages: English)

Get multiple identifications result

https://api.plant.id/v2/get_identification_result/multiple

Get results of more identifications at once.

Request method:

  • POST

Specify at least one of the following parameters:

  • ids - list of ids provided by the identification response
  • custom_ids - list of ids provided by you in the identification request

Optional parameters:

  • disease_details - list of strings, that determines which information about the plant diseases (e.g. description, treatment) will be included in the response, see the list of available disease details
  • language - language code (ISO 639-1, default "en") determining the language of the response (supported languages: English)