NEW YORK — President Obama assumed the role of celebrity-in-chief again Tuesday with a glamorous fundraiser at the downtown nightclub of hip-hop mogul Jay-Z and his wife, superstar singer Beyonce.

Obama addressed a group of 100 supporters at the club 40/40 on West 25th Street, his supporters having paid $40,000 apiece for the privilege of sipping champagne, lounging on luxurious, pale couches and noshing on hamburger sliders.

Obama began his remarks on a lighter note, thanking ”Jay and Bey” for their hospitality and noting how much he and Jay-Z have in common.

“Jay-Z now knows, you know, what my life is like,” the president said. “We both have daughters. And our wives are more popular than we are.” He turned to his host and added: ”So-- you know. So we’ve got a little bond there. It’s hard, but it’s OK.”

Obama also thanked Beyonce for being a role model to his daughters Sasha and Malia. ”She carries herself with such class and poise and has so much talent,” he said.

Beyonce, wearing a form-fitting red cocktail dress, introduced Obama by saying:

“I can’t tell you how proud we are to host tonight’s event with President Obama. ... We believe in his vision.”

The club was filled with sharply dressed women in New York-high heels and men with expensive haircuts. Glass cases lining the walls contained scores of gold baseball bats and a collection of sports jerseys. Most in the audience listened raptly, either sitting on couches that lined glass-fronted tiers looking down on the club’s bar or standing along the balcony at the top of the club. Even some of the servers, in formal white shirts and black bow-ties, stood listening as Obama spoke.

The president has held a string of fundraisers with east- and west-coast celebrities, including George Clooney, Sarah Jessica Parker and Anna Wintour.

On Tuesday, he was more subdued than he has been at recent public events. Obama got serious to talk about the choice voters face this fall as they decide whether to give him a second term or elect Republican Mitt Romney. It is a choice, he said, that will determine the long-term direction of the country.

“So, I don’t want people to be complacent, but I also don’t want people to be discouraged,” he said. “We’re on the brink of an election, but more importantly, we’re on the brink of moving America in a direction where we’re going to be more just, more fair. The economy’s going to grow in a way that includes everbody, an America that’s respected around the world, because we’re putting forward our best values and our best ideals.”

In addition to the high-dollar donors, the audience included Ericka Dungee of Hermitage, Pa., and her husband, Bill, who won the campaign’s “NYC With Barack, Jay-Z and Beyonce” fundraising contest. Ericka Dungee is a mother of two young children and a kindergarten teacher and comes from a family of educators, according to the Obama campaign. Her husband is a school district business manager.

Proceeds from Tuesday’s fundraisers — there was also a high-dollar event at the Waldorf Astoria — will go to the Obama Victory Fund, a joint fundraising committee of Obama for America, the Democratic National Committee and several state Democratic parties.

Just a few moments after the president’s motorcade began the drive back to John F. Kennedy International Airport, the campaign announced a final “Dinner with Barack” contest, which supporters can enter with a contribution as small as $5.