---
title: "Create an API key"
description: "Create one API key, keep it in GELATIN_UI_PRO_TOKEN, and the shadcn CLI and your agent can add Pro items."
url: https://gelatinui.com/docs/api-key
markdown_url: https://gelatinui.com/docs/api-key.md
docs_index: https://gelatinui.com/docs/llms.txt
prompt: "Read https://gelatinui.com/docs/api-key.md. Tell me how to create a Gelatin UI API key in the dashboard. Then make sure .env.local is in .gitignore and has a GELATIN_UI_PRO_TOKEN line for me to fill. Never ask for, print, or commit the key. Done when git ignores .env.local."
---

> Docs index: https://gelatinui.com/docs/llms.txt

# Create an API key

> Create one API key, keep it in GELATIN_UI_PRO_TOKEN, and the shadcn CLI and your agent can add Pro items.

An API key lets the shadcn CLI and your agent add Pro items. You create the key in the dashboard. Then you keep it in one environment variable, never in your code.

You need a Pro plan to add Pro items with a key.

## Create a key

1. **Open API keys.** Sign in, and open [API keys](https://gelatinui.com/dashboard/api-keys) in the dashboard.
2. **Name the key for its place.** For example "Laptop" or "CI", so you know where you use it.
3. **Copy the key now.** The dashboard shows the key one time only.

## Set the key in an environment variable

The shadcn CLI and the MCP setups read the key from one variable, `GELATIN_UI_PRO_TOKEN`. Put it where your tools run:

```bash
GELATIN_UI_PRO_TOKEN=your-key
```

| Where        | What to do                                                                        |
| ------------ | --------------------------------------------------------------------------------- |
| Your machine | Put the line in `.env.local` at the project root. Make sure git ignores the file. |
| CI           | Add the key as a secret with the same name, `GELATIN_UI_PRO_TOKEN`.               |

## Keep the key safe

A key starts with `gelp_`, then 49 letters and digits. If a key leaks, revoke it in the dashboard and make a new one.

Never:

- Paste a key in a chat, an issue, or a support message.
- Commit a key, or write it in code that you share.

If a key leaks:

1. Revoke it on the API keys page of the dashboard.
2. Create a new key.
3. Put the new key in `.env.local` and in CI.

## Next steps

- [Install Pro items](https://gelatinui.com/docs/pro-items.md): add the Pro registry and your first Pro item.
- [Pricing](https://gelatinui.com/pricing): the Personal and Team plans that come with a key.
- [Connect the MCP server](https://gelatinui.com/docs/mcp-server.md): send the key from your agent as a Bearer header.
