Skip to content

Synchronous identification

Dominika Krejčí edited this page Mar 19, 2020 · 14 revisions

Synchronous identification

https://api.plant.id/v2/identify

Send plant photos to our back end, wait for identification, and return the result.

Request

Required parameters:

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

Optional parameters:

  • custom_id - identifier you can set for your purpose
  • latitude - geographic coordinate (float)
  • longitude - geographic coordinate (float)
  • modifiers - list of strings:
    • "crops_simple"/"crops_fast" (default)/"crops_medium" - specify the speed & accuracy of the identification
    • "similar_images" - allow displaying of similar images -> If you want to get similar images in the response, you must include item similar_images here.
  • 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.
  • plant_language - language code (ISO 639-1) used for plant_details (default "en")
  • plant_details - list of strings, that determines which information about the plant (e.g. common names) will be included in the response, see the list of available strings

Response

The result in the JSON format contains a list of suggestions of possible plant species (taxons). Each suggestion contains:

  • scientific_name - the scientific name of the plant
  • common_names - list of common names of the plant (if available)
  • url - link to Wikipedia or Google
  • probability - certainty level that suggested plant is the one from the photo
  • similar_images - representative images of the identified species 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 parameters list of the request.)
  • confirmed - confirmation status
  • ...

If you do not get any suggestions in the response, you may still try to get the result later with the request get_identification_result.

Response example

{
   "id":1057230,
   "custom_id":"None",
   "callback_url":"None",
   "meta_data":{
      "latitude":"None",
      "longitude":"None",
      "datetime":"2020-02-25"
   },
   "uploaded_datetime":1582657674.229304,
   "finished_datetime":1582657678.952631,
   "images":["..."],
   "suggestions":[
      {
         "plant_name":"Cissus",
         "plant_details":{
            "scientific_name":"Cissus",
            "structured_name":{
               "genus":"cissus"

},
            "common_names":"None",
            "url":"http://en.wikipedia.org/wiki/Cissus",
            "name_authority":"None",
            "wiki_description":{
               "value":"Cissus is a genus of approximately 350 species of lianas (woody vines) in the grape family (Vitaceae). They have a cosmopolitan distribution, though the majority are to be found in the tropics.",
               "citation":"http://en.wikipedia.org/wiki/Cissus",
               "license_name":"CC BY-SA 3.0",
               "license_url":"https://creativecommons.org/licenses/by-sa/3.0/"
            
},
            "taxonomy":{
               "kingdom":"Plantae",
               "phylum":"Tracheophyta",
               "class":"Magnoliopsida",
               "order":"Vitales",
               "family":"Vitaceae",
               "genus":"Cissus"           
}      
},
         "probability":0.44523655283089236,
         "confirmed":false,
         "similar_images":"..."
      
},
"..." 
],
   "modifiers":"...",
   "secret":"...",
   "fail_cause":"None",
   "countable":true
}
You can’t perform that action at this time.