Added api key detection