Skip to content

Keys, budgets and metering

Every call to a model is made with a key, checked against budgets, and recorded in tokens. Keys say who is calling, budgets say how much they may spend, and metering says what they spent. This page explains how the three fit together.

An API key is what an application presents to the gateway. It belongs to one project, and through it to one tenant.

  • The secret is shown once. It starts with olp_. Olympusx AI stores only a hash of it, so a lost secret cannot be recovered: revoke the key and create another.
  • A key can expire. The console proposes 90 days and offers 30, 180, 365 days or never. Over the API, any number of days from 1 to 3,650, or none.
  • A key can be limited to some models. A key with a model allow-list can call only those models, even if the tenant is granted more. The console’s key wizard does not set an allow-list; the management API does. See API overview.
  • Revoking is immediate. A revoked key is refused at the next request.

There are three kinds of key:

Kind Who creates it What it is for
Application key A tenant admin An application calling the gateway.
Developer key A developer, for themselves One person’s editor. Its lifetime and the number each developer may hold are set on the Code Assistant page. See Developer keys.
Keys Olympusx AI issues Olympusx AI An assistant’s share link, limited to that assistant’s model, and each agent run, valid for one hour.

A budget caps the tokens spent in a period. Budgets nest, and a request must pass every one that applies to it:

Level Who sets it Notes
Tenant Platform admin The tenant’s envelope. A tenant admin cannot raise it.
Project Tenant admin Must fit inside the tenant’s.
Key Tenant admin Must fit inside its project’s.
Model Platform admin A tenant’s budget for one granted model, in weighted tokens.

Each budget is daily or monthly, and either blocks requests once spent or only alerts. The console flags a budget as it passes 50% and 80% of its limit. A blocked budget answers 429 with budget_exceeded (or model_budget_exceeded) until the period rolls over.

Budgets are evaluated every few seconds, not inside each request, so a burst of concurrent requests can pass a budget by the tokens of the requests already in flight when it is reached.

A model budget counts weighted tokens: a model’s tokens multiplied by its token weight, which the platform sets from the model’s GPU footprint. A large model’s token costs more of a model budget than a small model’s. An external model uses none of the platform’s GPUs, so its weight is 1.

Budgets are the control a tenant manages. The public assistant chat has its own default of 60 requests a minute per tenant. See Limits.

Every model call is recorded in the usage record with its tenant, project, key, model, input and output tokens, and time. That includes calls through the gateway, streamed or not, and calls the console’s own features make: the Playground, assistant chat, knowledge queries, embeddings for collections, agent runs.

  • Usage is in tokens. Spend in money is computed from the price book the platform publishes, in the platform’s currency. See Billing.
  • Tenants read their own usage on Govern › Usage, by project, key and model. See Usage.
  • Developers read their own on the Code Assistant page; admins and auditors read spend per developer. See Usage and spend.