I believe you can create an Ajax call on change of product option.
Drop down options are managed from js file so you can override js and call ajax while change method calls.
then you can call your api from ajax call php function.
If it helps then please click "Kudos" and "accept solution".