Background: The coronavirus disease 2019 (COVID-19) has become a global challenge since the December 2019. The hospital stay is one of the prognostic indicators, and its predicting model based on CT radiomics features is important for assessing the patients' clinical outcome. The study aimed to develop and test machine learning-based CT radiomics models for predicting hospital stay in patients with COVID-19 pneumonia. Methods: This retrospective, multicenter study enrolled patients with laboratory-confirmed SARS-CoV-2 infection and their initial CT images from 5 designated hospitals in Ankang, Lishui, Lanzhou, Linxia, and Zhenjiang between January 23, 2020 and February 8, 2020. Patients were classified into short-term (</=10 days) and long-term hospital stay (>10 days). CT radiomics models based on logistic regression (LR) and random forest (RF) were developed on features from pneumonia lesions in first four centers. The predictive performance was evaluated in fifth center (test dataset) on lung lobe- and patients-level. Results: A total of 52 patients were enrolled from designated hospitals. As of February 20, 21 patients remained in hospital or with non-findings in CT were excluded. Therefore, 31 patients with 72 lesion segments were included in analysis. The CT radiomics models based on 6 second-order features were effective in discriminating short- and long-term hospital stay in patients with COVID-19 pneumonia, with areas under the curves of 0.97 (95% CI, 0.83-1.0) and 0.92 (95% CI, 0.67-1.0) by LR and RF, respectively, in test. The LR and RF model showed a sensitivity and specificity of 1.0 and 0.89, 0.75 and 1.0 in test respectively. As of February 28, a prospective cohort of six discharged patients were all correctly recognized as long-term stay using RF and LR models. Conclusions: The machine learning-based CT radiomics features and models showed feasibility and accuracy for predicting hospital stay in patients with COVID-19 pneumonia.