India collapsed in a tick over two hours to be all out for 107.
O'Keefe snared six wickets in the space of 38 minutes on Friday, when the top- ranked Test side were rolled for just 105 in their first innings after a staggering collapse of 7-11.
The left-arm spinner backed it up superbly, grabbing 6-35 on Saturday including the prized scalp of Virat Kohli. Kohli shouldered arms to a straight ball that hit the middle of off stump.
O'Keefe, who started the rot in his first over on day three by trapping opener Murali Vijay lbw, now boasts the best match figures by an Australian in India.
Paceman Alan Davidson had held that record since taking 12-124 in 1959 at Kanpur.
Smith made the most of chances on 23, 29, 37, 60 and 67 to play a pivotal role in ending India's 20-Test undefeated streak at home.
- AAP