Add API key configuration. Ref #529