In the world of magic, the man behind the curtain is William Kalush.

Kalush is cagey about his résumé, but for decades, he has worked with the business’ top performers to create bigger and better mind-bogglers.

When David Blaine stood for 73 hours surrounded by seven gigantic tesla coils at New York’s Pier 54 in 2012 for his feat of endurance, “Electrified,” Kalush, 53, was there to consult.

“It was a nightmare because the weight of the chain mail he wore made his blood pool,” Kalush says. “I was also concerned about him breathing in the ozone put off by the coils. It can’t be good for you.”

Kalush is the producer behind other Blaine stunts, including “Vertigo” and “Frozen in Time,” as well as his 1998 street-magic documentary, “Magic Man.” In fact, Kalush has been a co-conspirator in nearly all of Blaine’s work.

But despite Kalush’s outsize influence on a new era of hair-raising magic, few have ever seen him perform.

“Getting Kalush to show you a trick is a miracle,” says Asi Wind, another magician who has worked with Kalush.

“He doesn’t perform, yet he practices more than any working pro I know. He’s considered one of the greatest sleight of hands in the world. He’s a prestigious and mysterious figure.”

His abilities aren’t the only cards he keeps up his sleeves.

Kalush is one of the most important collectors of rare volumes on performance magic in the world. He has spent his entire adult life amassing a collection of 15,000 or so books, which now forms the basis of his Manhattan nonprofit, the Conjuring Arts Research Center.

He also acquires and digitizes the correspondences of hundreds of magicians and the complete archives of many others with his own private staff of librarians, translators and researchers.

“We have a lot of resources that exist nowhere else and curatorial expertise that you couldn’t get at a normal library,” says Kalush, who opened the center in 2003.

Today, the library is largely self-funded, but it also relies on private donations, commissions for elaborate custom playing cards and subscription fees that run from $95 to $495 a year. Twice a year, he publishes Gibecière, a beautifully bound journal of magic scholarship and English translations from his collection.

“When I say there is not another example [of the texts in our library], that means the British Library doesn’t have it. The Vatican doesn’t have it. The Library of Congress doesn’t have it. There are no other copies,” he says, opening a protective binder to reveal a single-leaf pamphlet from the 1530s describing how to make a ring dance in a glass and various other tricks.

Another paper shows what might be the earliest printed example of card magic. “Many of these tricks would still be familiar to magicians today,” he says.

In the insular and mum-lipped fraternity of stage illusionists, mentalists and parlor magicians, the saying goes that a magician never reveals his secrets. That means learning to catch a bullet in your teeth, pull a rabbit from your hat or vanish a lady can be a magic act in itself. Not only did Kalush create a way for magicians to easily access a wealth of history, often going back to the first published example of a given trick, he has also made those resources available in the library’s proprietary online database, “Ask Alexander,” named after a 1920s poster depicting a turban-wearing mentalist. What once took days, months or even years to find is now searchable in seconds.

“The library has inspired many amazing ideas,” says Blaine, who is on the library’s board. “Previously unavailable, rare books and documents make this an unrivaled asset in the magic community.”

But don’t expect to get a card for this library. Kalush’s life work is for the express use of working magicians looking to up their repertoires and to research forgotten techniques — as well as the occasional screenwriter.

“We don’t accept walk-ins or give tours because it’s all we would ever do,” Kalush says. “We accept researchers involved in research projects.”

Housed in a nondescript Midtown office building, the library requires that all visitors make a prior appointment with a request for a specific resource that cannot be found in most bookstores.

The space itself is a dark, narrow labyrinth of floor-to-ceiling bookcases, archive boxes, glass displays and flickering lights. The elevator landing welcomes guests with a large early-20th-century poster of the mystic Samri Baldwin standing with a tower of human skulls. On the front desk lies the bronze mask of the late magician and ventriloquist Jay Marshall.

A glass case in a cramped hall displays a set of Harry Houdini’s handcuffs, which the legendary escape artist claimed were worn by Charles Guiteau, President James Garfield’s assassin, at his execution in 1882. To the side of the famous cuffs lies a 16th-century medal bearing the face of Italian magician Hieronymus Scotus.

Other curious objects — such as a baseball impossibly fitted inside a Martinelli apple-juice jar by Harry Eng, specialty decks of cards and dozens of haunting turn-of-the-century posters promoting magic acts — are packed wherever they can fit in the claustrophobic space. A tremendous Houdini poster, once owned by the magician himself, fills the bathroom wall.

“It’s not meant to be disrespectful to Houdini,” says Kalush, who co-wrote the 2006 book “The Secret Life of Houdini: The Making of America’s First Superhero.” “There just isn’t enough wall space to put it anywhere else.”

The library’s rare-book room, which lies beyond an unmarked central door, boasts a long study table covered with unique examples of incunabula on magic and surrounded by high-backed, Gothic-style chairs. Along the walls there are more than 2,000 books written between 1480 and 1900 in a dozen-odd languages. Each volume was purchased through years of relationship-building with a wide network of book dealers. Its oldest document is a fragment from Caxton’s “Canterbury Tales” by Chaucer from 1476, in which a pilgrim discusses seeing a magician.

“This is really rare and really great,” says Kalush, opening a document case to reveal a print depicting a crowd in Renaissance dress watching a cups-and-balls magic trick. “Do you know the scene? It’s an engraving after a [Hieronymus] Bosch painting [“The Conjurer”] done in the 16th century by Balthasar van den Bossche. The original painting [from 1502] is in a small museum outside Paris. If one of these came up on the market, it would go from more than $100,000.”

Kalush adds that he doesn’t know (or perhaps doesn’t care to say) what his library is worth taken as a whole. “To quote my friend [the late magician] Robert Lund,” Kalush says, “Since the collection isn’t for sale, you can say it’s worthless.”

Kalush was raised in Lansing, Mich. His father was a Marine who was wounded in the Battle of Guadalcanal in 1943. While recovering in the hospital, he learned a few magic tricks that he later taught to his 5-year-old son. Like a lot of kids, Kalush was hooked on magic. But it wasn’t until age 11, when he saw magician Ricky Jay perform on a Doug Henning TV special, that he got serious about his hobby.

“Ricky had long hair and was laughing,” Kalush says. “He was totally different. At that point, my interest changed to card magic. Twenty years later, we became friends and he was a great supporter [of the library] from Day One. In a way, he is the reason the library exists.”

Since then, the library has provided an open book to virtually every magician of note, from David Copperfield (a noted book collector himself) to Teller of the legendary act Penn & Teller. The Palace Hotel’s Steve Cohen researched five classic illusions there. But it has also helped countless lesser-known performers.

The library’s outreach program teaches magic at children’s and veterans’ hospitals, as well as to at-risk kids at youth centers.

“The buzzword right now is STEM,” Kalush says, referring to the acronym for science, technology, engineering and math. “Well, all of those things fit into magic. There’s tech and engineering. We use math and science principles. But there is also applied psychology and performance. Kids studying the art see a great benefit because all these things play into it.”

Blaine says that the youth program is especially important to him. After all, learning the discipline “to achieve mastery in performance and the art of magic” was a “tremendous help to me as I faced challenges growing up,” he says.

The library also has its own online “university” to help new magicians hone their craft.

“We want to raise the public’s perception of magic,” says Kalush. “We want better research. We want the new guys to have better tools. I want people to see that magic is an art and not just for kids’ birthday parties or for a corny guy with no personality.”