The twelve Infallible Imams are the successors of The Best human being, Muhammad (SAWA) who is the Most humble servant of Allah (SWT). Allah Grants special powers to His Most humble servants as we read in the Hadeeth Qodsi ( O My servant, obey Me, I will make you like me, you say to something: Be, it will be.عبدي أطعني تكن مثلي، تقول للشيء كن فيكون.
This gift has been given to prophets like Easa who was able to bring dead back to life, as well as deputies of the prophets like Aasif ibn Barkhis ( deputy of Sulaiman) who brought the throne of Bilqees from Yemen to Palestine in less than an eye blink.
The status of the Infallible Imams comes from the status of the Prophet Muhammad (SAWA) as we read in Quran: A Progeny, wvery part if it is from the other part ذُرِّيَّةً بعضُها من بعض
The Prophet Muhammed (SAWA) has the greatest gifts from Allah,v then his Progeny Ahlul Bayt (AS) who are part from him . There is no question of any act from any of gifted servants of Allah, away from Allah (SWT). Every act from them is by permission from Allah because they are constantly and continuously with Allah (SWT). The Hadeeth states: Verily, Allah Has made the hearts of the Imams, a place of His Will, so, whatever He wants, they will want. إنَّ اللهَ جعل قلوبَ الأئمة موضعا لمشيئته فإذا شاء شيئا شاءوه
Everything they want is exactly what Allah Wants.
Wassalam.