---
title: "Update the monthly spend cap"
method: PATCH
path: "/v1/billing/spend-cap"
tags: ["billing"]
---

# Update the monthly spend cap

`PATCH /v1/billing/spend-cap`

## Request

- Base URL: `https://api.hyperresearch.ai`
- URL: `https://api.hyperresearch.ai/v1/billing/spend-cap`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `hr_session`

Sets accounts.spend_cap_cents_month within the 0–10,000,000 cent ceiling. Lowering the cap below current month-to-date spend blocks further paid runs until the next period.

## Request body

- SpendCapBody
  - `spend_cap_cents_month` integer, required

## Response `200`

Updated billing status

- BillingStatus
  - `account_id` string, required
  - `plan` string, required
  - `spend_cap_cents_month` integer, required
  - `month_to_date_cents` integer, required
  - `remaining_cents_month` integer, required
  - `exhausted` boolean, required
  - `period_start` string, required
  - `card_on_file` boolean, required
  - `stripe_mode` 'test' | 'live', required
  - `payment_method` object, nullable, required
    - `present` boolean, required
    - `brand` string, nullable, required
    - `last4` string, nullable, required
    - `source` 'stripe' | 'operator_flag' | 'none', required
  - `complimentary` object, nullable, required
    - `active` boolean, required
    - `expired` boolean, required
    - `reason` string, nullable, required
    - `granted_at` string, nullable, required
    - `expires_at` string, nullable, required
  - `subscription` object, nullable, required
    - `status` string, nullable, required
    - `current_period_end` string, nullable, required
    - `cancel_at_period_end` boolean, required
    - `plan` string, required

## Other responses

- `400`: Invalid request
- `401`: Authentication failed
- `403`: Insufficient scope or plan
- `404`: Not found
- `429`: Rate limited or over quota
- `500`: Internal error

---

[API](https://skmtc.dev/hyperresearch/apis/hyperresearch-cloud-api.md) · [All operations](https://skmtc.dev/hyperresearch/apis/hyperresearch-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hyperresearch/apis/hyperresearch-cloud-api/revisions/726ef831ebf4?raw)
