Skip to main content
POST
start a budgeted run

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

The run configuration

budgetAmountMinor
integer
required

Budget in currency minor units, usually cents. For USD, 5000 means $50.00.

Required range: x > 0
idempotencyKey
string
required
Minimum string length: 1
customerId
string
Minimum string length: 1
workloadType
enum<string> | null
Available options:
agent,
workflow,
job,
tool,
custom,
null
workloadId
string | null
Minimum string length: 1
traceId
string | null
Minimum string length: 1
parentRunId
string | null
Minimum string length: 1
metadata
object
expiresAt
integer | null

Expiration timestamp in epoch milliseconds. Defaults to one hour after the run starts and cannot exceed 24 hours after start.

Required range: x > 0

Response

The budget run summary

runId
string
required
status
enum<string>
required
Available options:
running,
completed,
expired,
canceled,
budget_exceeded,
failed
customerId
string
required
currency
string
required
workloadType
enum<string> | null
required
Available options:
agent,
workflow,
job,
tool,
custom,
null
workloadId
string | null
required
traceId
string | null
required
parentRunId
string | null
required
budgetAmountMinor
integer
required

Budget in currency minor units (cents).

consumedAmountMinor
integer
required

Consumed in currency minor units (cents).

remainingAmountMinor
integer
required

Remaining in currency minor units (cents).

endedAt
integer | null

Authoritative run terminal timestamp in epoch milliseconds; null while running.

Required range: x >= 0