Enabled auto API selection

With this feature, the programmer need not select a specific API for running the code. The API is selected automatically depending on the API present.