Purpose: To investigate the effectiveness of gradient boosting to classify endophthalmitis versus uveitis and lymphoma by intraocular cytokine levels. Method: Patient diagnoses and aqueous and vitreous levels of interleukin (IL)-6 and IL-10 were retrospectively extracted from a National Eye Institute Histopathology Core database and compared by Kruskal-Wallis and post hoc Dunn tests. A gradient-boosted decision tree classifier was trained to differentiate endophthalmitis versus uveitis and lymphoma from vitreous IL-6 and IL-10, vitreous IL-6 only, and aqueous IL-6 only data sets; and was tested with 80-20 train-test split and 3-fold cross-validation of the training set. Results: Seven endophthalmitis, 29 lymphoma, and 49 uveitis patients were included. IL-6 was higher in endophthalmitis than uveitis (P = 0.0713 aqueous, 0.0014 vitreous) and lymphoma (P = 0.0032 aqueous, 0.0001 vitreous). IL-10 was significantly higher in lymphoma than uveitis (P = 0.0017 aqueous, 0.0014 vitreous). Three-fold cross validation demonstrated 95% +/- 5%, 95% +/- 4%, and 97% +/- 5% predictive accuracy for vitreous IL-6 and IL-10, vitreous IL-6 only, and aqueous IL-6 only data sets. Upon validation with the testing set, vitreous IL-6 and IL-10 and aqueous IL-6 only data sets achieved 100% predictive accuracy and vitreous IL-6 only data achieved 93% predictive accuracy with 100% sensitivity, 92% specificity, and an area under the receiver operating characteristic curve (ROC/AUC) of 96%. Conclusions: With limited sample size, gradient boosting can differentiate endophthalmitis from uveitis and lymphoma by IL-6 and IL-10 with high sensitivity and specificity; however, a larger cohort is needed for further validation.