> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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…

<Warning>
  **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](/api-reference/hosts) and obtain your deployment URL and credentials.
  Replace the example host if your provisioned service uses a different URL.
</Warning>

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 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

<ParamField path="job_id" type="string (uuid)" required />

### Request body

`ExtendBudgetRequest`

<ParamField body="max_cost_usd" type="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`.
</ParamField>

### Response

`ExtendBudgetResponse`

<ResponseField name="job_id" type="string" required />

<ResponseField name="previous_max_cost_usd" type="number,null" required />

<ResponseField name="new_max_cost_usd" type="number" required />

<ResponseField name="current_cost_usd" type="number" required />

### Status codes

| Code | Meaning |
| - | - |
| `200` | Successful Response |
| `422` | Validation Error |

### Using this contract

Read the [source OpenAPI document](/spec/computer-use.json) for declared schemas and alternatives.
This page also includes documented corrections from the [spec overlays](https://github.com/stateset/docs/tree/main/spec/overlays).
Example IDs and values are illustrative; replace them with records from your workspace.

<RequestExample>
  ```bash cURL theme={null}
  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
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "previous_max_cost_usd": 1.5,
    "new_max_cost_usd": 1.5,
    "current_cost_usd": 1.5
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.