The short version: the “Magic UI API key” people search for is the Pro registry token — a private key that lets the shadcn CLI download paid sections and templates. You get it after purchasing Magic UI Pro ($199 one-time): log in to the Pro site with the same email you used at checkout, copy the token from your account, put it in .env.local as MAGICUI_PRO_REGISTRY_TOKEN, register the @magicui-pro registry in components.json, and run npx shadcn@latest add @magicui-pro/hero-1. The free library and the MCP server need no key at all.

Two things called “API key” — which one do you need?

If you have not bought Pro, there is nothing to configure yet: the pricing page explains what Pro adds (50+ sections, 9 templates, lifetime updates, one-time payment, no refunds on digital products).

Step 1 — Log in with your checkout email

  1. Complete the purchase on the Pro site (Stripe checkout).
  2. Open the Pro login page and sign in with the same email address you used at checkout — the official FAQ is explicit that access is tied to that email.
  3. Once logged in you have access to all components and templates; the docs also note that components are copied and pasted into your project individually rather than installed as a package.

Step 2 — Copy your registry token

Inside your Pro account, find the registry token (also labelled API key in the installation docs) and copy it. Treat it like a password: it grants download access to everything you paid for, and the License Agreement forbids sharing or redistributing Pro code.

Step 3 — Add the token to .env.local

In your project root:

# .env.local
MAGICUI_PRO_REGISTRY_TOKEN=your_token_here

Keep .env.local out of version control (it is git-ignored in Next.js projects by default). Team members each use their own token from their own licensed account.

Step 4 — Register the Pro registry in components.json

Add a registries block to the components.json created by npx shadcn@latest init:

{
  "registries": {
    "@magicui-pro": {
      "url": "https://pro.magicui.design/registry/{name}",
      "headers": {
        "Authorization": "Bearer ${MAGICUI_PRO_REGISTRY_TOKEN}"
      }
    }
  }
}

The ${MAGICUI_PRO_REGISTRY_TOKEN} placeholder is expanded by the shadcn CLI from your environment, so the token never appears in the file you commit.

Step 5 — Install sections

npx shadcn@latest add @magicui-pro/header-1
npx shadcn@latest add @magicui-pro/hero-1
npx shadcn@latest add @magicui-pro/pricing-1

Each command copies the section into your components folder exactly like a free component. Section families available in Pro include Header, Hero, Social Proof, Feature (plus Feature Scroll, Slideshow and Cards), Carousel, Pricing, Call To Action, FAQ and Footer, each in numbered variants — browse them in the component and template overview.

Troubleshooting

Related: Install Magic UI (free routes) · Magic UI pricing (what Pro includes).