THE house was filled with balloons and confetti, the chips and artichoke spinach dip were ready, and the guests, about 25 of them, were decked out in team colors, ready to cheer. Minutes before the party kicked off, they eagerly cast votes on the outcome.

But this festive gathering, held recently at the Miami home of Carolina and Carl Marrelli, was not a Super Bowl celebration. The decorations were all in very un-N.F.L. pinks and powder blues, and the sides involved were “Team Boy” and “Team Girl.”

This was a gender-reveal party, during which expectant parents share the moment they discover their baby’s sex, unveiling results of the ultrasound test among loved ones (often replaying the moment later on Facebook or other social media). It’s the rare surprise party that people can give for themselves.

Until recently a little-known practice, the concept is quickly becoming a pre-parenting custom, a dress rehearsal of sorts — or sometimes a replacement — for the baby shower. In a culture where many expectant parents feel obligated to tweet their pregnancy announcement, live-post their ride to the hospital via Instagram, and Skype the baby’s first smile, it’s the latest example of one of parenthood’s formerly private moments becoming a matter of public consumption.