A Nxivm sex cult “slave’’ took the stand in Brooklyn federal court Tuesday to reveal the twisted inner workings of the upstate group.

The woman, referred to on the stand as Sylvie to protect her identity, described how she was recruited to the group at age 18 by Seagram heiress Clare Bronfman — and groomed to perform perverted acts to please the group’s Svengali-like leader, Keith Raniere.

Sylvie told jurors she was eventually lured into Raniere’s inner sanctum of female slaves.

She described posing nude for a photo in 2015 at the behest of her female “slave master’’ — then got her sickening marching orders.

“Your first assignment is to seduce Keith Raniere,’’ the accused slave master told her.

Sylvie called Raniere “kind of a short, creepy-looking man’’ and said she reluctantly texted him, “You look sexy in your glasses.’’

Raniere — on trial for allegedly grooming young women, including one minor, for sex with the help of such cronies as “Smallville” TV actress Allison Mack and Bronfman — responded, “You have to do better than that,’’ the woman said.

He then pushed her to text “more vulnerable’’ photos of herself, Sylvie said.

Hiding in the bathroom of the home in Albany near Nxivm’s compound that she shared with her husband, the now-32-year-old witness said, she sent Raniere, 58, snaps that went lower and lower at his urging — until “literally, in the end, they were just of my vagina.’’

Over the ensuing months, Raniere’s demands became more perverse, said the witness, who is British.

The alleged cult leader pestered her for scores of sexually explicit photos of herself — and eventually, “he gave me actual poses to do,’’ she said.

Sylvie said she stopped when her father saw some of the images in an iCloud folder of deleted texts that the pair had shared.

“I found your medical photos,’’ her father said, according to the mortified witness, who burst into tears as she recounted the moment.

Sylvie sobbed so hard at one point that the judge stopped the proceeding to get up and grab a tissue and hand it to her.

The former slave said she told her Nxivm master, Monica Duran, that she couldn’t send any more photos.

Raniere menacingly responded, “I could stop sending the photos but that the next thing would be in person.”

The former teen equestrian said she spent 13 years with the so-called self-empowerment organization after being recruited by its benefactor, Bronfman, beginning when she was 18.

After years as a low-level “slave,’’ Sylvie said, she was lured into the coveted top tier of women around Raniere, a group referred to as DOS.

The letters reportedly stand for “Dominus Obsequious Sororium,’’ Latin for “Master Over the Slave.’’

That’s when Monica forced her to take the full-frontal nude, claiming no one else would see it, Sylvie said.

She said Monica also made her write a letter and film herself saying that she was a prostitute, which was a lie.

Monica referred to DOS as “the master slave project,’’ Sylvie said.

“Now I was Monica’s slave, and she was my master,’’ the woman said.

“She told me she would be giving me special assignments to help me push through my fears,’’ including seducing Raniere.

Just for good measure, Raniere’s DOS sex-slave members were branded with his initials, “KR,” prosecutors said in opening statenments earlier Tuesday — displaying an image of one of the marks for jurors.

They also showed a photo of a 15-year-old girl named Camilla whom the feds charge Raniere had sex with.

Camilla was recruited from Mexico and was Raniere’s first sex slave, prosecutors said.

“This was organized crime. Keith Raniere was an organized crime boss,” prosecutor Tanya Hajjar told the jury of eight men and four women.

As Raniere’s first “slave,” Camilla was urged to recruit other slaves to sleep with him, prosecutors said.

One recruit, an actress named Nicole in her 30s, was introduced to Raniere while “blindfolded and tied to a table,” Hajjar said.

“A third person came into the room and started performing oral sex on her,” she said. “That third person was Camilla.”

Raniere — known within Nxivm as grand master “Vanguard” — showed little emotion as he scribbled notes during Hajjar’s opening statements.

Sylvie, a former show jumper in England, said her own nightmare ordeal began after she was introduced to Bronfman through a friend. She had suffered a serious accident and was invited to spend three months in the US with the pal and Bronfman.

So Sylvie obtained a work visa and went.

“My dad printed out some stuff about Nxivm,” Sylvie recalled.

He told her, “It looks to me that [Bronfman] is in a cult,” the woman said.

But Sylvie ignored the warning and enrolled in a 16-day course with Nxivm. Her indoctrination started immediately.

Recruits stood in circles and clapped their hands while chanting, “We are committed to our success” — one of the main tenets of Nxivm’s “Executive Success Program,’’ Sylvie said.

Sylvie added that her first day left her “very spooked.”

“The girls are very focused on food and their weight,” she recalled. “On my first day there, they took me to lunch, and I got a slice of pizza, and they didn’t eat anything.”

Sylvie, who suffered from anorexia as a younger girl, said she endured a relapse of her eating disorder because of pressure from the group to stay thin.

She said Bronfman would quiz her about her weight, and when she told the heiress what she weighed, the older woman would gloat, “Oh, I’m lighter than you today.’’

Sylvie said Raniere even used to call her “the Spanish version of piggie’’ — and she dropped to 89 pounds at one point.

Sylvie said she met Raniere for the first time during an early-morning volleyball outing. She was invited to attend by Bronfman.

“You’d be encouraged to come at 1 or 2 or 3 in the morning,” Sylvie said of the routine. “People [were] kissing on the lips. I would’ve called it over the top. I thought it was an American thing.”

The group would gather for the sole purpose of watching Raniere play volleyball.

Soon after she met Raniere, Sylvie said he told her, “If we were ever to have a sexual relationship, we would have to become good friends first.”

Raniere has pleaded not guilty to various charges, including racketeering conspiracy involving acts of child sexual exploitation and possession of child pornography. The defense says the relationships were consensual.

Prosecutors are expected to introduce a trove of evidence against the accused cult leader, including child pornography images seized from his upstate New York home.

Raniere faces up to life in prison if convicted.

All of Raniere’s co-defendants, including Mack and Bronfman, have pleaded guilty to charges.

The trial is expected to last about six weeks.