Get a single budget by ID
PreviewOperate durable execution, schedules, sandbox infrastructure, budgets, payments and audit logs.
/v1/budgets/{budget_id}See authentication for credentials and permissions.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Prefixed public identifier
Responses
200Success
Success
Wrapper that adds API and UI links to a serialized resource.
Uses self_url (not url) for the API link to avoid collision with
resources that already have a url field (e.g. McpServer). The
allowed_actions array carries state-aware hypermedia links — empty
(and omitted from the wire shape) until the underlying resource opts
into the convention by overriding ResourceUrlable::allowed_actions.
object
Current remaining balance (limit minus consumed).
What the limit is measured in: “usd” (cost from the org’s price list) or “tokens”.
Hard limit — budget ceiling.
Arbitrary metadata.
Sliding window of a configurable number of seconds.
object
Rolling window described as a humanized string (“5h”, “24h”, “30d”).
object
Calendar-aligned (hour, day, week, month, year).
object
When the current period started (used to detect period rollover for
Duration / Rolling periods, and to display “resets at” in the UI).
None for budgets without a period.
Name, steps (notify, ask to continue, stop) and which usage counts. Empty steps mean the legacy shape: notify at 80%, ask at the soft limit, stop at the limit.
object
Display name of the policy.
Which usage the policy counts.
Steps by percent of the limit. Empty: notify at 80%, ask at the soft limit, stop at the limit.
One step of a usage policy, at a percent of the limit.
object
What happens when usage reaches the step.
Percent of the limit at which the step applies (1 to 100).
Soft limit — triggers pause/warn when balance drops below this.
Budget status.
Public ID of the subject entity.
Subject type: what entity this budget constrains.
State-aware hypermedia actions the caller can take on this resource
next (e.g. cancel, events, update). Omitted from the wire
shape when empty so resources that haven’t opted into the
convention don’t grow their payloads.
Agent-actionable link describing a follow-up the caller can take. Used in two contexts:
- Error recovery —
ErrorResponse.allowed_actionscarriesrels likeretry,retry-later,unarchive,get-existingso the agent knows the right next call after a 4xx/429. - Entity hypermedia —
WithUrls<T>.allowed_actionscarries state-awarerels likecancel,events,self,updateon the entity itself so the agent can follow links instead of reconstructing routes from prose.
The shape is intentionally identical across both contexts; the closed
rel vocabulary distinguishes them.
object
Short, agent-readable hint (e.g. “Shorten ‘name’ to <= 200 chars.”, “Cancel the active turn for this session.”).
Absolute (preferred) or relative URL the caller may invoke
directly. Always present on entity hypermedia actions
(WithUrls<T>.allowed_actions); optional on error-recovery
actions (ErrorResponse.allowed_actions) where the matching
operation_id is enough and the URI is implicit from the failed
call.
HTTP method to use against href. Required for entity hypermedia
actions; usually omitted on error-recovery actions where the same
operation is retried with its original method.
OpenAPI operationId the caller should invoke. Lets an MCP client
resolve the call without parsing href.
Link relation describing the action. Examples: self, cancel, pause,
resume, events, retry, retry-later, unarchive,
get-existing, delete, update.
OpenAPI $ref to the request-body schema, when the action takes one
(e.g. #/components/schemas/UpdateSessionRequest). Lets a tool-calling
agent fetch the input shape without scanning the whole spec.
Full API endpoint URL for this resource.
Alias for view_url, used by command and MCP outputs.
Full UI URL for viewing this resource.
Example
{ "id": "bdgt_01933b5a00007000800000000000001", "period": { "type": "duration" }, "policy": { "source": "all", "steps": [ { "action": "notify" } ] }, "status": "active", "subject_type": "session", "allowed_actions": [ { "method": "POST" } ]}404Budget not found
Budget not found