Artificial intelligence (AI) holds immense promise for K-12 education, yet understanding the factors influencing students’ engagement with AI courses remains a challenge. This study addresses this gap by extending the technology acceptance model (TAM) to incorporate cognitive factors such as AI intrinsic motivation (AIIM), AI readiness (AIRD), AI confidence (AICF), and AI anxiety (AIAX), alongside human–computer interaction (HCI) elements like user interface (UI), content (C), and learner-interface interactivity (LINT) in the context of using generative AI (GenAI) tools. By including these factors, an expanded model is presented to capture the complexity of student engagement with AI education. To validate the model, 210 Chinese students spanning grades K7 to K9 participated in a 1 month artificial intelligence course. Survey data and structural equation modeling reveal significant relationships between cognitive and HCI factors and perceived usefulness (PU) and ease of use (PEOU). Specifically, AIIM, AIRD, AICF, UI, C, and LINT positively influence PU and PEOU, while AIAX negatively affects both. Furthermore, PU and PEOU significantly predict students’ attitudes toward AI curriculum learning. These findings underscore the importance of considering cognitive and HCI factors in the design and implementation of AI education initiatives. By providing a theoretical foundation and practical insights, this study informs curriculum development and aids educational institutions and businesses in evaluating and optimizing AI4K12 curriculum design and implementation strategies.