Add the 'mode' flag to the corresponding methods in APIClient