Artificial intelligence (AI) is a key technology in the new round of technological revolution and industrial upgrading. In particular, AI plays a core role in promoting high-level economic development and smart transformation of cities. Previous research on urban technology innovation mainly used traditional regression analysis based on sufficiency logic, lacking results from necessity logic. Identifying the necessary conditions (critical factors) is critically important. Necessary conditions are the bottlenecks for the outcomes to occur. Without them, outcomes cannot occur, and other conditions cannot compensate for their absence. Traditional analytical methods cannot reveal the necessity relationships in management phenomena. As a novel approach, Necessary Condition Analysis (NCA) can accurately identify necessary conditions, providing us with new and valuable theoretical insights and practical implications. This study introduces NCA into the research of urban technology innovation for the first time, and focuses on AI technology. Our results show that government technology investment, foreign direct investment, financial development, urban economic level, and industrial structure are the critical factors for AI technology innovation in Chinese cities, while transportation infrastructure and human capital are not critical factors.