The powerful learning capabilities of AI significantly enhance innovation by facilitating the development and generation of new ideas. Consequently, effectively developing AI innovation capabilities to pursue both exploratory and exploitative innovation has become crucial for many firms. Drawing on literature related to AI and ambidexterity, we have crafted a novel framework that elucidates the complex relationship between AI innovation capability and organizational ambidexterity. Based on a sample of 751 publicly listed AI firms in China, our study reveals an inverted U-shaped relationship between AI innovation capability and ambidexterity. This finding suggests that organizations can achieve optimal ambidexterity only when AI innovation capability is at a moderate level. Additionally, this nonlinear relationship is moderated by cost leadership strategy and managerial myopia. Our study provides a rich empirical foundation for future research aimed at understanding the intricate dynamics of AI and its impact on innovation within firms.