Lord Valentine's Castle by Robert Silverberg 1981
The 1st book of Majipoor
Valentine, a wanderer who knows nothing except his name, finds himself on the fringes of a great city, & joins a troupe of jugglers & acrobats.
Gradually, he remembers that he is the Coronal Valentine, executive ruler of the vast world of Majipoor, & all its peoples, human & otherwise...