Moved API key generation