Aspects of the invention are directed to systems and methods for generating spectral computed tomography data for spectral X-ray image reconstruction using of pixelated k-edge apertures. A method is provided for generating a spectral computed tomography. The method includes the steps of generating a plurality of X-ray beams; encoding the plurality of X-ray beams by transmitting the plurality of beams through a pixelated K-edge coded aperture structure; detecting the encoded plurality of X-ray beams; and reconstructing a spectral CT image from the encoded plurality of X-ray beams.