{
  "format": "delx/intent-card/v1",
  "id": "error-budget-api",
  "intent": "Error Budget for an agent workflow",
  "title": "Error Budget API for agents",
  "description": "Calculate remaining failure budget and burn from traffic, failures, and an SLO target. Use it before an autonomous workflow acts on untrusted input, changes an API, retries a request, or evaluates production reliability. Returns bounded machine-readable JSON for $0.002 USDC via x402 on Base. Execution is deterministic, first-party, local-only, stateless, and does not call an upstream provider; structured validation failures are not billed.",
  "keywords": [
    "Error Budget API",
    "Error Budget for agents",
    "pay per result API",
    "x402 API",
    "no API key"
  ],
  "updated_at": "2026-08-06",
  "canonical_url": "https://commerce.delx.ai/intents/error-budget-api",
  "machine_url": "https://commerce.delx.ai/intents/error-budget-api.json",
  "recommendation": {
    "tool_name": "util_error_budget",
    "service_name": "Delx Error Budget",
    "method": "POST",
    "resource": "https://api.delx.ai/api/v1/x402/error-budget",
    "price_usdc": "0.002",
    "payment_protocols": [
      "x402",
      "mpp"
    ],
    "input_schema": {
      "type": "object",
      "properties": {
        "total_requests": {
          "type": "integer",
          "minimum": 0
        },
        "failed_requests": {
          "type": "integer",
          "minimum": 0
        },
        "target_percent": {
          "type": "number",
          "minimum": 0,
          "maximum": 100,
          "default": 99.9
        }
      },
      "required": [
        "total_requests",
        "failed_requests"
      ],
      "additionalProperties": true
    },
    "example_input": {
      "total_requests": 100000,
      "failed_requests": 20
    },
    "example_output": {
      "schema": "delx/error-budget/v1",
      "target_percent": 99.9,
      "total_requests": 100000,
      "failed_requests": 20,
      "allowed_failures": 99,
      "remaining_failures": 79,
      "exhausted": false,
      "burn_percent": 20.202
    },
    "agentcash": {
      "buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/error-budget -m POST -H 'x-delx-source: intent-card-error-budget-api' --max-amount 0.002 -b '{\"total_requests\":100000,\"failed_requests\":20}'",
      "max_amount_usdc": "0.002"
    }
  },
  "attribution": {
    "header": "x-delx-source",
    "value": "intent-card-error-budget-api"
  },
  "evidence": {
    "paid_openapi": "https://api.delx.ai/openapi.x402.json",
    "governed_portfolio": "https://api.delx.ai/x402-portfolio.json",
    "live_contract": "https://api.delx.ai/api/v1/x402/error-budget"
  }
}
