I don't know if it will work, but Pl@ntNet Identify (which I use often) seems to have an API: https://docs.plantnet.org/en/reference/api-plantnet/