How to Set Spending Limits and Alerts in Gate.AI
This guide shows you how to configure spending limits and alerts in Gate.AI, covering organization guardrails, member limits, and webhook notifications. After completing the setup, you will be able to control AI spending and monitor abnormal usage across your organization.
After completing this tutorial, you’ll be able to:
- Configure organization-level spending limits
- Set member-level spending limits
- Define quota reset cycles
- Enable organization alert notifications
- Set up a Webhook callback address
- Receive quota threshold and abnormal usage alerts
- Establish a basic AI cost governance framework
Before you begin, make sure you meet the following requirements:
- You have a Gate.AI enterprise account
- You hold organization administrator privileges
- Your organization has been created
- At least one member account or API key has been set up
- You have a server address capable of receiving HTTPS Webhook requests
Step 1: Access the Guardrail Configuration Page
Spending quota control is managed through Gate.AI’s "Guardrails" feature.
Navigation path:
Console→ Settings→ Guardrails
On this page, you can view existing quota rules for your organization, including:
- Organization limit
- Member limit
- API key restrictions
- RPM limits
- Budget cycle
If no rules have been created yet, click "Add Guardrail Configuration" in the top right to start setup.
Step 2: Set Organization Spending Limit
The organization limit controls the maximum spending for the entire organization within a specified period.
Click:
Add Guardrail Configuration→ Organization Limit
Sample configuration:
Name:Organization GuardrailBudget:30 USDReset Cycle:Daily
Once saved, the system will continuously track the total spending of the organization during each reporting cycle.
Expected result:
Organization Limit: 30 USD / Daily
Organization limits serve as the first layer of cost control for enterprises. If your team is new to AI services, it’s recommended to start with a lower quota and adjust as actual usage increases.
If you’re building a comprehensive enterprise cost management system, consider reviewing the fundamentals of AI Cost Management before developing your budgeting strategy.
Step 3: Set Member Spending Limit
While organization limits control overall costs, member limits further restrict resource consumption by individual users.
Click:
Add Guardrail Configuration→ Member Limit
Sample configuration:
Name:Team A GuardrailBudget:20 USDReset Cycle:Daily
After saving, the system will track spending for each member matching the rule.
Expected result:
Member Limit: 20 USD / Daily
For collaborative teams, it’s recommended to configure both organization and member limits to prevent excessive resource consumption by individual users due to mistakes or abnormal requests.
Step 4: Configure Alert Push Address
Spending limits help control expenses, while alert notifications allow you to detect abnormal situations early.
Navigation path:
Console→ Settings→ Push Notifications
In the "Callback Address" section, enter a Webhook address capable of receiving HTTPS requests:
Example:
https://api.your-company.com/alerts
After saving, Gate.AI will send a verification request to this address.
Your server should respond with:
{"status": "ok"}
Expected result:
Callback Address VerifiedWebhook Verification Successful
It’s recommended to use your company’s internal alert service as a unified entry point, then forward notifications to platforms like Feishu, WeCom, Slack, or your email system.
Step 5: Enable Alert Push
After configuring the Webhook, you can enable the alert push feature.
Navigation path:
Console→ Settings→ Push Notifications→ Alert Push
Turn on the "Alert Push" switch.
Expected result:
Alert Push: Enabled
Once enabled, the system will automatically send JSON messages to the configured Webhook address when the organization quota reaches the preset threshold or abnormal usage occurs.
Typical scenarios include:
- Organization quota nearing its limit
- Abnormal increase in member spending
- Unexpected surge in API requests
- High-frequency calls triggering restriction policies
Step 6: Verify Alerts Are Triggered Properly
After configuration, it’s recommended to run a verification test.
Verification steps:
- Create a test spending scenario.
- Trigger quota increase.
- Check if spending statistics are updated.
- Review Webhook service logs.
- Confirm receipt of Gate.AI push events.
Sample event:
{"event": "org_quota_threshold","org_id": 12345,"rule_name": "Quota System Alert"}
Expected result:
Webhook Received Successfully
If you successfully receive the JSON message, the alert mechanism is functioning.
What’s the Difference Between Organization and Member Limits?
Gate.AI offers multi-level quota control mechanisms.
It’s recommended for enterprises to enable both organization and member limits, creating a dual-layer cost control system.
How Should Spending Guardrails Be Configured?
Different team sizes require different quota strategies.
Actual quotas should be adjusted based on model type, call frequency, and business scenarios.
If your organization manages multiple model providers, consider using the AI Gateway architecture to centrally manage cost, permissions, and model access policies.
What If Alert Notifications Aren’t Received?
If the system meets alert conditions but notifications aren’t received, check the following:
Check Webhook Address
Confirm:
- HTTPS is used
- Domain is accessible
- No firewall blocking
Check Verification Request
Ensure your server responds with:
{"status": "ok"}
Check Alert Push Status
Make sure:
Alert Push: Enabled
and not:
Alert Push: Disabled
Check Server Logs
Verify the server has received POST requests from Gate.AI.
What Else Can You Do Next?
After configuring spending guardrails, you can further enhance your organization’s AI governance capabilities.
As your team grows, consider implementing RBAC permission management to isolate access between members, teams, and applications.
For large organizations, establish organization-level AI governance policies to centrally manage budgets, audit logs, model access permissions, and security strategies.
Additionally, you can explore:
- API key lifecycle management
- Unified routing for multiple models
- Team-level cost attribution analysis
- Enterprise-grade audit log systems
FAQ
Q: Should organization and member limits be set at the same time?
A: Yes, it’s recommended. Organization limits control overall costs, while member limits restrict individual resource usage. Combining both provides more comprehensive cost protection.
Q: Why does spending continue after reaching the quota?
A: Please check if the guardrail rules have been successfully saved, and whether the relevant members or API keys are correctly included in the restriction scope.
Q: Why aren’t alert notifications received?
A: Check if the Webhook address is accessible, alert push is enabled, and your server correctly returns the verification response.
Q: Does the Webhook have to use HTTPS?
A: Yes. Currently, callback addresses only support HTTPS for secure notification transmission.
Q: Can alert notifications be sent directly to Feishu or WeCom?
A: Gate.AI currently pushes JSON data via Webhook. You can forward messages from your server to Feishu, WeCom, Slack, or your email system.