curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.computer.stateset.app/api/v1/jobs/{job_id}/extend-budget' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"max_cost_usd": 1.5
}'
{
"job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"previous_max_cost_usd": 1.5,
"new_max_cost_usd": 1.5,
"current_cost_usd": 1.5
}
Extend Job Budget V1
Raise max_cost_usd on a live job at runtime. Tenants reach for this when a job is mid-flight and approaching its original cap — they’d rather pay another…
POST
/
api
/
v1
/
jobs
/
{job_id}
/
extend-budget
curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.computer.stateset.app/api/v1/jobs/{job_id}/extend-budget' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"max_cost_usd": 1.5
}'
{
"job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"previous_max_cost_usd": 1.5,
"new_max_cost_usd": 1.5,
"current_cost_usd": 1.5
}
Confirm your deployment before running this request. This page describes an API contract;
a published reference does not establish hosted availability. Check the dated
host report and obtain your deployment URL and credentials.
Replace the example host if your provisioned service uses a different URL.
max_cost_usd on a live job at runtime.
Tenants reach for this when a job is mid-flight and approaching its
original cap — they’d rather pay another dollar than have it
cancel + lose progress. The new cap is written to params.max_cost_usd
and observed by the worker on its next iteration’s cost-cap check.
Only live jobs (queued / running / awaiting_approval) can be
extended — terminal jobs return 409. Strictly raise-only: the
requested cap must be greater than the current one.
Path parameters
string (uuid)
required
Request body
ExtendBudgetRequest
number
required
New cap, USD. Must be strictly higher than the current cap (or set when the job had none). Lowering is rejected with 409 because dropping the cap below the running cost would trip an immediate self-cancellation, which is what tenants are usually trying to avoid by calling this. Maximum:
1000.Response
ExtendBudgetResponse
string
required
number,null
required
number
required
number
required
Status codes
| Code | Meaning |
|---|---|
200 | Successful Response |
422 | Validation Error |
Using this contract
Read the source OpenAPI document for declared schemas and alternatives. This page also includes documented corrections from the spec overlays. Example IDs and values are illustrative; replace them with records from your workspace.curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.computer.stateset.app/api/v1/jobs/{job_id}/extend-budget' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"max_cost_usd": 1.5
}'
{
"job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"previous_max_cost_usd": 1.5,
"new_max_cost_usd": 1.5,
"current_cost_usd": 1.5
}
Last modified on September 21, 2026