Safe API call