And when it started its ascent, her pulse started to race. “That’s unavoidable,” she said.

And so the Met joined Las Vegas casinos and wherever else the Rat Pack and its Clooney-era descendants have played out their scams in the “Ocean’s’’ movies. Not all of the Met scenes were shot at the Met — the elaborate lineup of mannequins were lined up in an aircraft-factory-turned-soundstage on Long Island.

But much of what looks like New York in the movie is New York. Cartier closed its store on Fifth Avenue for two days. Even The New York Times Building puts in a cameo appearance. (It’s a movie. It’s fantasy. Rihanna downstairs in the lobby, commandeering a custodian’s cart in the middle of the night? Please.)

The Met has labored to put some past financial turbulence behind it while adjusting to new admission fees for museumgoers who do not live in New York State — the Met’s longstanding “pay what you wish” policy ended in March, and the de Blasio administration has laid the groundwork to reduce the city’s contribution to the Met by up to $3 million a year, depending on how much the out-of-staters bring in.

So, for the Met, movies and television shows are an appealing source of additional revenue, though a small one for an institution with a budget of more than $300 million. Met officials say cameras have been allowed in for other movies, including “When Harry Met Sally” and “Maid in Manhattan,” and for small-screen series like “Gossip Girl.” Some movies did not pass the guards at the front door — in fact, the 1999 remake of “The Thomas Crown Affair” did not cross the threshold, although it showed Pierce Brosnan on the steps. The Met “respectfully declined” a request to film inside, according to the film’s production notes — the film showed Mr. Brosnan making off with a painting, which troubled Met officials at the time. The producers found backdrops at the New York Public Library that could be decorated like museum galleries.

Met officials will not say how much “Ocean’s 8” paid for the privilege of filming there. “It was appropriate for both sides,” the Met’s president and chief executive officer, Daniel H. Weiss, said in an interview, “but confidential.” The New York Post said last year that a $1 million donation had opened the Met’s doors after hours. (As for The New York Times building, a spokeswoman for The Times and a spokesman for Forest City Realty Trust, which together own it, said the movie paid for two nights of shooting. Like Mr. Weiss, neither would say how much, but both said the money was split between The Times and Forest City.)