This research uses Technology Acceptance Model to explore the elements influencing students' attitudes toward using Chat Generative Pre-Trained Transformer (ChatGPT), a recently developed artificial intelligence (AI) tool, for learning and educational purposes. Using Amos version 23 structural equation modelling and 880 student survey responses, the suggested model was empirically tested. According to the report, students think well of ChatGPT utilization in the classroom. Credibility, Usefulness and ease of use, all influence how positively people feel about using this technology in a classroom setting. The study's findings, however, did not support the notion that students' adoption and use of ChatGPT was insignificantly influenced by perceived enjoyment. Moreover, the results conclude that attitude mediates the relationship between usefulness and intention to use ChatGPT. The research will help businesses, educational institutions, and the global community by providing insight into how students view the ChatGPT service within a learning environment. Additionally, the application boosts learners' confidence and interest, which improves general awareness and literacy. Finally, the research will facilitate developers of AI in the betterment of their product and service delivery and regulators in regulating the use of AI-based bots. Owing to its recentness, there is not much study currently available on ChatGPT use in education. This research adds significantly to the extant knowledge on the adoption of advanced education technologies by examining the adoption characteristics of ChatGPT, a novel AI-based tool involving students. Additionally, there is a dearth of research in the literature on students' adoption of ChatGPT for educational purposes. Such a gap was filled as this study identified the factors affecting students' adoption of ChatGPT in the classroom.