Kayqubad I
Ibn Bibi was born as the son of refugees from Khwarazm and Khorasan who had fled their native lands following the death of the last ruler of the Khwarazmian dynasty, Jalal ad-Din Mingburnu. Ibn Bibi attained a high position in the Seljuks of Anatolia as a "seal holder" and was responsible for all Seljuk correspondence. His mother had held a position in the Imperial Court of Khwarazm as an astrologer. She had managed to find a position in the court of the Seljuk sultan Kayqubad I. Thus Ibn Bibi began his service in the Seljuk Court during the reign of Kayqubad I, which continued even after the Battle of Köse Dağ, when the Sultanate of Rum, defeated by the Mongol Empire, became vassals of the Ilkhanate.