A semi-analytical model describing spectral distortions in photon-counting detectors (PCDs) for clinical computed tomography was evaluated using simulated data. The distortions were due to count rate-independent spectral response effects and count rate-dependent pulse-pileup effects and the model predicted both the mean count rates and the spectral shape. The model parameters were calculated using calibration data. The model was evaluated by comparing the predicted x-ray spectra to Monte Carlo simulations of a PCD at various count rates. The data-model agreement expressed as weighted coefficient of variation was better than for dead time losses up to 28% and or smaller for dead time losses up to 69%. The accuracy of the model was also tested for the purpose of material decomposition by estimating material thicknesses from simulated projection data. The estimated attenuator thicknesses generally agreed with the true values within one standard deviation of the statistical uncertainty obtained from multiple noise realizations.