Skip to navigation

Create a budget

View as Markdown

Requires the manage scope. A budget sets a per-call maximum, a limit per period, or both.

Authentication

AuthorizationBearer
An AgentRouter API key or an OAuth access token issued to an MCP host or the CLI.

Request

This endpoint expects an object.
namestringOptional
scopeenumOptionalDefaults to account
Allowed values:
scope_refstring or nullOptional
Key id or session id for key and session budgets.
periodenumOptionalDefaults to month
Allowed values:
limit_usdstring or nullOptional
Spend limit per period.
per_call_max_usdstring or nullOptional

Caps max_cost_usd for every call in scope.

statusenumOptional
Allowed values:

Response

The budget
budget_idstring
namestring or null
scopeenum
Allowed values:
scope_refstring or null
periodenum
Allowed values:
limit_usdstring or null
per_call_max_usdstring or null
statusenum
Allowed values:
created_atstring

Errors

400
Bad Request Error
403
Forbidden Error