Add setApiKey function.