Skip to content

Keys and budgets

Govern › Keys and budgets is where a tenant admin issues the API keys that applications present to the gateway, and sets the token budgets the gateway enforces on every request. Builders and auditors read the budgets here to see what has been spent.

For how keys, budgets and metering fit together, see Keys, budgets and metering.

Role API keys tab Budgets tab Model budgets tab
Admin Create, revoke, set a key’s budget Create, edit and delete project and key budgets Read
Builder Not shown Read. Key budgets are listed as API key, without the key’s name. Read
Auditor Read Read Read
End user, Reviewer Cannot open the page
Platform admin Everything, for any tenant Everything, including tenant budgets Read here; edited on the tenant’s page

The page description changes with what you may do. A reader who cannot change anything is told that an admin of the tenant changes them.

Every key belongs to one project. The API keys tab lists all of a project’s keys:

Kind Who creates it What it is for
Application key A tenant admin, on this page An application calling the gateway.
Developer key A developer, from the Code Assistant One developer’s editor. See Developer keys.
Keys Olympusx AI issues Olympusx AI An assistant’s public link (named assistant:<assistant>, limited to that assistant’s model) and a running agent (named agent-run:<agent>, valid for one hour). They are issued in the tenant’s first project by name.

A key’s secret starts with olp_ and is shown once, when the key is created. Olympusx AI stores only a hash of it, so a lost secret cannot be recovered: revoke the key and create a new one.

A key created on this page may call every model granted to the tenant. Calls are refused with HTTP 403 and model_not_granted for a model the tenant is not granted.

  1. The header, then the Tenant picker and the Project picker (Choose a project). Keys belong to a project, so the API keys tab shows the project you choose.
  2. Three tabs: API keys, Budgets and Model budgets.

Above the table, Budget for the chosen project shows that project’s budgets, with Set project budget for an admin.

Column What it shows
Name The name given at creation.
Key ID The key’s public identifier. It is safe to share; the secret is not.
Status Active, Disabled (revoked), Expired, Blocked or Revoked (a developer key its owner revoked; listed for 30 days).
Budget Each of the key’s budgets, as Daily: 1,200 of 50,000 tokens, or No budget.
Created The creation date.
Last used When the key last authorized a request, accurate to about a minute.
Expires The date, Never, an amber Expires tag with the date within 14 days of expiry, or a red Expired tag.
Actions Set budget, and Revoke in the menu, on an active key.

Search the table by name or key ID with Search keys. A tenant with no projects shows This tenant has no projects yet: a platform administrator creates projects (see Projects).

Banners at the top count the budgets in trouble: Budgets exceeded for those at their limit, Budgets near limit for those above 80%.

Column What it shows
Applies to The tenant, project or key, with the key ID and its project for a key budget. A tenant budget links to Usage; a project or key budget links to its project’s keys.
Scope Tenant, Project or API key.
Period Daily or Monthly.
Spent (tokens) Tokens spent in the current period.
Limit (tokens) The limit.
Used Spent as a percentage of the limit.
Status Within budget, Approaching the limit (50% or more), Near the limit (80% or more) or Blocked (100%). An alert-only budget past its limit shows Over limit.
Action Alert only or Block when exceeded.
Actions Edit and Delete, for an admin.

Search with Search budgets by name, key ID, project, scope, period or action.

Budgets on the hosted models the tenant subscribes to, counted in weighted tokens: a model’s tokens multiplied by its Token weight. The columns are Model, Token weight, Daily budget (weighted tokens) and Monthly budget (weighted tokens), each with what has been used today or this month. A spent model budget stops that model for the tenant until the next day or month, unless it is marked Alert only: requests go on past it. Only a platform administrator sets these, from the tenant’s page; tenant members read them here. See Tenants.

  1. Choose the Project, then select Create API key on the API keys tab.
  2. Details: enter a Name that says which application uses the key, for example backend-prod. Choose when it Expires: 90 days (proposed), 30 days, 180 days, 1 year or Never. Select Next.
  3. Budget (optional): to cap the key now, switch Set a budget for this key to Yes, then choose the Period, the Limit (tokens) and the Action when exceeded. Otherwise leave it at No. Select Next.
  4. Review: check the Project, Name, Expires and Budget, then select Create API key.
  5. Secret: copy the secret with Copy the secret and store it somewhere safe. It is shown only here and cannot be retrieved once this closes.
  6. Select Done.

If the key was created but its budget was not, the Secret step says The key was created, but its budget was not set. The key works without a limit until you select Try the budget again, or set one later from the key’s row.

Every key creation is recorded on the audit trail, with its name, expiry and creator.

  1. On the key’s row, open the menu and select Revoke.
  2. Confirm with Revoke.

The key stops working on the next request. Clients using it are refused at the gateway with HTTP 401. A revoke cannot be undone. The tenant’s admins receive a notification that the key was revoked, and the revoke is recorded on the audit trail.

  1. Select Create budget on the Budgets tab, Set project budget above the keys table, or Set budget on a key’s row.
  2. Scope and target: choose the Scope (Project or API key; a platform administrator can also choose Tenant), then the Project and, for a key budget, the API key. Select Next.
  3. Limit and period: choose the Period, Daily or Monthly, and enter the Limit (tokens), at least 1. Select Next.
  4. When exceeded: choose Alert only (calls go on, and the budget shows as over its limit) or Block when exceeded (the gateway refuses calls under this budget until the period starts again). Select Next.
  5. Review: check Applies to, Period, Limit (tokens) and Action when exceeded, then select Create budget.

What a budget applies to and its period cannot change once it exists. One budget exists per target and period, so a project can have one daily and one monthly budget.

  1. On the Budgets tab, open the budget’s menu.
  2. Select Edit to change the Limit (tokens) or the Action when exceeded, then Save. Or select Delete and confirm: the gateway stops enforcing it immediately.

Raising a limit above what was spent, switching a blocked budget to Alert only, or deleting it lifts the block on the next request.

  • Every request is checked against every budget that covers it: the key’s, its project’s and its tenant’s, daily and monthly, and the model’s budget for a hosted model. A budget spent at any level blocks the request.
  • Spend is counted in tokens, input plus output, from the gateway’s metering. Calls the console makes for you (Playground, assistants, agents, knowledge ingestion) count against the project and tenant they are metered to. A call made without a key has no key budget to spend.
  • The period starts again at 00:00 UTC each day for a daily budget, and on the first of the month (UTC) for a monthly one.
  • The block follows the spend. Olympusx AI re-checks spend against limits every few seconds. Tokens are known only when an answer completes, so the request that crosses the limit is served in full and the block applies from the next request.
  • A blocked caller receives HTTP 429 with the code budget_exceeded (or model_budget_exceeded for a model budget) and the type insufficient_quota. Retrying does not help until the period starts again or an admin raises the limit. See Errors.
  • Allocations must fit. The budgets below a tenant or a project, for the same period, cannot add up to more than its own budget: Olympusx AI refuses the one that would overflow and says how much would fit. A budget cannot be lowered below what is already allocated beneath it.
  • Only a platform administrator sets a tenant budget. A tenant admin divides the tenant’s envelope among projects and keys.

The tenant’s admins are notified when a budget crosses 50%, 80% and 100% of its limit, once per threshold per period, and again when a Block when exceeded budget starts refusing calls.

Limit Value
Key lifetime 1 to 3,650 days, or never
Lifetime proposed by the console 90 days
Secret shown Once, at creation
Budget periods Daily, monthly (UTC)
Smallest budget limit 1 token
Budgets per target One per period
Alert thresholds 50%, 80%, 100%
Lifetime of an agent run key 1 hour