In this paper we study the optimal licensing agreement between a patentholder of a costreducing innovation and firms that have heterogeneous uses for the new technology. We consider the case in which these firms are competitors in a downstream market. We extend the competition environment among the licensees beyond the Cournot/Bertrand models considered by the previous literature to a framework with differentiated products. We also assume that potential licensees have private information about the usefulness of the new technology. We characterize two purposes the optimal licensing contract serves to the patentholder: separation of the licensees and competition softening in the downstream market. We also describe how the optimal contract changes with the degree of product differentiation.