added support for api_key