保祿二世
Agnifili's former student, Pope Paul II, named him general treasurer of the church in the Marche. In the consistory of 18 September 1467, Pope Paul II made him a cardinal priest; he received the red hat in San Marco, Rome the next day; and he received the titular church of Santa Balbina on 13 November 1467. In October 1468 he participated in the celebrations surrounding the marriage of Giovanni Antonio Carafa and Vittoria Camponeschi, parents of the future Pope Paul IV. On 13 October 1469 he opted for the titular church of Santa Maria in Trastevere. Pope Paul II put him in charge of overseeing the construction of fortifications at Civitavecchia.