Kanye West has posted a public apology to Kim Kardashian on Twitter, after posting cryptic tweets about his wife and her family last week.

“I would like to apologize to my wife Kim for going public with something that was a private matter.
I did not cover her like she has covered me,” he said. “To Kim I want to say I know I hurt you. Please forgive me. Thank you for always being there for me.”

This apology comes five days after the rapper had posted a series of since-deleted tweets where he claimed that his family was trying to get a doctor to lock him up “like on the movie Get Out.”

“Kriss don’t play with me you and that Calmye are not allowed around my children,” the rapper wrote to his mother-in-law Kris Jenner. “Ya’ll tried to lock me up.”

In another tweet, he asked his family to return his calls, and posted a text seemingly sent to Jenner that said, “This is Ye you ready to talk now or are you still avoiding my calls [?]”

Kanye has been separated from his family, as his wife stayed in Los Angeles while he traveled to South Carolina to do a campaign rally in the state last week. At the rally, Kanye made several  comments, including that he believed Harriet Tubman “never actually freed the slaves. She just had the slaves go work for other white people.”

At the rally, Kanye also tearfully said that Kim had considered ending her first pregnancy with their daughter. He referenced those comments in his Twitter rant, saying, “Kim was trying to fly to Wyoming with a doctor to lock me up like on the movie Get Out because I cried about saving my daughter’s life yesterday.”

Kanye also claimed that he was  trying to divorce his wife, tweeting, “I been trying to get divorced since Kim met with Meek [Mill] at the Warldolf for ‘prison reform.'”

After the rally and Kanye’s tweetstorm, Kim posted a statement asking fans to give the star understanding and empathy while he deals with bipolar disorder.

“He is a brilliant but complicated person who on top of the pressures of being an artist and a black man, who experienced the painful loss of his mother, has to deal with the pressure and isolation that is heightened by his bi-polar disorder,” she wrote on Instagram Stories on Wednesday. “Those who are close with Kanye know his heart and understand his words some times do not align with his intentions.”

“We as a society talk about giving grace to the issue of mental health as a whole, however we should also give it to the individuals who are living with it in times when they need it the most. I kindly ask that the media and public give us the compassion and empathy that is needed so that we can get through this. Thank you for those who have expressed concern for Kanye’s well-being and for your understanding,” she said.