API referenceBudgets

Create a budget and its key

A hard-capped budget and an api key bound to it, returned ONCE, to hand to an agent you spawn.

The key reads anything this account can; it moves money only through holds inside its budget and every budget it nests in, so it cannot overspend. Other mutating calls with a budget key return 403 budget_key_scope until they charge through holds. Called with a budget key, the new budget nests in that key's budget; 402 budget_exceeded if the cap is more than is left there.

POST
/budgets

Authorization

bearerAuth
AuthorizationBearer <token>

Typecut API key. Generate one in app.typecut.ai → Settings → API keys. Send as Authorization: Bearer tc_live_….

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/budgets" \  -H "Content-Type: application/json" \  -d '{    "cap": 1  }'
{
  "data": {
    "budget_id": "0bce615d-2e25-42ba-b23e-062649572fa6",
    "parent_id": "1c6ca187-e61f-4301-8dcb-0e9749e89eef",
    "label": "string",
    "cap": 0,
    "spent": 0,
    "held": 0,
    "remaining": 0,
    "status": "active",
    "expires_at": "string",
    "created_at": "string",
    "api_key": "string",
    "key_prefix": "string",
    "note": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}