---
title: "Update Session Cost Cap"
method: PATCH
path: "/sessions/{session_id}/cost-cap"
tags: ["Sessions"]
---

# Update Session Cost Cap

`PATCH /sessions/{session_id}/cost-cap`

## Request

- Base URL: `https://api.browser-use.com/api/v4`
- URL: `https://api.browser-use.com/api/v4/sessions/{session_id}/cost-cap`
- Auth: API key in header `X-Browser-Use-API-Key`

Update the active run cap without starting another run.

## Path parameters

- `session_id` string, uuid, required

## Request body

- SessionCostCapRequest: Set the maximum spend for the active run in a session.
  - `maxCostUsd` union, required
    - number
    - string

## Response `200`

Successful Response

- SessionCostCapResponse
  - `sessionId` string, uuid, required
  - `maxCostUsd` string, required

## Other responses

- `403`: Zero Data Retention is enabled on the project (V4 unsupported).
- `404`: Run, session, workspace, or profile not found.
- `422`: Validation Error

---

[API](https://skmtc.dev/browser-use/apis/browser-use-public-api-v4.md) · [All operations](https://skmtc.dev/browser-use/apis/browser-use-public-api-v4/llms.txt) · [OpenAPI document](https://skmtc.dev/browser-use/apis/browser-use-public-api-v4/revisions/cd7b1eee1102?raw)
