ObjectivePONV reduces patient satisfaction and increases hospital costs as patients remain in the hospital for longer durations. In this study, we build a preliminary artificial intelligence algorithm model to predict early PONV in patients.MethodsWe use R for statistical analysis and Python for the machine learning prediction model.ResultsAverage characteristic engineering results showed that haloperidol, sex, age, history of smoking, and history of PONV were the first 5 contributing factors in the occurrence of early PONV. Test group results for artificial intelligence prediction of early PONV: in terms of accuracy, the four best algorithms were CNNRNN (0.872), Decision Tree (0.868), SVC (0.866) and adab (0.865); in terms of precision, the three best algorithms were CNNRNN (1.000), adab (0.400) and adab (0.868); in terms of AUC, the top three algorithms were Logistic Regression (0.732), SVC (0.731) and adab (0.722). Finally, we built a website to predict early PONV online using the Streamlit app on the following website: (https://zhouchengmao-streamlit-app-lsvc-ad-st-app-lsvc-adab-ponv-m9ynsb.streamlit.app/).ConclusionArtificial intelligence algorithms can predict early PONV, whereas logistic regression, SVC and adab were the top three artificial intelligence algorithms in overall performance. Haloperidol, sex, age, smoking history, and PONV history were the first 5 contributing factors associated with early PONV.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12874-023-01955-z.