The only goal of the game for coach Malky Mackay's side came from Joe Mason in the 41st minute.
Cardiff last played top-flight football in 1962 and have come close to promotion on a number of occasions in recent years.
The victory over Birmingham gave the club 56 points from 26 matches. Steve Bruce's Hull City are second on 49 while Crystal Palace and Middlesbrough have 47.
Cardiff, who were beaten on penalties by Liverpool in last year's League Cup final and also lost the 2008 FA Cup final to Portsmouth, were taken over by a Malaysian consortium in 2010 after facing a winding-up order for unpaid taxes.
Swansea returned to the top flight in 2011 for the first time in 28 years. (Writing by Tom Pilcher, Editing by Tony Jimenez)