Any API for AirPods Pro 2

Hi,

May I ask if there is any iOS API or similar way to switch between the transparency and ANC modes of AirPods Pro 2? I know there is one way to configure and activate the shortcut in the APP, which requires an inconvenient manual setting. May I ask for any other advice? Thx in advance!

Any API for AirPods Pro 2
 
 
Q