Fernando Torres is returning to Atletico Madrid on loan until the end of the 2015-16 season.
Steve Clarke is hoping to keep Glenn Murray at Reading after his loan deal expired following the 2-1 win over Norwich.
The 21-year-old Ivory Coast international came through the ranks at City after originally starting out at Crystal Palace but found first-team opportunities limited at the Etihad Stadium.
Razak has spent time on loan at Portsmouth, Brighton, Charlton and most recently Russian outfit Anzhi Makhachkala, who signed him on a permanent deal in October.
But now the midfielder will be looking to make a more lasting impression on the Barclays Premier League as he links up with the Hammers, who face Swansea on Saturday as they look to move out of the relegation zone.
Razak is manager Sam Allardyce's fourth signing of the January transfer window after loan deals for Wolves defender Roger Johnson and Italy internationals Antonio Nocerino and Marco Borriello.