Kaiyuan Tianbao yishi 開元天寶遺事 "Remnant affairs of the Kaiyuan 開元 (713-741) and Tianbao 天寶 (742-755) reign-periods" is a collection of stories from the mid-Tang era 唐 (618-907). The book was compiled during the Five-Dynasties period 五代 (907-960) by Wang Renyu 王仁裕 (880-956), courtesy name Denian 德輦, from Tianshui 天水 (in today's Gansu province). In the last years of the Tang period, he was Administrative Assistant to the Military Commissioner (jiedu panguan 節度判官) of Qinchuan 秦川, and after the downfall of the Tang empire, he held official posts in the Former Shu state 前蜀 (907-925), and then served under the successive regimes of the Five Dynasties in the north. His highest offices were Minister of War (bingbu shangshu 兵部尚書) and Junior Guardian of the Heir Apparent (taizi shaobao 太子少保). His collected writings, now lost, were called Xijiang ji 西江集.
This book contains a total of 159 entries, all of which record miscellaneous hearsay and minor affairs within the palace, with particular attention given to customs and practices both inside and outside the court. It also extensively discusses the extravagant and licentious ways of Emperor Xuanzong 唐玄宗 (r. 712-755), his consort, Yang Guifei 楊貴妃 (719-756), and other nobles, and is therefore highly esteemed by later playwrights and novelists.
However, because much of the book draws on folk legends, many details were not thoroughly verified against history, and therefore errors and inaccuracies are inevitable. In his Rongzhai suibi 容齋隨筆, Hong Mai 洪邁 (1123-1202) pointed out four false accounts, believing the work to have been written by later generations under the false name of Wang Renyu. Still, the book is cited by eminent scholars such as Su Shi 蘇軾 (Su Dongpo 蘇東坡, 1037-1101; in Du Kaiyuan Tianbao yishi jueju 讀《開元天寶遺事》四絕句) and Sima Guang 司馬光 (1019-1086; in his
While the textual version transmitted in the imperial series Siku quanshu 四庫全書 consists of 4 juan, the book catalogue Zhizhai shulu jieti 直齋書錄解題 speaks of 2 juan, and the bibliographical chapter (Yiwen zhi 藝文志) in the official dynastic history Songshi 宋史 of just 1 fascicle. This discrepancy is also seen in the versions included in various series as the Siku quanshu, Gushi wenfang xiaoshuo 顧氏文房小說, Congshu jicheng chubian 叢書集成初编, Xu baichuan xuehai 續百川學海, Wuchao xiaoshuo daguan 五朝小說大觀, Tangdai congshu 唐代叢書, Shuofu 說郛, Tangren huihui 唐人說薈, Lidai xiaoshi 歷代小史 and – in excerpts – in the Jiu xiaoshuo 舊小說. In 1985, the Shanghai Guji Chubanshe 上海古籍出版社 published a collated version of the book in the series Kaiyuan Tianbao yishi shi zhong 開元天寶遺事十種.