---
title: "Reset a budget instance's spend"
method: POST
path: "/api/v2/budgets/{id}/instances/reset"
tags: ["AI Gateway"]
---

# Reset a budget instance's spend

`POST /api/v2/budgets/{id}/instances/reset`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/budgets/{id}/instances/reset`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `ai_gateway_config_write`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/budgets/:id/instances/reset/post.ts> (a function with typed inputs; its response is checked against the schema)

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.

## Path parameters

- `id` string, uuid, required

## Request body

- AiGatewayBudgetInstanceResetRequest: Request to reset one budget instance's active-period spend.
  - `data` AiGatewayBudgetInstanceResetData, required: Data used to reset one budget instance's active-period spend.
    - `attributes` AiGatewayBudgetInstanceResetAttributes, required: Attributes used to reset one budget instance's active-period spend.
      - `instance_key` string, required: Counter key of the instance to reset, as returned by the list budget instances endpoint.
      - `reason` string: Optional reason recorded with the spend reset.
    - `type` 'budget-instances', required: Budget instance counter resource type.

## Response `200`

OK

- AiGatewayBudgetInstanceResponse: Response containing one budget instance counter.
  - `data` AiGatewayBudgetInstanceResource, required: One budget instance counter.
    - `attributes` AiGatewayBudgetInstanceAttributes, required: One budget instance counter.
      - `budget_id` string, uuid, required: Budget identifier.
      - `effective_capacity_microcents` integer, required: Capacity enforced for this instance, in microcents.
      - `instance_key` string, required: Opaque canonical counter key. Empty for legacy pooled counters.
      - `modified_at` string, date-time, required: Time the instance counter was last modified.
      - `spend_microcents` integer, required: Spend counted against this instance, in microcents.
      - `split_dims` object, required: Dimension values decoded from instance_key. User and Team values are raw UUIDs.
      - `window_start` string, date-time, required: Start of the accounting window.
    - `id` string, required: Resource identifier.
    - `type` 'budget-instances', required: Budget instance counter resource type.

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/3f70db624329?raw)
