Objective To observe the feasibility of machine learning models constructed based on various parameters of spectral CT in predicting the benign and malignant nature of thyroid nodules. Methods A total of 185 patients with thyroid nodules confirmed by surgical pathology from September 2021 to December 2022 were analyzed retrospectively. According to the pathological results, the patients were divided into malignant nodules group (n=106) and benign nodules group (n=79). Ten spectral CT parameters were extracted to establish six machine learning models. The performance of each model in predicting the benign and malignant nature of thyroid nodules was evaluated through ROC curves, and the differences in AUC of the model were compared. Results The AUC values of extreme gradient boosting, random forest, support vector machine, K-nearest neighbors, Logistic regression and decision tree models for predicting thyroid nodule malignancy were 0.833, 0.814, 0.813, 0.807, 0.799, 0.776, respectively. Their sensitivities were 0.833, 0.833, 0.800, 0.733, 0.767, 0.733, their specificities were 0.808, 0.769, 0.731, 0.846, 0.808, 0.731, their accuracies were 0.821, 0.804, 0.768, 0.786, 0.786, 0.732. Conclusion The learning models based on the parameters from spectral CT to predict benign and malignant thyroid nodules had good overall performance, the optimal prediction model was XGBoost.