We present in this work an x-ray absorption spectroscopy investigation performed at the L 1,3 edges of Ce in the intermetallic compounds CeNi x Pt 1Ϫx . This study provides a direct microscopic probe of the cerium electronic state that is found to be trivalent up to xр0.9 and an intermediate valence for higher Ni content. The modification of the Ce L 3 -and L 1 -edge absorption profiles has been correlated with the density of conduction electrons and with the modification of the hybridization between the orbitals of Ce and the conduction band. Our results stressed that the behavior of the CeNi x Pt 1Ϫx series is in agreement with the Doniach diagram only up to xр0.9. Moreover, the transition to nonmagnetism is due to the progressive screening of the 4 f shell as the result of the competition between exchange interactions and the Kondo effect and not to the change of cerium valence.