As Zoe Levin stepped into her character’s shoes — or, to be exact, thigh-high, lace-up patent leather boots — she had just one simple rule for herself.

As the 25-year-old actress tells The Post, it was: “Be uninhibited in every way.”

In “Bonding,” a new Netflix comedy series out Wednesday, she stars as Tiff, a graduate student by day and a high-paid dominatrix by night. Levin, who was on Fox TV’s “Red Band Society,” and played an effortlessly cool teen in “The Way Way Back” with Steve Carell, admits that this, her first leading role, was particularly challenging.

“It’s intimidating to show any sort of sexuality in front of a big group of people,” she says of her time on the set of “Bonding.” And it’s no wonder she felt shy: The script has her barking orders at submissive clients who pay to be humiliated in all sorts of creative, surprising and visually eye-popping scenarios.

But after Levin took the part, she didn’t have much time to second-guess it.

She auditioned at the last minute, she says, and got the call just one week before she had to pack up and move from her home in Los Angeles to New York for the monthlong shoot. Levin says she did a little online research about the BDSM community, but mostly she just put her faith in the show’s creator, writer and director Rightor Doyle. He knew a thing or two about the subculture: “Bonding” is his fictionalized account of the time he spent assisting his female best friend from high school, one of Manhattan’s most in-demand dommes.

Levin grew up in Chicago. A “little diva” who always loved acting, she got her big break at 15, when she won a small role in the David Schwimmer-directed film “Trust.” She says that Doyle handpicked her to play Tiff: “He told me that he saw my audition tape and started crying,” she says. “It was so sweet, he was like: ‘We found her.’ ”

She believes he responded to her ability to switch back and forth between the character’s two extreme poles, where she’s powerful to the point of being “undercutting and patronizing,” but she’s also sensitive. Levin says that Tiff’s vulnerability was easy for her to conjure. “I love when I get to play characters that are very guarded and then at some point let their guard down,” she says. “It’s so fun to explore and find those little cracks in the armor.”

The dominatrix side — Tiff’s sharp-tongued alter ego, Mistress Mae — was more of a stretch, she says.

To get into the right head space, Levin started by dyeing her sandy locks a rich, espresso brown. “That helped me feel very different,” she says, “I just kind of imagined her with dark hair.”

But the transformation wasn’t complete until she was fitted for her all-black, body-hugging costume. “I felt like a completely different person,” she says of strapping it all on for the first time. “The boots and the heels and the corset — it’s like her armor, she’s going into battle.”

Then there was the matter of familiarizing herself with the show’s unconventional selection of props.

In one scene, Tiff shows up to do a presentation in her psychology seminar dressed head-to-toe in dungeon garb. It’s a coming out, of sorts, especially because her kind but clueless love interest, Doug, is also a student in the class. She wields a bullwhip and eventually, menacingly, cracks it against the floor.

You’d never know it from watching, but Levin hadn’t seen the whip before that morning.

“That was within the first three days of shooting,” Levin says. “We practiced a lot and then . . . there was one take when I cracked it, and everybody just went silent. And were like, ‘Oh s - - t, that’s it, that’s totally it.’ ”

Still, she kept practicing, just in case: “I got pretty good at it,” she says with a giggle.

Ultimately, getting in touch with her inner badass felt “so good,” says Levin, especially when it came to Tiff standing up for a woman who’s being sexually harassed by a slimy professor. “When I hear something misogynistic or chauvinistic, I get super angry,” she says. “I have experienced catcalling and [feeling] objectified . . . It felt so freaking good to be able to channel that.”

Now that’s she’s returned to life off-screen, she wonders what her friends and family will think of Mistress Mae.

“My older brother is having a little bit of a problem with it,” she says, adding that her parents are totally supportive. “He’s like, ‘I’m not excited for that to come out. All my friends are making fun of me that you’re a dominatrix,’ ” she says.

But Levin isn’t letting him — or anyone else — cast a shadow over her star moment.

“Everyone is going to watch it,” she says. “Even my grandmother.”