Budget AI
Budget AI is the AI gateway built into ANTS Platform. Your applications and agents call a single OpenAI-compatible endpoint with an ANTS-issued key. Budget AI checks the key, applies rate limits and budgets, picks a provider deployment, retries or fails over when a provider has trouble, and records the request as a trace in your project with its cost.
What it does
| Capability | What you get |
|---|---|
| One endpoint | https://<your-gateway-host>/v1 speaks the OpenAI API: chat completions (streaming and non-streaming), embeddings and a model list. Any OpenAI SDK works by changing the base URL and key. |
| Many providers | OpenAI and any OpenAI-compatible API, Azure OpenAI, Anthropic, AWS Bedrock and Google Vertex AI (including a Gemini API key), or Portkey as an upstream gateway. See Providers & Credentials. |
| Model groups and routing | Applications call a name you choose, such as prod-chat. Behind it you place one or more provider models, a routing strategy, retries, cooling-off for failing deployments and fallback groups. See Model Groups & Routing. |
| Keys | Keys that expire after hours or days, are limited to named model groups, can be confined to source networks, can be bound to an agent, and can be rotated, blocked and deleted. Short-lived keys for an agent can be minted by API. See Keys. |
| Guardrails | Optional inline inspection of requests and responses, streamed or not, with the agent's AI Guardrails policy: block, redact, warn or audit, with fail-open or fail-closed per project. Off by default; switched on per project or per key. Its controls are hidden in the Budget AI screens in this release. See Guardrails. |
| Limits and budgets | Requests and tokens per minute per key and per project, and daily, weekly or monthly budgets per key, tag, org unit and project, with hard stops or alerts. Each project budgets in dollars or in tokens; a tokens project can add a dollar cost ceiling, and a hard token budget can lower a request's output limit to the tokens left instead of refusing it. See Budgets & Limits. |
| Tracing and cost | Every request that reaches a known key becomes a trace with cost, usage, latency and routing detail, and can carry user, session, tags and metadata. See Observability & Cost. |
How it fits with the rest of ANTS Platform
Budget AI writes its traces through the same ingestion path as the SDKs and OpenTelemetry. Gateway traffic therefore appears in Tracing, Sessions, Users, dashboards and cost reporting next to the rest of your AI traffic, priced with your project's model prices. Each gateway trace carries the gateway tag and a Gateway panel that shows the key, model group, deployment and attempts. Requests made with a key bound to an agent are recorded under that agent, so their cost shows for the agent in Agent Cost Analysis and the AI Agent Center.
Spend control happens before the provider is called. A request that would exceed a hard budget or a rate limit is refused and never reaches the provider.
Where to find it
| Place | What is there |
|---|---|
| Budget AI → Overview | Traffic, spend, errors, refusals, budgets, busiest keys and model health for the project |
| Budget AI → Keys | Issue, rotate, block, unblock and delete keys; per-key traffic and spend |
| Budget AI → Budgets & Limits | Budgets, spend, threshold crossings and the org unit Hierarchy |
| Budget AI → Models & Routing | Provider credentials, model groups, deployments, routing, fallbacks and cache |
| Budget AI → Tracing | Budget AI traces only, for Budget AI Owners and Viewers who have no AI governance tracing. See Budget AI roles. |
| Budget AI → Alerts | Budget AI alerts, for members who have only Budget AI access |
| Organization Settings → Members | Budget AI roles: who is a Budget AI Owner, Budget AI Viewer, Budget AI Department Admin or Budget AI Department Viewer |
| Project Settings → Budget AI | Turn serving on or off, the gateway address and SDK snippets, the budget unit and cost ceiling, key expiry policy, project rate limits, minimum capped output, provider secret storage and health checks. AI Guardrails inspection settings are hidden in this release. |
| Organization Settings → Budget AI | Every project with Budget AI enabled, with requests, cost, error rate and spend against budget over the last 24 hours |
What you need to turn it on
Budget AI appears only when all of these hold:
- Plan entitlement. The organization's plan includes the
llm-gatewayentitlement. It is part of the Enterprise plan on ANTS Cloud and of an Enterprise self-hosted license. - Feature flag. The
gatewayAifeature flag is enabled for the user. Instance administrators, and deployments that setLANGFUSE_ENABLE_EXPERIMENTAL_FEATURES=true, see it without the flag. Contact your account team to have it enabled. - Product module. The
gatewayproduct module is not hidden for the deployment (for example throughLANGFUSE_UI_HIDDEN_PRODUCT_MODULES). - The gateway service. On ANTS Cloud it is operated for you. On a self-hosted deployment, enable the Helm subchart with
gateway.enabled: trueand setglobal.gateway.publicBaseUrl. See Self-Hosting & Configuration. - Permissions. The user holds the Budget AI permissions for what they want to do. See Access control.
- Per project. An administrator turns on Serve gateway traffic for this project in Project Settings → Budget AI. It is off for a new project.
The checks in steps 1 to 3 are enforced on the server for every Budget AI action, not only in the navigation. The gateway itself serves a project only while serving is on and the organization holds the entitlement.
Budget AI screens carry no beta label. Access is still granted per user through the gatewayAi feature flag.
Access control
Budget AI is a separate product with its own roles. Access comes only from a Budget AI role, or from being an organization Owner or a Super Admin, who always have full access. AI governance roles (such as Governance Owner, Security & Compliance, Cost Analyst or Auditor) and custom roles never carry Budget AI. Each page has its own permission scope:
| Scope | Allows |
|---|---|
gatewayAi.overview:read | View the Overview page |
gatewayAi.keys:read | List keys and outstanding collection links, see key traffic |
gatewayAi.keys:write | Issue keys and collection links, rotate keys, change a key's allowed networks |
gatewayAi.keys:admin | Block, unblock and delete keys, and suspend and resume agents |
gatewayAi.budgets:read | View Budgets & Limits, the Hierarchy and a key's effective limits |
gatewayAi.budgets:admin | Create, edit and delete budgets and org units, move keys between org units, issue a key into an org unit |
gatewayAi.models:read | View provider credentials (masked), model groups and deployments |
gatewayAi.models:admin | Add, change, rotate, move and delete credentials; manage model groups, deployments, routing, fallbacks and cache |
gatewayAi.settings:read / gatewayAi.settings:admin | View or change Project Settings → Budget AI. Admin also sets a key's AI Guardrails mode. |
tenantSecurity.gatewayKeys:admin | Block and unblock keys, and suspend and resume agents, during an incident. Part of tenant security (Owner and Security & Compliance among the AI governance roles), not of a Budget AI role. |
A member who has only Budget AI access sees only Budget AI and settings in the sidebar. AI governance pages show No access with a Go to Budget AI button. A member who has only AI governance access does not see Budget AI, and Budget AI calls are refused for them.
Budget AI roles
Budget AI roles are set in Organization Settings → Members (Project Settings → Members opens the same page). The old Budget AI → Access address opens Members too.
- At organization level, the Budget AI Owner, Budget AI Viewer and Platform Viewer options give Budget AI Owner or Viewer in every project, now and later.
- Per project, the Budget AI part of a project cell gives any of the four roles. Budget AI Department Admin… and Budget AI Department Viewer… open a sheet to tick departments (org units); each one includes every unit beneath it, never a parent or sibling unit.
- Organization and project grants add up. A role given at organization level shows in each project as "(organization)".
| Capability | Budget AI Owner | Budget AI Department Admin | Budget AI Department Viewer | Budget AI Viewer |
|---|---|---|---|---|
| Provider credentials | Create, edit, rotate, delete | Hidden | Hidden | View |
| Model groups and routing | Manage | View | View | View |
| Top-level org units | Create | No | No | No |
| Sub-units | Create anywhere | Under their unit | No | No |
| Budgets | Assign and change | View own unit and below | View own unit and below | View all |
| Usage and spend | All | Own unit and below | Own unit and below | All |
| Keys | All | Issue and manage in own unit and below | View, masked | View, masked |
| Assign roles | Yes | No | No | No |
| Playground | Yes | No | No | No |
How a member's Budget AI access is decided:
- A member with no Budget AI role has no Budget AI access, whatever their AI governance role.
- A member's Budget AI access is the sum of their organization-level and project-level Budget AI roles. Their AI governance role still decides everything outside Budget AI.
- Organization Owners always have full Budget AI access and cannot be given a Budget AI role.
- A Budget AI Department Admin issues keys only into their units, cannot put a budget on those keys, and can rename their own unit but not move or delete it. Budgets set above their unit show as Parent unit.
- Asking for a key or unit outside a department role's units returns "not found".
- Budget AI Owners and Viewers who have no AI governance tracing see Tracing inside the Budget AI section. It lists only Budget AI traces, shows the key, model group, provider and attempts but not prompt and response bodies, and has no sessions, scores, tags, bookmarks, publishing, deleting, adding to datasets or export. Budget AI Owners see bodies only when Budget AI Owners can see prompts and responses is on in Organization Settings → Security. Department roles do not get this view.
- Budget AI automations and alerts are separate from AI governance ones: reading Budget AI rules needs Budget AI settings read, and changing them needs a Budget AI Owner.
- The inline AI Guardrails controls (the project switch and failure settings, a key's AI Guardrails mode, and guardrail refusals on the Overview) are hidden in the Budget AI screens in this release. Settings saved earlier keep applying at the gateway.
Who can manage Budget AI roles:
- An Owner, or a Budget AI Owner (organization level, or for that project). Each change asks for step-up verification.
- Only an Owner or an organization-level Budget AI Owner can remove a Budget AI Owner, and only an organization-level Budget AI Owner can invite people. A project-level Budget AI Owner sets Budget AI roles for existing members of their project.
- Nobody can change their own Budget AI role: "You cannot change your own Budget AI role."
- Removing someone from the organization who holds Budget AI access needs an Owner or a Budget AI Owner.
Every assignment and removal is written to the audit log (resource type gatewayRoleAssignment) and takes effect on the member's next page load. When SCIM or Okta access reconciliation removes a person, their Budget AI roles are removed too. See Members & Roles.
In this section
For capabilities that are planned but not yet available, see the Roadmap.