On the fourth floor of Sotheby’s New York, there’s a private room sponsored by Loro Piana, the Italian cashmere specialist. On a recent afternoon, rapper and style muse A$AP Rocky sits on the floor, wrapped in one of the company’s cashmere blankets, a pearlesque necklace peeking out from beneath his T-shirt, Prada technical sneakers on his feet.

A young woman enters the room and brings him a coconut cracked in half. He takes a spoon to the tender white meat, and considers his place in – and out of – hip-hop.

When he emerged seven years ago, he was a high-fashion natural, displaying the sort of comfort and fluency in that world other rappers had pretended to pull off but never quite nailed. But something strange has happened in the years since: almost all of hip hop’s young generation followed suit. Goyard is more common than Carhartt. Gucci is more ubiquitous than Nike.

Rocky shrugs. “I proved my point in fashion,” he said. “Is it necessary for me to be at the Met Gala every year?” he asked. “I bodied that.”

Sotheby’s, though, is something new. He is unveiling Lab Rat, a performance installation in a high-ceilinged space on the seventh floor, typically used for auctions.

A$AP Rocky performs ‘Lab Rat’ inside a glass box, in a performance streamed on YouTube (A$AP Rocky) (A$AP ROCKY)

A few hours later, he’s inside a large glass box set up in the middle of that room, with tools of torment spread around him: exercise equipment, holes in the wall through which he could be touched, a large pool of ice water.

The box, he says, is “a metaphor for me being distracted”.

It’s been three years since he last released an album, and he realised that his fans worried whether music was his focus. “Their main concern was, do he even like doing this?” he says. While he has been one of the most influential personalities in hip hop of this decade – in terms of aesthetics, musical and personal – that hasn’t always translated to musical success.

It’s notable, and unusual, hearing him rap the hook of a major pop-rap hit, G-Eazy’s “No Limit”, which went to No 4 on the Billboard Hot 100. “It’s fun,” he says of those kinds of songs, which are few and far between in his catalogue. “Sometimes I’m frustrated. I’m in limbo, like, do you cash out or do you stay genuine to your craft? I would sleep better at night knowing that I’m me.”

He is the sort of rapper – the sort of New Yorker – who understands the difference between living on Park Avenue in the east sixties and living on Park Avenue in the east seventies. That person was at home at Sotheby’s. “Can I be real?” he asks. “All of the chicks look like they want to give me some…”

‘I don’t completely know what I’m doing, I just know what I like and what I don’t like. That’s what people trust more than anything A$AP Rocky’ (Getty)

Hip hop and art have become bedfellows, much as hip hop and fashion have. A few days before, Sean Combs (aka P Diddy and variations) paid $21m (£15.8m) for a Kerry James Marshall painting. And in 2013, Jay-Z did his own performance art simulation, based on, and including, Marina Abramovic.

Once Rocky is inside the box, a pair of examiners in lab coats pepper him with questions of varying degrees of intimacy and cruelty: “What do you like least about your own body?” “In 100 years, do you think anyone’s going to remember your music?” They make him dunk his head in the ice water; he lasts 56 seconds. As he comes up, gasping for air, the male examiner announces: “The subject will do better,” and makes him go again.

A couple of hundred of Rocky’s friends (and friends of Sotheby’s – you can tell the difference) stand around the box, aiming phone cameras at him. Thousands more watch on a YouTube stream. Out in the crowd, a gaggle of dancers, many of whom look like mini Rockys, interact with the crowd and various mannequins strewn around the room. They encourage viewers to wield a golf club and strike an imaginary ball from atop a baby mannequin.

The event isn’t bereft of commerce. At one point, Rocky pulls a chunky black sneaker out of a bag: the reveal of his coming collaboration with Under Armour. And the performance is also an elaborate maze leading to, at the end of the night, the announcement of his fourth solo release, Testing.

“I never won a Grammy – that makes me sad,” Rocky says. “I might be getting discounted.”

Testing is his most outré album to date, the one least concerned with prevailing trends. “I wanted to make my version of trip hop,” he said. One song, “Praise the Lord (Da Shine),” was produced by grime star Skepta while both men were on LSD, Rocky says. The album closer, “Purity”, is mournful indie rock featuring Frank Ocean and a Lauryn Hill sample.

“I feel like I’m just changing sounds again, and it takes some getting used to,” Rocky says. His taste in art is similarly instinctual. “It’s unorthodox. I don’t completely know what I’m doing, I just know what I like and what I don’t like. That’s what people trust more than anything.”

“I can afford contemporary art, but I prefer masters, Renaissance,” he adds. “Those pieces like a million and up, $5m and up.”

In other words, the sort of pieces that usually fill the room he’s performing in. At the end of the event, some of the dancers slide up to the balcony suites that line the room. During auctions, those are the rooms where the most serious collectors can bid in relative luxury and privacy, set apart from hoi polloi.

On this night, though, the suites’ windows are thrown open, and dancers flood the floor with huge silver balloons, which other dancers then throw into the glass box. Rocky is surrounded, suffocated, stuck.

But then the dancers free him, and Testing begins to play from the speakers. By the end of the night, Rocky is in one of those suites, surveying the detritus. Mobb Deep’s “Shook Ones (Part II)” is blasting. Everyone is dancing.

“It’s not for everybody to understand,” he’d said earlier. “I can afford to be myself.”