The slick rap video had all the trappings of a hit: guns, gritty urban setting, armed robbery and a flashy getaway car. But, as it turned out, the video found its true potential not on YouTube, but in federal court.

The video shows three men in a black Mercedes, immersed in the prelude of a crime about to be committed. Ski masks are donned; guns are readied. Two of the men emerge from the car and follow a man to a building hallway, where they rob him at gunpoint. They return to the car, and the waiting driver speeds them away.

Rap music has been known for violent images and lyrics, but this video, inspired by a song, “The Joy” by Kanye West and Jay-Z, was unusual because some of its featured performers have been charged as members of a real-life robbery team. And the video showed them staging the same kind of crime that they had been charged with committing.

The actual crimes, prosecutors say, included a string of armed robberies in the Bronx and Westchester County, in which a group of men brandished guns and knives and stole thousands of dollars from bodega owners and deliverymen. In one 2011 robbery in Mount Vernon, N.Y., a man was shot and killed.