“Friends With Benefits,” a breezy, speedy and (no kidding) funny comedy with a nicely matched Justin Timberlake and Mila Kunis that is about love and sex in the age of social networking, gets some of its juice and tang partly by trash-talking its own genre. The setup is familiar, as are the essential elements: a single man and a single woman, two battered hearts yet a pair of resilient, eager, pretty bodies. But Ms. Kunis’s character is dark and savvy, not blond and dippy, and when she comically rails against an unseen Katherine Heigl you may sigh with relief (fingers crossed) that you’re watching the “Scream” of romantic comedies.

Much as the first “Scream” movie gave horror cinema a jolt with self-consciously knowing characters who knew the bloody ins and outs of the genre — and were sadistically subjected to those clichés firsthand — “Friends With Benefits” starts from the premise that its characters, and you, are sick of the romantic comedy clichés they may secretly, or not so secretly, adore. In other words, the director Will Gluck, who wrote the script with Keith Merryman and David A. Newman, doesn’t just want to have his romantic comedy cake and eat it too, he also wants to throw it in your face and make you laugh as you lick the icing off your lips. The results are about as naughty as that sounds (not very), but it also makes for a fairly giggling good time.

A corporate headhunter but, you know, cool, Jamie (Ms. Kunis) meets Dylan, a Web site art director (Mr. Timberlake) , when she lures him to New York to interview for a spot at a men’s magazine. They meet cute — she’s scrambling atop an airport baggage carousel and he’s wide-eyed and willing —and they’re soon off and running, or really walking and talking, mostly talking. She needs him to take the job to earn her bonus and so sweetens the deal by showing him around what she calls the real New York. That this tour includes a flash mob shouldn’t be held against Jamie, not least because Ms. Kunis is fast proving that she’s a gift that keeps giving to mainstream romantic comedy.

One reason is that she doesn’t play the stock girl, teary and needy or plucky and needy, but rather a woman who can go joking round for round against men. Ms. Kunis looks itty-bitty enough to hang on a charm bracelet, but her energy is so invigorating and expansive and her presence so vibrant that she fills the screen. If she continues to score roles like this, she might even be able to break out of the genre. Of course she’ll probably be forced to compete with the equally appealing and tiny — if paler and pinker — Emma Stone, who, with several other name actors, makes the most of a tiny role. Mr. Gluck directed Ms. Stone in “Easy A,” a lightly (very lightly) self-aware flick about a high-schooler play-acting as Hester Prynne.