Added #with_api_key support