It was said that because of his heritage, Yu Di was made an imperial guard officer at the start of his official career, and then as the sheriff of Huayin County (, in modern Weinan, Shaanxi). The surveyor of the circuit, Liu Wan (), later invited him to serve as assistant; yet later, while he was serving as the secretary general of Yueyang County (, in modern Xi'an, Shaanxi), he served under the senior official Zhang Yi at a treaty signing with the Tibetan Empire. Thereafter, he served as "Simen Yuanwailang" (), a low-level official at the ministry of justice (, "Xingbu"), as well as "Shiyushi" (), a low-level imperial censor. He later again served on a diplomatic mission with the Tibetan Empire, and was said to have served well and been highly regarded as a result. He later served as the magistrate of Chang'an County (one of the two counties making up the Tang capital Chang'an) and then as "Jiabu Langzhong" (), a supervisorial official at the ministry of rites (, "Libu").