Before graduating from magic school, Khalid, a young genie, is allowed to inhabit his first lamp, but he forgets to restrict his master to three wishes and needs a princess and the help of Boabdil, his master's cat, to save him from a lifetime of servitude.