A Cabaret Star and an Opera Star Walk Onto a Stage …

“This show has been 10 years in the making,” the countertenor Anthony Roth Costanzo said recently.

He was talking about “Only an Octave Apart,” an undefinable event — A staged concert? A revue, maybe? — which he created with Justin Vivian Bond and which runs at St. Ann’s Warehouse in Brooklyn from Tuesday through Oct. 3.

On paper, the two seem to be unlikely collaborators. Bond, 58, is a throaty-toned pioneer of the alternative cabaret scene, both as a solo artist and as half of the duo Kiki and Herb. Costanzo, 39, is a classical star whose luminous voice takes him to opera houses and concert halls around the world. (In the spring, he’ll return to his body-waxed role as the titular character of Philip Glass’s “Akhnaten” at the Metropolitan Opera.)

But Costanzo’s voracious taste for collaboration has encompassed artists as disparate as the painter George Condo, the ballet dancer David Hallberg and the fashion designer Raf Simons. And Bond recently appeared in an opera, Olga Neuwirth’s “Orlando,” in Vienna in 2019.

So it’s not entirely implausible that they’ve ended up together at St. Ann’s, where their set list ricochets giddily from Gluck to Jobim to the Bangles, and the artistic team includes the director Zack Winokur (“The Black Clown”), the fashion designer Jonathan Anderson and the composer Nico Muhly on arrangements.

Bond and Costanzo’s partnership is more organic than most “when worlds collide” projects, which often feel as if an enterprising impresario had pulled random names out of a hat and precipitately pushed the unlucky artists onstage.

“We were seeing each other because we were friends, not because we were intending to collaborate,” Bond said, sitting with Costanzo after a recent rehearsal.

Back in 2011, Costanzo was in the audience at Joe’s Pub for one of Bond’s cabaret outings. When Bond mentioned from the stage that the guest artist for an upcoming performance had just dropped out and there wasn’t a replacement, Costanzo leaned over to a friend and whispered, “Me!”

The friend, the photographer and director Matthew Placek, also knew Bond and made the introductions. Costanzo nabbed the guest spot and prepared a Handel aria, but he was also keen to join voices on “Summertime.”

“You said no,” Costanzo recalled to Bond in the interview. “Then right before the show started, I was practicing it and you were like, ‘All right, all right, we will do it as a duet.’”

The combo was a success. “We sounded so good together,” Bond said. “Of course, that song’s problematic and we can’t sing it anymore, but it gave us an opportunity to see our chemistry onstage, which was really fun.”

So much so that they are back for more, though the initial impetus was rather pedestrian: Costanzo wasn’t sure what to do next for his record company. “I just didn’t want to make ‘Scarlatti Cantatas’ or something,” he said. “I mean, they’re beautiful, but it’s been done.”

Teaming up with Bond provided a creative solution. (And this won’t be their last partnership of the season. They will come together at the New York Philharmonic in January as part of the “Authentic Selves” festival that Costanzo is organizing.)

The inspiration for “Only an Octave Apart,” and the title number, came from a pop-culture footnote: a television special that Carol Burnett and Beverly Sills recorded at the Met in 1976. A similar encounter of disparate influences and high and low culture (or at least what audiences associate with high and low), flavored with vaudevillian touches, will now be played out at St. Ann’s.

At first, even the longtime Bond collaborator Thomas Bartlett — who is the show’s music director and producer of the album version of “Octave,” which comes out in January — was skeptical.

“When the idea was pitched to me, it sounded a bit like a fun joke,” he said in a video call. “It didn’t occur to me that Anthony’s voice would make Viv’s voice feel rich and kind and wise in this way, and that Viv would make Anthony sound even more ethereal.”

Bond, Costanzo and Bartlett came up with a wide range of material. Some of the songs are duets, like Peter Gabriel and Kate Bush’s “Don’t Give Up.” Some are solos in conversation with each other, such as when an aria from Purcell’s “The Fairy Queen” segues into the early-20th-century ditty “There Are Fairies at the Bottom of Our Garden.” Some are classics from the cabaret repertoire, like “I’m Always Chasing Rainbows.” And some are the kind of free associations in which Kiki and Herb used to specialize, like a surprisingly effective medley of “Dido’s Lament” — also by Purcell — and Dido’s “White Flag.”

Despite the mingling of their musical universes, the performers stay true to their respective styles. “We’re not crossing over,” Bond said firmly. “We’re holding our own space, but we’re doing it together.” They do not scat-sing Purcell, for example, and Costanzo does not imitate the disco singer Sylvester’s famous falsetto when the pair covers his track “Stars.”

“I was like, how do I take an application of this voice and technique that feels honest and that sings the song?” Costanzo said. “I listen to opera singers try to sing pop and it’s so lame, because inevitably they wind up trying to sing some classical arrangement to a pop song.”

During a recent rehearsal, Bond often left space for future improvisation. “I’m going to come out, they’re going to see me, I’m going to milk it for a moment,” Bond said at one point, describing an entrance. Costanzo, on the other hand, is used to the precision of classical music, where every note and step is carefully planned.

“Sometimes my frustration with opera is that all spontaneity dies in pursuit of perfection,” he said. “I want to uphold and cherish the tradition, but in order to make it feel alive, it needs some kind of being in the moment and spontaneity.”

“But it’s challenging because I am always looking for structure and Viv is always like, ‘Don’t box me in because it’s not going to be as good,’” Costanzo said.

Still, Bond pointed out that there is a safety net. “I obviously don’t want Anthony to feel uncomfortable, or that he’s going to be in any way undermined or not feel that he’s going to be seen at his best, so we’ve been establishing points where things definitely have to happen,” Bond said.

Working out the sound of a crow’s caw, the pair seemed ready for their spotlight — at the most stylish comedy hour ever. “I’ve never laughed so hard in the rehearsal process,” Winokur, the director, said.

But if there are many jokes in the show, the performers are in on them.

“Being a countertenor, whenever I open my mouth, even at the Met, people go, ‘Why is he singing like that?’” Costanzo said. “I go work with kids and they laugh the minute you start singing. Which I love, I welcome it, but I’m like a novelty in that way, which I enjoy exploiting.”

“As a classical musician,” he added, “you can be gay or queer or whatever, and then you go do your show. You are not expressing yourself as much in that theatricality or your identity. You are embodying a character. This project feels like, for whatever reason, this real theatrical expression of who I am.”

Bond suggested, “It’s expressing your artistry through a place of truth, as opposed to trying to make something that is artificial seem true.”

Costanzo laughed and said: “See? Viv is so good!”