added configuration options for Api and moved api_key to config file