Imams are inspired just as how the bees, the mother of Moses, disciples were inspired. The Imams are not Prophets and the Final Prophet is Muhammad(saw). Whoever believes there is another Prophet is not Muslim.
Prophet said to Ali a.s:”O Ali you are to me as what Aaron was to Moses except that there shall not be any Prophet after me”Saheeh Muslim
The Imams of Ahlulbayt(a.s) are inspired by Allah
And We made them Imams, guiding (men) by Our Command, and We sent them inspiration to do good deeds, to establish regular prayers, and to practise regular charity; and they constantly served Us (and Us only).Anbya 73
3 subjects here were not Prophets yet were inspired by Allah swt.
“And behold! I inspired the disciples to have faith in Me and Mine Messenger: they said, ‘We have faith, and do thou bear witness that we bow to Allah as Muslims'”. Sura AlMa’ida :111
And thy Lord inspired the Bee to build its cells in hills, on trees, and in (men’s) habitations;Bee 68
واوحى ربك الى النحل
So We sent this inspiration to the mother of Moses: “Suckle (thy child), but when thou hast fears about him, cast him into the river, but fear not nor grieve: for We shall restore him to thee, and We shall make him one of Our messengers.” Qasas 7