Creates or updates the budget configuration for an agent
Creates or replaces the cap identified by origin, environment and period. period defaults to MONTHLY; multiple windows can enforce together. New runs are rejected if they would exceed an enforced cap, and alerts fire at the configured thresholds. Mandatory agent-wide daily, weekly and monthly caps for PRODUCTION and TEST cannot be deleted; set enforceLimit=false for notification only. Optional caps can be removed with DELETE budget.
Authorization
Bearer JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.
In: header
Path Parameters
The agent ID.
The tenant identifier
Query Parameters
Which spend bucket this budget caps — default PRODUCTION; pass TEST for the developer test bucket.
"PRODUCTION""UNSPECIFIED" | "PRODUCTION" | "TEST"Which environment this budget caps. Omitted (default) sets the agent-wide cap spanning all environments; a slug caps only that environment's spend (the environment is auto-created if needed). An execution must fit under every configured cap.
The budget configuration (amount, period, thresholds, enforce flag).
Budget amount in USD.
doubleThe billing window to cap spend over — daily, weekly, or monthly. If null, defaults to BudgetPeriod.Monthly on create and preserves the existing period on update.
"UNSPECIFIED" | "DAILY" | "WEEKLY" | "MONTHLY"Threshold rules defining at which percentages notifications are sent. If null, existing thresholds are preserved on update.
When true, execution is blocked when spend reaches 100% of the budget.
When null on create, defaults to true (budgets enforce by
default); set false for notify-only. On update, null preserves
the existing value.
Response Body
curl -X PUT "https://api.fruxon.com/v1/tenants/string/agents/string/budget" \ -H "Content-Type: application/json" \ -d '{}'{
"agentId": "string",
"origin": "PRODUCTION",
"environment": "string",
"amount": 0,
"period": "DAILY",
"thresholdRules": [
{
"percent": 0
}
],
"enforceLimit": false,
"currentPeriodCost": 0,
"usagePercent": 0,
"periodStart": 0,
"periodEnd": 0,
"createdAt": 0,
"modifiedAt": 0
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}Removes a single optional budget cap
Deletes the cap identified by (origin, environment, period). The mandatory agent-wide daily, weekly, and monthly caps (on Production and Test) cannot be removed — a request targeting one returns 400. Use this to drop a per-environment cap. Historical cost data is unaffected.
Forecast an agent's spend to the end of the month.
The UTC calendar month so far, day by day, and where it is likely to land in dollars and in credits, with a range. Read from the last four weeks with their day-of-week shape, across every revision. Without an environment the dollars are read against the agent-wide monthly budget, and the response says when a busy stretch could reach it.