It is not known when Yu Di was born, but it is known that his family was from Henan Municipality (河南, i.e., the region of the Tang Dynasty eastern capital Luoyang).
Later, he was sent out of Chang'an to serve as the prefect of Hu Prefecture (湖州, in modern Huzhou, Zhejiang).