# get_site_ai_settings

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

Reads whether AI is on for a site, where it stands, this month's usage, the workspace caps that limit it and the address the site calls, without the key.

- Title: Read the AI settings and usage of a site
- Scope: `config:read`
- Access: Read only

AI is the service a site's own server code uses to call AI models through Modulify, with no account or key of its own, paid from the workspace credits. `enabled` says whether it is on, which it is from the start for every site, and `status` where it stands:

- `ready` while requests are answered.
- `off` while AI is turned off for the site, so every request answers `403`.
- `paused` while the site stopped spending. `pausedReason` says why: `no-credits` when the workspace has no credits left, or `cap-reached` when the workspace reached its monthly AI cap or its monthly spending cap. `pausedAt` says since when, and `pausedMessage` how it starts again.

While AI is paused, every request answers `402`. See [When AI pauses](https://modulify.ai/docs/built-in/ai#when-ai-pauses).

`month` covers this calendar month in UTC, with `period` as `YYYY-MM`: `requests`, `errors`, `inputTokens` and `outputTokens`, `creditsUsed`, what those requests cost, and `creditsBought`, the credits the site took from the workspace for AI this month. `balanceCredits` is the usage the site bought and has not used yet. These are the **This month** numbers of the **Overview** tab, where `balanceCredits` reads **Prepaid left**. `isPaid` says whether the workspace is on a paid plan.

`workspaceCaps` carries the monthly caps of the whole workspace that stop AI: `ai`, the AI cap of every site together, and `total`, the cap on everything the workspace spends, each null when it is not set, with `aiSpent` and `totalSpent`, what this month's spending counts against them. Only the workspace owner changes them, in **Settings** > **Spending** or with `update_workspace_spending`.

`creditRate` and `markup` turn a model's list price into credits: a request costs its list price times `markup`, divided by `creditRate`. The tool tells the client to always give you AI prices in credits, the way the **Models** list on the **Settings** tab shows them.

`url` is the base URL the site calls, the value of `MODULIFY_AI_URL`, and `modelsUrl` lists every model with its list price, with no key needed. `defaults.chat` and `defaults.embedding` name the models a request uses when it names none, `modulify/fast` and `modulify/embed`. `keyChangedAt` is when the key last changed. The key itself is never in the answer, and `get_site_ai_key` reads it. `canManage` says whether you hold the **Delete projects** permission, which `get_site_ai_key` and `rotate_site_ai_key` need.

`update_site_ai_settings` turns AI on or off. See [AI](https://modulify.ai/docs/built-in/ai).

## Inputs

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