reduce API