# Screwtape.ai Budget Authorization & Audit Endpoint

> Screwtape.ai Budget Authorization & Audit Endpoint is a paid API for AI agents from screwtape.ai, paid per call via x402, $0.002/call, status unknown (last checked 2026-11-28).

Evaluates whether an AI agent's proposed spend is within its budget cap and records the decision as an auditable proof.

## Facts

- Endpoint: POST https://screwtape.ai/v1/budget?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-28
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/screwtape-ai-budget-authorization-audit-endpoint-aa4f925d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eYr2jz6nlvZqm-Rc2agZT

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability screwtape-ai-budget-authorization-audit-endpoint-aa4f925d -d '<json body>'
```

Example prompt: Before you buy those cloud credits for $45 from AWS, check Screwtape to see if that spend is allowed under my $200 budget cap for this run — use run ID 'prod-agent-2024-05-20', action 'purchase cloud credits', and block if it would exceed the cap.

## When to prefer this

Use Screwtape when you need a lightweight, per-call budget policy check with an immutable audit trail before an autonomous agent executes any payment or financial action. Prefer it over manual budget tracking in agent code when you need reproducible proof-of-decision, support for hierarchical run trees (parent_run_id), or velocity monitoring. It is not a payment processor or funds custodian — pair it with an actual payment rail (e.g. x402, Stripe) and treat its decision as advisory enforcement that your agent must respect.

## Known failure modes

- Missing required fields (run_id, event_id) returns a validation error
- Amount exceeds cap returns a 'block' decision with reasons
- Duplicate event_id returns replayed:true with the original decision
- Currency other than USD is rejected (const constraint)
- cap set to 0 or negative triggers exclusiveMinimum validation error
- Network timeout means agent must retry and handle replayed:true gracefully
- Malformed run_id pattern (non-alphanumeric chars) causes schema rejection

## How this service works

Screwtape advises and records. Your agent must cooperate by checking the result before acting; we do not hold funds or independently stop payments.

## Output

Returns a decision field ('allow', 'warn', or 'block'), the remaining budget after the proposed spend, the total spent so far, a list of human-readable reasons for the decision, whether the event was replayed, whether funds are reserved, spending velocity per minute, and the canonical run and root_run_id identifiers for audit linkage.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "cap": {
   "type": "number"
  },
  "action": {
   "type": "string"
  },
  "amount": {
   "type": "number"
  },
  "run_id": {
   "type": "string"
  },
  "currency": {},
  "event_id": {
   "type": "string"
  },
  "merchant": {
   "type": "string"
  },
  "parent_run_id": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "schema": {
  "type": "object",
  "required": [
   "decision",
   "remaining_budget",
   "reasons",
   "run_id",
   "root_run_id",
   "spent",
   "reserved"
  ],
  "properties": {
   "spent": {
    "type": "number"
   },
   "run_id": {
    "type": "string",
    "pattern": "^[A-Za-z0-9._:-]+$",
    "maxLength": 128,
    "minLength": 1
   },
   "reasons": {
    "type": "array",
    "items": {
     "type": "string"
    }
   },
   "decision": {
    "enum": [
     "allow",
     "warn",
     "block"
    ]
   },
   "event_id": {
    "type": "string",
    "pattern": "^[A-Za-z0-9._:-]+$",
    "maxLength": 128,
    "minLength": 1
   },
   "replayed": {
    "type": "boolean"
   },
   "reserved": {
    "type": "boolean"
   },
   "request_id": {
    "type": "string"
   },
   "retry_count": {
    "type": "integer"
   },
   "root_run_id": {
    "type": "string",
    "pattern": "^[A-Za-z0-9._:-]+$",
    "maxLength": 128,
    "minLength": 1
   },
   "remaining_budget": {
    "type": "number"
   },
   "velocity_per_minute": {
    "type": "number"
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/screwtape-ai-budget-authorization-audit-endpoint-aa4f925d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from screwtape.ai](https://www.zero.xyz/host/screwtape.ai/llms.txt)
