Generate a api key, if no exists