Did Lucrezia Borgia really spend time in a Roman convent? She did indeed. Its cloister is pictured here. It is called San Sisto, or San Sisto Vecchio, and has been an active convent for close to 900 years. The bell tower, the well, and the cloister arcade have been there since the beginning, or close to it.
The nuns do not speak English and do not welcome visitors. It was a feat, getting into this place, but because I speak Italian, I was able to do it.
What was Lucrezia doing in a convent? Short answer: hiding from her father and her first husband, who were fighting about her divorce. She was educated in this convent, as a young girl. The pope sent soldiers to extract her when she sought refuge from the battle between him and her first husband, but she refused to leave. She was not as passive as the Showtime series sometimes portrays her.
Was Lucrezia pregnant with another man's child in the convent, while her father the pope was claiming she was a virgin? Probably. (See my post on this subject.) The baby's father, though, was not the character in the Showtime series, who is fictional. It was someone much higher born than that.
Did her husband attempt public sex with prostitutes to prove his manhood, as shown on Showtime? No, but he did offer to have sex with Lucrezia in public, for the same purpose. No wonder she hid from him.
If you want the real story, told in a fun way, read my murder mystery, A Borgia Daughter Dies, which tells the entire Borgia saga, beginning with Lucrezia's time in the convent. I wrote this book a long before the Showtime series started, and was careful to get the history right. You can find it here: https://www.amazon.com/Borgia-Daughter-Dies-history-Machiavelli-ebook/dp/B007WONQV2/ref=sr_1_1?ie=UTF8&qid=1501519534&sr=8-1&keywords=A+Borgia+Daughter+Dies
With the Borgias, the truth is often stranger than anything a screenwriter could possibly make up.