Everything you need to set up AI Cost Governor and its Pro add-on. Requirements: WordPress 7.0 or later and PHP 7.4 or later.
Getting started
- In your WordPress dashboard go to Plugins → Add New, search for «AI Cost Governor», install and activate it.
- Make sure an AI provider is connected under Settings → Connectors. AI Cost Governor does not need its own API key.
- Open AI Governor → Budgets & policies and enter a monthly budget in US dollars.
- Open AI Governor → Model pricing and check that the models you use have a price. Models without one are estimated with a conservative fallback rate, and the dashboard tells you which.
The dashboard
AI Governor → Dashboard shows this month’s spend against your budget, the projected spend at month end, the number of requests and blocked requests, a daily chart and the spend by plugin, model and user. The same figure appears in the admin bar for administrators (you can hide it under Budgets & policies).
Budgets and the hard limit
Budgets reset on the first day of each month, in your site’s timezone. With the hard limit on, once spend reaches the budget every new AI request is refused before it reaches the provider, and plugins that check whether AI is available hide their AI features. With the hard limit off, budgets only send alerts.
The cost of a request is only known after it finishes, so the request that crosses the limit completes and the next one is blocked. Plan a small margin.
Kill switch
AI Governor → Dashboard → «Stop all AI now» blocks every AI request on the site until you turn it back on. A notice reminds administrators while it is on.
Who may use AI
Under Budgets & policies, tick «Only allow the roles below» and choose the roles. You can also stop logged-out visitors from triggering AI, which protects public chatbots and forms. Scheduled tasks and WP-CLI are always allowed.
Alerts
An email is sent when a budget reaches 80% and 100%, once per month, to the site admin email or to the addresses you enter. Pro adds custom thresholds and Slack or Teams webhooks.
Installing Pro
- Keep the free plugin installed and active: Pro is an add-on and needs it.
- Plugins → Add New → Upload Plugin → choose
ai-cost-governor-pro.zipfrom your purchase email → Activate. - AI Governor → Pro license → paste your license key → Activate.
- The Pro sections appear under Budgets & policies, and CSV export under Usage log.
The license is checked once a day. If our licensing provider cannot be reached, Pro keeps working for 7 days. To move a license, press «Deactivate on this site» first. Manage or cancel your subscription from your customer portal.
WP-CLI
wp ai-governor status wp ai-governor usage --by=source wp ai-governor budget 50 wp ai-governor kill-switch on wp ai-governor purge
For developers
Abilities (also exposed through the REST API): ai-cost-governor/get-usage-summary for managers and ai-cost-governor/get-my-budget for any logged-in user. Filters and actions include aicg_policy_decision, aicg_budgets, aicg_request_context, aicg_price_table, aicg_request_cost, aicg_usage_recorded and aicg_request_blocked. The full list is in the README inside the plugin folder.
Privacy
For each request the plugin stores, in your own database, the time, user ID and role, plugin, model, token counts and estimated cost. It never stores prompt or response content. Records are deleted after the retention period (30 days, up to 365 with Pro), and the plugin supports WordPress’s personal data export and erasure tools.