Want a cupcake at any time? New Yorkers now have that luxury with the Sprinkles Cupcakes ATM.

New York's first-ever cupcake ATM opened on the Upper East Side on Tuesday. Through the machine, customers can pick up fresh, sweet treats 24-hours a day by the push of a button.

 "The cupcakes are as fresh as they are at the store," Charles Nelson, 44, who along with his wife founded Sprinkles Cupcakes told the New York Post. The bright pink cupcake dispenser can be found right next to Nelsons' Sprinkles Cupcakes bakery on Lexington Avenue between 60th and 61st in Manhattan.

Although it might be unique to New York, it's not the first of its kind, but it's not the first ever. The Beverley Hills-based bakery also has a cupcake ATM in Los Angeles, Chicago, Atlanta and Dallas.

Customers can choose up to 20 different cupcakes through a touch screen and functions similar to an ATM machine. Customers can choose their cupcake, swipe their credit card and collect their cupcakes that comes packaged in a brown and pink box. The machine also gives customers the chance to watch a tiny crane pick up their cupcakes through a live video after they make their selection. It takes about 10 seconds for a cupcake to pop out.

Each cupcake costs $4.25 and among the flavors are red velvet, Cuban coffee, banana dark chocolate and cinnamon sugar.

The machine even offers cupcakes for dogs. Pet owners can receive two mini-cupcakes for $ that come in one flavor. They're sugar free and have a yogurt frosting, making them safe for pets.

The machine can hold up to 760 cupcakes at a time and to keep them fresh, they are restocked two to three times a day.

Nelson told the Post that he got the idea for the cupcake ATM six years ago while his wife was pregnant with their first child.

The machine will be able to hold 760 cupcakes at a time and will be restocked two to three times a day to keep things fresh, Nelson said.

 "It was the middle of the night, and my wife really wanted a cupcake," he said. "I own a cupcake shop and couldn't even get a cupcake!"