Generative artificial intelligence has sparked a widespread public discourse, oscillating between utopian and dystopian visions about a technologically determined near future. In this article, we employ the concept of AI imaginary to examine the diverse and contested visions of the supposed impact of generative artificial intelligence on society. Utilising Cave and Dihal’s conceptual framework, we develop a quantitative methodology to map the utopian and dystopian narratives of generative artificial intelligence. Analysing newspapers from the United Kingdom, the United States, China and India, we uncover significant differences in media representations through content analysis and computational topic modelling. Findings reveal a dystopian perspective in the United Kingdom and the United States, focusing on challenges such as workforce displacement and misinformation, whereas in China and India, the narrative is more utopian, highlighting potential benefits for technological leadership, economic growth and social advancement. Our study provides methodological and conceptual tools for a comparative examination of the sociotechnical imaginaries of generative artificial intelligence.