A rapper was slapped with charges Sunday after he and his crew of about 60 people filmed a video atop a Lower East Side building — using real and imitation firearms, authorities said.

More than 40 were hit with trespassing and other charges for the illegal stunt, in which rapper China Mac — real name Raymond Yu — and his entourage climbed atop a public housing restroom building in order to film a music video.

When officers crashed the shoot around 6:15 p.m. Saturday, some participants jumped from the single-story lavatory at Manhattan’s Baruch Houses and fled, a police source said. Cops could not confirm that detail.

Police found two imitation rifles and one real firearm on the roof of the bathroom compound.

Yu, a former member of the Ghost Shadows gang who spent 10 years in prison for the shooting of a rival, was also arrested.

The hip-hop artist posted a video on Facebook Feb. 1 — which also appears to be filmed on a roof — calling for extras.

“We goin’ have a gangsta party out here,” rapper China Mac, whose real name is Raymond Yu, tells the camera.

“Listen up ya! Email redmoneyrecords@gmail.com for the video shoot location. You do not wanna miss this epic shoot! It’s going to be super lit!!!” the caption states.

Yu was arraigned Sunday on charges of unlawful assembly, criminal trespass, and disorderly conduct , and released without bail. He’s slotted to return to court Feb. 16.

Thirty-three of the 44 arrested were issued desk appearance tickets, cops said.

“Safety and security is our top priority.,” a NYCHA spokeswoman said in a statement. “These individuals were arrested for trespassing on NYCHA grounds. We are currently working with our partners in law enforcement to resolve this investigation as soon as possible.”

Additional reporting by Gina Daidone