Budgets

Set monthly limits and prices per job kind, read spend and the forecast, and resume held jobs.

Every model call asks its job kind's budget first. When the month's spend would go over the limit, the job is held, never failed, and resumes when there is room again: at the start of the next month, or once you raise the limit. Synaxis checks held jobs every hour.

Budget job kinds

Job kind Covers
Each routed model job kind (summary.file, summary.module, summary.repository, catalog.propose) The language model calls of that kind
embedding Indexing's embeddings
query Query embeddings

A job kind without a budget has no limit.

To set a limit

  1. Open Budgets and usage.
  2. In the job kind's row, under Change, enter the Monthly limit and the currency, then select Save. The console answers, for example, The summary.file budget is saved.

The row also shows Spent this month, Forecast to month end and Held jobs. The forecast assumes the rest of the month spends at the rate so far.

In the configuration file, the budgets section sets the currency and each job kind's monthly limit:

spec:
  budgets: { currency: USD, monthly: { summary.file: 300, summary.repository: 500, embedding: 200, query: 50 } }

To set prices

Spend is computed from each model's price per million tokens. Set the prices with the budget, through the REST API, for each job kind:

PUT /api/v1/budgets/summary.file
Content-Type: application/json

{ "monthlyLimit": 300, "currency": "USD",
  "prices": { "anthropic/claude-haiku-4-5": { "input": 1.00, "output": 5.00 } } }

Model job kinds name their models as provider/model, as in the routes; the embedding and query budgets name the embedding model. Models shows the prices beside each route. A model without a price costs nothing in the accounting, so its calls are never held.

Tip: Set the embedding budget's price for the embedding model you plan to use before you start a new index generation: the generation's cost estimate uses it.

When the query budget is spent

Under When the query budget is spent, choose:

  • Keep answering queries (a query costs a fraction of a cent), the default, or
  • Refuse queries until next month or a higher limit: queries then answer budget-exhausted (HTTP 429).

Select Save.

Usage

Usage this month lists each Job kind and Model with its Calls, Input tokens, Output tokens and Cost. The same figures are exported as metrics for the Models and cost dashboard.

Held jobs and banners

Overview shows "The kind budget is n% spent." at 80% and "The kind budget is spent: those jobs wait for next month or a higher limit." at 100%, and how many jobs are held. Jobs lists held jobs with their reason, such as budget:summary.file. The Prometheus alerts SynaxisBudget80 and SynaxisBudget100 fire on the same thresholds.

See also