Docs/Budget Ai

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

CapabilityWhat you get
One endpointhttps://<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 providersOpenAI 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 routingApplications 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.
KeysKeys 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.
GuardrailsOptional 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. See Guardrails.
Limits and budgetsRequests 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 costEvery 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

PlaceWhat is there
Budget AI → OverviewTraffic, spend, errors, refusals, budgets, busiest keys and model health for the project
Budget AI → KeysIssue, rotate, block, unblock and delete keys; per-key traffic and spend
Budget AI → Budgets & LimitsBudgets, spend, threshold crossings and the org unit Hierarchy
Budget AI → Models & RoutingProvider credentials, model groups, deployments, routing, fallbacks and cache
Budget AI → AccessBudget AI roles: who is a Platform Admin, Platform Viewer, Department Owner or Department Viewer
Project Settings → Budget AITurn 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, AI Guardrails inspection, provider secret storage and health checks
Organization Settings → Budget AIEvery 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:

  1. Plan entitlement. The organization's plan includes the llm-gateway entitlement. It is part of the Enterprise plan on ANTS Cloud and of an Enterprise self-hosted license.
  2. Feature flag. The gatewayAi feature flag is enabled for the user. Instance administrators, and deployments that set LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES=true, see it without the flag. Contact your account team to have it enabled.
  3. Product module. The gateway product module is not hidden for the deployment (for example through LANGFUSE_UI_HIDDEN_PRODUCT_MODULES).
  4. The gateway service. On ANTS Cloud it is operated for you. On a self-hosted deployment, enable the Helm subchart with gateway.enabled: true and set global.gateway.publicBaseUrl. See Self-Hosting & Configuration.
  5. Permissions. The user holds the Budget AI permissions for what they want to do. See Access control.
  6. 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 permissions are part of the Budget AI module in roles and custom roles. Each page has its own permission scope:

ScopeAllows
gatewayAi.overview:readView the Overview page
gatewayAi.keys:readList keys and outstanding collection links, see key traffic
gatewayAi.keys:writeIssue keys and collection links, rotate keys, change a key's allowed networks
gatewayAi.keys:adminBlock, unblock and delete keys, and suspend and resume agents
gatewayAi.budgets:readView Budgets & Limits, the Hierarchy and a key's effective limits
gatewayAi.budgets:adminCreate, edit and delete budgets and org units, move keys between org units, issue a key into an org unit
gatewayAi.models:readView provider credentials (masked), model groups and deployments
gatewayAi.models:adminAdd, change, rotate, move and delete credentials; manage model groups, deployments, routing, fallbacks and cache
gatewayAi.settings:read / gatewayAi.settings:adminView or change Project Settings → Budget AI. Admin also sets a key's AI Guardrails mode.
tenantSecurity.gatewayKeys:adminBlock and unblock keys, and suspend and resume agents, during an incident, without any other Budget AI access

Built-in roles:

RoleBudget AI access
OwnerAdmin on every page
Department AdminAdmin on every page
Security & ComplianceRead on every page, plus block and unblock keys and suspend and resume agents through tenant security
Cost AnalystRead on every page
AuditorRead on every page
Manager Viewer, End UserNo access, unless given a Budget AI role
NoneNo access

To give someone a narrower set, for example keys only, create a custom role and set the Budget AI pages individually, or give them a Budget AI role.

Budget AI roles

Budget AI → Access assigns Budget AI roles per project. A department role applies to one org unit and every unit beneath it, never to a parent or sibling unit.

CapabilityPlatform AdminDepartment OwnerDepartment ViewerPlatform Viewer
Provider credentialsCreate, edit, rotate, deleteHiddenHiddenView
Model groups and routingManageViewViewView
Top-level org unitsCreateNoNoNo
Sub-unitsCreate anywhereUnder their unitNoNo
BudgetsAssign and changeView own unit and belowView own unit and belowView all
Usage and spendAllOwn unit and belowOwn unit and belowAll
KeysAllIssue and manage in own unit and belowView, maskedView, masked
Assign rolesYesNoNoNo
PlaygroundYesNoNoNo

How a member's Budget AI access is decided:

  • A member with no Budget AI role keeps the access their project role gives them, as in the table above.
  • A member with a Budget AI role gets their Budget AI access from that role only. Their project role still decides everything outside Budget AI.
  • Project Owners are always Platform Admins and cannot be given a narrower role.
  • A Department Owner 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".

To assign a role, select Assign role, choose the Member, the Role and, for a department role, the Org unit, and complete step-up verification. Removing a role is done from the same table. Assigning roles needs a Platform Admin, or gatewayAi.settings:admin for a member with no Budget AI role. Nobody can change their own Budget AI role, and only an Owner can remove a Platform Admin. Every assignment and removal is written to the audit log (resource type gatewayRoleAssignment), and takes effect on the member's next page load.

In this section

For capabilities that are planned but not yet available, see the Roadmap.

© 2026 ANTS Platform, Inc.Docs v1.0 · Last updated June 2026