Background Immune checkpoint inhibitor (ICI) therapy has substantially improved the overall survival (OS) in patients with non-small-cell lung cancer (NSCLC); however, its response rate is still modest. In this study, we developed a machine learning-based platform, namely the Cytokine-based ICI Response Index (CIRI), to predict the ICI response of patients with NSCLC based on the peripheral blood cytokine profiles.Methods We enrolled 123 and 99 patients with NSCLC who received anti-PD-1/PD-L1 monotherapy or combined chemotherapy in the training and validation cohorts, respectively. The plasma concentrations of 93 cytokines were examined in the peripheral blood obtained from patients at baseline (pre) and 6 weeks after treatment (early during treatment: edt). Ensemble learning random survival forest classifiers were developed to select feature cytokines and predict the OS of patients undergoing ICI therapy.Results Fourteen and 19 cytokines at baseline and on treatment, respectively, were selected to generate CIRI models (namely preCIRI14 and edtCIRI19), both of which successfully identified patients with worse OS in two completely independent cohorts. At the population level, the prediction accuracies of preCIRI14 and edtCIRI19, as indicated by the concordance indices (C-indices), were 0.700 and 0.751 in the validation cohort, respectively. At the individual level, patients with higher CIRI scores demonstrated worse OS [hazard ratio (HR): 0.274 and 0.163, and p