Change to api key processing in methods