قُلْ لَا يَعْلَمُ مَنْ فِي السَّمَاوَاتِ وَالْأَرْضِ الْغَيْبَ إِلَّا اللَّهُ. (al-Naml 27:65)
Say: None in the heavens and the earth knows the unseen except Allah.
Al-ghayb refers to the unseen, and illā Allāh reserves this knowledge to Allah.
Allah is ʿĀlim al-ghayb, the Knower of the unseen. Affirming this as His exclusive attribute, without assigning a partner to Him, forms part of tawḥīd in attributes.