Li Gao
Li Kui was born in 711, at the end of the reign of Emperor Ruizong. He was from a prominent clan that, by Li Kui's time, was domiciled in Zheng Prefecture (鄭州, in modern Zhengzhou, Henan) but which traced its ancestry to a line of prominent officials of Northern Wei, who in turn traced their ancestry to Li Fan (), a son of Li Gao, the founder of the Sixteen Kingdoms state Western Liang. (The Tang Dynasty imperial clan also traced its ancestry to Li Gao, through Li Gao's second son and successor Li Xin.) After Northern Wei, Li Kui's ancestors served as officials of Sui Dynasty and Tang Dynasty. Li Kui was said to be intelligent, dextrous, and studious in his youth, and he was capable in writing.