# x402 Agentic Spend Guard — Per-Agent Budget Enforcement

> x402 Agentic Spend Guard — Per-Agent Budget Enforcement is a paid API for AI agents from api.x402agentic.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-18).

Tracks a named agent's cumulative USD spend against a cap and blocks transactions that would exceed the budget

## Facts

- Endpoint: GET https://api.x402agentic.ai/spend-guard?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-agentic-spend-guard-per-agent-budget-enforcement-72d9122b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LIcLt4l-6rk5rPUPADXNz

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 x402-agentic-spend-guard-per-agent-budget-enforcement-72d9122b
```

Example prompt: Before making this $12 purchase, check whether agent 'agent-007-shopper' is still within its $50 monthly budget cap — and if the cap isn't set yet, initialize it at $50.

## When to prefer this

Use this endpoint when an AI agent needs real-time pre-authorization of a payment against a pre-set USD budget — particularly for autonomous agents on Base USDC where runaway spending is a risk. Prefer this over client-side budget checks because it persists cumulative state server-side across multiple agent sessions and payment events. Best suited for agentic workflows where the agent makes repeated micropayments and needs a centralized guardrail.

## Known failure modes

- Missing agentId returns a 400 validation error
- amountUsd larger than remaining budget returns an overspend-blocked response
- Invalid or malformed agentId returns an error
- Service unavailable mid-transaction may leave spend state inconsistent
- Calling without amountUsd only checks budget state without evaluating a pending spend

## How this service works

Per-agent budget enforcement — track an agent's cumulative spend against a cap and block overspend. Part of x402 Agentic, the payment-trust suite for AI agents on Base USDC.

## Output

Returns whether the agent is allowed to proceed with the pending spend, the agent's cumulative total spent so far, remaining budget headroom, and a flag indicating whether the transaction would cause an overspend. If a budgetUsd was provided, confirms the cap has been set or updated.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "agentId"
     ],
     "properties": {
      "agentId": {
       "type": "string",
       "description": "Stable identifier for the spending agent"
      },
      "amountUsd": {
       "type": "number",
       "description": "Amount about to be spent (USD)"
      },
      "budgetUsd": {
       "type": "number",
       "description": "Optional: set/raise this agent's budget (USD)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "agentId": "agent-123",
  "allowed": true,
  "verdict": "allow",
  "recorded": true,
  "spentUsd": 0.25,
  "amountUsd": 0.25,
  "budgetUsd": 10,
  "remainingUsd": 9.75
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-agentic-spend-guard-per-agent-budget-enforcement-72d9122b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402agentic.ai](https://www.zero.xyz/host/api.x402agentic.ai/llms.txt)
