In the 15 years Olivia Wilde has spent in front of cameras, she’s been studying how the other half lives. She’s been doing that on her own time, too, shadowing directors and cinematographers on sets, and trying her hand at directing a short film and two music videos. But it wasn’t until she ran across the screenplay for “Booksmart” that she knew she’d found the moment to tackle her first feature.

The film, to be released by Annapurna in May, springs from a rather simple premise: On the day before graduation, two overachieving high school seniors (Beanie Feldstein and Kaitlyn Dever) start to reckon with the fun they’ve missed out on, and resolve to pack four years’ worth of partying into a single night. But “Booksmart” is more than just a gender-flipped take on high school comedies such as “Superbad” and “Dazed and Confused,” and Wilde is just as willing to depart from formula as she is to embrace it.

“Unfortunately, I think there are a lot of high school movies that don’t embrace the high stakes of the adolescent experience,” she says. “There’s a lot about being a teenager where it feels like life and death; you’re completely self-focused at that age. So I wanted to make a movie that felt as high-stakes as an action movie. I wanted it to be the ‘Training Day’ of high school comedies.”

Wilde packs the film with some bold stylistic flourishes and fantasy sequences — “I wanted the audience to experience the inside of a teenage girl’s mind,” she says, “which is an incredibly intense place to be” — and elicits some unusually three-dimensional performances out of both her primary and supporting actors, no doubt helped by her insistence that the entire cast perform with no scripts or sides on set or in rehearsal (“that’s something I ripped off from Scorsese, because it forces you to do the homework and allows for a much more efficient set”).

But while Wilde can cite the personal mentorship of Reed Morano, Spike Jonze and Martin Scorsese in teaching her some tricks of the trade, it was her time in front of the camera that helped her develop the confidence to take the helm. “Actors can smell fear in a director, and sometimes it stops them from doing their best work,” she says. “So I just wanted to create this super-safe environment, where everyone knew that I had their backs in every department.”

Influences: Amy Heckerling, Spike Jonze, Steven Spielberg, Nora Ephron

Agency: CAA

Management: Untitled Entertainment

Legal: Ziffren Brittenham