---
title: "Set or clear the owner's project budget"
method: PUT
path: "/v1/projects/{project_id}/credit-budget"
---

# Set or clear the owner's project budget

`PUT /v1/projects/{project_id}/credit-budget`

## Request

- Base URL: `https://app.ohmyho.st`
- URL: `https://app.ohmyho.st/v1/projects/{project_id}/credit-budget`
- Auth: HTTP bearer

Changes only the budget policy, never credit grants or usage. amount_micros null clears the budget and requires continue mode. stop rejects new billable work when measured monthly usage plus reservations reaches the limit. This local setting completes atomically with its operation, audit and idempotent response; no provider job is queued. Replaying an old key returns its original snapshot without restoring its old policy.

## Path parameters

- `project_id` string, required

## Headers

- `X-Request-Id` string
- `Idempotency-Key` string, required

## Request body

- SetProjectCreditBudgetRequest
  - `amount_micros` string, required: Non-negative microcredits, at most 9223372036854775807. One credit equals 1000000 microcredits.
  - `mode` 'continue' | 'stop', required

## Response `200`

Budget snapshot at the time of the original mutation.

- ProjectCreditBudget
  - `project_id` string, required
  - `amount_micros` string, required: Non-negative microcredits, at most 9223372036854775807. One credit equals 1000000 microcredits.
  - `mode` 'continue' | 'stop', required
  - `used_micros` string, required: Non-negative microcredits, at most 9223372036854775807. One credit equals 1000000 microcredits.
  - `reserved_micros` string, required: Non-negative microcredits, at most 9223372036854775807. One credit equals 1000000 microcredits.
  - `period_start` string, date-time, required
  - `period_end` string, date-time, required
  - `as_of` string, date-time, required

## Other responses

- `400`: The request failed.
- `401`: The request failed.
- `404`: The resource does not exist or is not visible to the authenticated principal.
- `409`: The idempotency key was already used with a different canonical request.
- `429`: The request failed.
- `503`: The request failed.

---

[API](https://skmtc.dev/ohmyho/apis/ohmyho-st-api.md) · [All operations](https://skmtc.dev/ohmyho/apis/ohmyho-st-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ohmyho/apis/ohmyho-st-api/revisions/d069888c0017?raw)
