A trite romantic plot is rescued by a reliable stream of clever lines, engaging leads and an array of superior supporting players in Ivan Reitman’s “No Strings Attached,” which isn’t much more than an extended sitcom, but a sitcom better written (though notably raunchier) than the ones you’ll find on the broadcast networks.

Natalie Portman, segueing rather dramatically from her “Black Swan” turn, plays that tired stereotype, the confirmed commitment-phobe, as Emma, a harried L.A. med resident whose schedule (as well as her own certainty that any relationship she gets into will be doomed) leaves her no room for real romance. So in search of sexual release she enters into a purely businesslike “friends with benefits” deal with amiable Adam (Ashton Kutcher), a guy she’d met years ago at summer camp and later at a college frat party who again comes drunkenly into her life after he learns that his father (Kevin Kline) has taken up with his ex-girlfriend (Ophelia Lovibond).

If you’ve ever seen a movie before—and probably even if you haven’t—you know that these two are going to end up in each other’s arms (and beds) for real, however much Emma tries to resist Adam’s charms. And in truth their on-again, off-again relationship is at times the least amusing part of the movie, especially in the obligatory section toward the close where they’re separated and miserable, each in his or her own way. That morose third-act interlude is overly protracted here, and Portman in particular loses her bearings a bit during it, with her dramatic impulses sometimes overwhelming her comic instincts. (Earlier on, she has a drunken scene that goes a mite awry, too.)

For the most part, however, Portman’s relatively rare foray into the farcical works reasonably well—she gives this script as much intensity and energy as any other—and she makes an amusing pairing for the much taller Kutcher, whose goofy charm is used to much better advantage here than in the string of mostly terrible movies that have blighted his big-screen career. And Adam’s job as a production underling at a “Glee”-like TV show gives him a milieu in which his character can go beyond the usual dumb slacker persona, too.

It also allows for scripter Elizabeth Meriwether (in her first feature) to introduce some winning supporting characters. Foremost is Adam’s philandering father Alvin, a former sitcom star played by Kevin Kline, who brings his formidable talent for preening arrogance to the part with delicious results. (Kline seems to be a lucky charm for director Ivan Reitman, whose string of disasters since 1993’s “Dave,” in which Kline starred, has finally been broken.) And he’s nearly matched by Lake Bell as Lucy, an uptight staffer on the TV show who’s obviously infatuated with Adam—just think of Nancy Kulp’s Jane Hathaway raised to a higher degree of embarrassed obsession. And that isn’t all of the second-string zaniness orbiting around Adam. Jake Johnson, channeling Mark Ruffalo a bit, is amusingly deadpan as his pal Eli (the one with two dads, as we’re told repeatedly), and Chris “Ludacris” Bridges is hilariously dour as their bar-owning chum. Lovibond has a few good moments as well, and even the pooch she, Kutcher and Kline play scenes with toward the close is more endearing than most movie dogs.

Of course, Emma is given an assemblage of wise-cracking roommates too, headed by tall, imposing Greta Gerwig as Patrice, who links up with Eli, and “The Office” mainstay Mindy Kaling as sharp-tongued Shira and portly Guy Branum as their oh-so-gay roommate (an inevitability nowadays, apparently). Less effectively used are Ben Lawson as the doctor who appears to be Adam’s rival for Emma’s affections, and Cary Elwes, in a very odd (and very small) part as another staff physician who initially seems to be a creepy stalker but turns out to be a pretty regular fellow. Nor do Olivia Thirlby, as Emma’s sister Katie, or Adhir Kalyan, as Katie’s fiancé, have much to do.

But if “No Strings Attached” is uneven and a few of the large supporting cast are underused, for the most part it coasts along on the chemistry between the leads and the zingy one-liners Meriwether provides throughout, which may not be of Oscar Wilde caliber but are far funnier than what passes for humor in most modern romantic comedies. (Also more explicit: the “R” rating is due less to the bedroom scenes or the one in which Kutcher’s derriere is prominently displayed than to jokes that will cause the prudish to blush.) Technically the movie’s fine, with Rogier Stoffers’ widescreen cinematography using the Los Angeles sites effectively and not getting as garish as one might expect.

This is, incidentally, one of those movies you should sit through to the end. The final credits are accompanied not by outtakes, but by summing-up shots that act to round off the fates of the various characters. And while some come out of left field and just seem tacked on (like the one involving Lawson and Branum), most are worth a chuckle—like the picture itself.