---
title: "Consume Credits"
method: POST
path: "/api/workspaces/{workspace_id}/credits/consume"
---

# Consume Credits

`POST /api/workspaces/{workspace_id}/credits/consume`

## Request

- Base URL: `https://api.crowelogic.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.crowelogic.com/api/workspaces/{workspace_id}/credits/consume`
- Auth: none declared

Atomically decrement credits. Returns 402 if insufficient balance.

Callers should send the full estimated credit cost for a turn
before the turn starts. If the estimate later turns out to have
been wrong (tool overage, synth was skipped, etc.) the CLI sends
a corrective transaction with a negative or positive delta and
reason='correction'.

## Path parameters

- `workspace_id` string, required

## Headers

- `authorization` string, nullable

## Request body

- CreditConsumeRequest
  - `amount` integer, required
  - `reason` string
  - `model_label` string, nullable
  - `metadata` object

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/crowelogic/apis/crowe-logic-foundry.md) · [All operations](https://skmtc.dev/crowelogic/apis/crowe-logic-foundry/llms.txt) · [OpenAPI document](https://skmtc.dev/crowelogic/apis/crowe-logic-foundry/revisions/a3c1ef17f171?raw)
