Effective CD8(+) T cell responses depend on presentation of a stable peptide repertoire by MHC class I (MHC I) molecules on the cell surface. The overall quality of peptide-MHC I complexes (pMHC I) is determined by poorly understood mechanisms that generate and load peptides with appropriate consensus motifs onto MHC I. In this article, we show that both tapasin (Tpn), a key component of the peptide loading complex, and the endoplasmic reticulum aminopeptidase associated with Ag processing (ERAAP) are quintessential editors of distinct structural features of the peptide repertoire. We carried out reciprocal immunization of wild-type mice with cells from Tpn- or ERAAP-deficient mice. Specificity analysis of T cell responses showed that absence of Tpn or ERAAP independently altered the peptide repertoire by causing loss as well as gain of new pMHC I. Changes in amino acid sequences of MHC-bound peptides revealed that ERAAP and Tpn, respectively, defined the characteristic amino and carboxy termini of canonical MHC I peptides. Thus, the optimal pMHC I repertoire is produced by two distinct peptide editing steps in the endoplasmic reticulum.