AI Gateway

Reset a budget instance's spend

Reset active-period spend for one instance of a template budget, identified by its instance_key. The reset is retained in the budget adjustment audit history. Returns 404 when the instance has no counter in the active period. Not supported for legacy fixed-scope budgets.

post/api/v2/budgets/{id}/instances/reset

Request

Path parameters

idstring uuid required

Budget UUID.

Request body

Example request

{
  "data": {
    "attributes": {
      "instance_key": "v1|7:user_id=36:22222222-2222-2222-2222-222222222222",
      "reason": "Credit approved after incorrect usage attribution"
    },
    "type": "budget-instances"
  }
}

Response

OK

Example response

{
  "data": {
    "attributes": {
      "budget_id": "11111111-1111-1111-1111-111111111111",
      "effective_capacity_microcents": 100000000,
      "modified_at": "2026-10-05T12:00:00Z",
      "spend_microcents": 25000000,
      "split_dims": {},
      "window_start": "2026-10-01T00:00:00Z"
    },
    "id": "11111111-1111-1111-1111-111111111111|2026-10-01T00:00:00Z|",
    "type": "budget-instances"
  }
}

Changes

Changes to this operation have not been checked yet.