# get_site_ai_key

Source: https://modulify.ai/docs/mcp/ai/get-site-ai-key

Reveals the AI key of a site in plain text, with the base URL it goes with, creating the key when the site has none yet.

- Title: Reveal the AI key of a site
- Scope: `credentials:reveal`
- Access: Makes changes

It is the server only credential the site's own server code sends as a bearer token with every AI request, injected as `MODULIFY_AI_KEY` next to `MODULIFY_AI_URL`, and anyone holding it can spend your workspace credits on AI as the site. The answer carries the `key`, the `url` it goes with and `keyChangedAt`.

The key is returned in full, so it lands in the conversation. The tool tells the client never to print it, never to put it in a page, a client component or a committed file, and never to send it anywhere you did not ask for. It also tells the client to reach for it only when you explicitly ask to see or copy your key, for example to call your site's AI from a server of your own outside Modulify.

It is refused when AI is not set up on the platform, and without the **Delete projects** permission in the workspace, which showing the key in the **AI** tab needs too. `credentials:reveal` is unticked by default when you create a token. See [Call it from your site](https://modulify.ai/docs/built-in/ai#call-it-from-your-site).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | The site id. |