{
  "openapi": "3.1.0",
  "info": {
    "title": "Agent Service Market: bounded three-tool x402 pilot",
    "version": "0.29.0",
    "description": "Exactly three conditional POST operations after verified JSON activation. Shared original-window caps across all three tools: 20 quotes, 20 settlement attempts, 80 provider HTTP calls and 1,000 unsigned calls; one concurrent validation and two resident requests. Adding JSON repair creates no new allowance, reset or renewal. Current remaining capacity is unknown; use current health/catalogue availability preflight and avoid repeated probes. No completed sale, paid execution, settlement or revenue is asserted. Historical 170-tool reference definitions do not establish live availability."
  },
  "servers": [
    {
      "url": "https://api.carloshbcabral.com",
      "description": "Separately hosted bounded pilot; refresh health and catalogue before use."
    }
  ],
  "externalDocs": {
    "description": "Current three-tool catalogue and unchanged original pilot terms",
    "url": "https://api.carloshbcabral.com/catalogue"
  },
  "x-pilot-availability": {
    "format": "bounded-three-tool-pilot-availability-v1",
    "status": "conditional-pilot-window",
    "apiOrigin": "https://api.carloshbcabral.com",
    "openapi": "/openapi-live.json",
    "preflightLinks": {
      "health": "https://api.carloshbcabral.com/health",
      "catalogue": "https://api.carloshbcabral.com/catalogue"
    },
    "http402VerificationScope": "Historical unsigned challenges for content-digest and timestamp-convert; separate newly verified unsigned JSON challenge. No completed sale or settlement is asserted.",
    "validFrom": "2026-10-06T18:35:00Z",
    "validUntil": "2026-10-07T18:35:00Z",
    "availableOperationIds": [
      "content-digest",
      "timestamp-convert",
      "json-repair"
    ],
    "plannedUnavailableOperationCount": 167,
    "protocol": "x402-v2",
    "mppAvailable": false,
    "pricePerTool": {
      "amount": "0.003",
      "currency": "USDC",
      "assetKind": "native",
      "network": "eip155:8453",
      "networkName": "Base",
      "amountAtomic": "3000",
      "payerNetworkFeesIncluded": false
    },
    "pilotLimits": {
      "quotes": 20,
      "settlementAttempts": 20,
      "providerCalls": 80,
      "unsignedCalls": 1000,
      "concurrentValidations": 1,
      "residentRequests": 2
    },
    "availabilityConditions": [
      "Inside the unchanged original UTC window",
      "Remaining shared quote, settlement, provider HTTP and unsigned-call caps",
      "Remaining shared free allowance and provider availability",
      "One concurrent validation and two resident requests",
      "Fresh health/catalogue admits the selected operation; remaining quota is unknown"
    ],
    "remainingCapacity": "Unknown. Read current health and catalogue for availability; no remaining-capacity snapshot is asserted.",
    "staticReferenceScope": "The 170-operation reference catalogue, old OpenAPI, schemas and tool pages remain historical release definitions, including unavailable legacy MPP paths. Only the three explicit conditional x402 endpoints below are offered.",
    "paymentAuthorization": "A static notice or HTTP 402 challenge never authorizes a payment. Independently approve actual amount, asset, network, destination and payer fees before any paid request.",
    "livePaymentsVerified": false,
    "operations": [
      {
        "id": "content-digest",
        "method": "POST",
        "url": "https://api.carloshbcabral.com/v1/x402/content-digest"
      },
      {
        "id": "timestamp-convert",
        "method": "POST",
        "url": "https://api.carloshbcabral.com/v1/x402/timestamp-convert"
      },
      {
        "id": "json-repair",
        "method": "POST",
        "url": "https://api.carloshbcabral.com/v1/x402/json-repair"
      }
    ],
    "noNewAllowanceResetOrRenewal": true,
    "maxEntitlementDeliveriesPerReservationIncludingInitial": 4,
    "ordinaryClientNonce": true,
    "json402VerifiedAt": "2026-10-06T23:00:00.088Z",
    "catalogueVerifiedAt": "2026-10-06T23:00:00.301Z",
    "recovery": "At most four entitlement deliveries per reservation, including the initial delivery. Preserve the original credential, exact canonical input and resource, and the optional Idempotency-Key unchanged (including its original absence). Recovery, backpressure or uncertain errors never authorize automatically buying a fresh quote or paying again.",
    "jsonRepairRecovery": "Raw JSON repair input and result are not retained in the ledger. Recovery requires the original input and hash-bound recomputation against the original reservation; the hashes are not a retrievable copy of the text. At most four entitlement deliveries per reservation, including the initial delivery. Preserve the original credential, exact canonical input and resource, and the optional Idempotency-Key unchanged (including its original absence). Recovery, backpressure or uncertain errors never authorize automatically buying a fresh quote or paying again.",
    "priorTwoTool402VerifiedAt": "2026-10-06T18:38:40.692Z",
    "receiptScope": {
      "json402VerifiedAt": "2026-10-06T23:00:00.088Z",
      "catalogueVerifiedAt": "2026-10-06T23:00:00.301Z",
      "saleOrSettlementVerified": false
    }
  },
  "x-preflight-links": {
    "health": "https://api.carloshbcabral.com/health",
    "catalogue": "https://api.carloshbcabral.com/catalogue"
  },
  "x-historical-reference": {
    "url": "https://agents.carloshbcabral.com/openapi.json",
    "scope": "Preserved 170-operation release definitions; do not infer live availability or MPP support."
  },
  "x-wire-limits": {
    "requestBytes": 131072,
    "responseBytes": 524288,
    "jsonDepth": 32,
    "jsonNodes": 20000,
    "compressedRequestBodiesSupported": false
  },
  "x-schema-provenance": "The two existing contracts are unchanged. JSON input/result schemas and examples were extracted from the exact frozen candidate; the original version 0.29.0 response wrapper is preserved and locally checked. Compare current catalogue version, amounts and admission before use.",
  "x-payment-workflow": [
    "Fetch current health and catalogue. Check the UTC pilot window and current admission. These are GET preflight sources, not a separate /preflight endpoint.",
    "Send valid application/json input without PAYMENT-SIGNATURE to the exact selected POST endpoint. A successful unsigned offer returns HTTP 402, PAYMENT-REQUIRED and quote/policy expiry headers. Creating a new quote consumes finite pilot capacity; do not probe repeatedly.",
    "Idempotency-Key is optional, 8 to 128 characters matching [A-Za-z0-9._:-]. Supply a fresh key for a new operation when retry-safe quote reuse is needed. Retrying the same key, endpoint and validated input reuses its existing quote while admissible. Omitting a key can consume a fresh quote on another unsigned request.",
    "Inspect the actual x402 v2 exact challenge and independently authorize native USDC on Base, amount 3000 atomic units, destination and payer fees. Preserve the exact accepted challenge, including extra.agentReservation, when producing PAYMENT-SIGNATURE with an authorized wallet and SDK.",
    "Retry the same POST endpoint and identical input with PAYMENT-SIGNATURE. Keep the original Idempotency-Key if supplied; keep it omitted if originally omitted. Preserve the original reservation and credential. The optional HTTP key does not replace the server reservation. Ordinary EIP-3009 nonce remains client-selected; the reservation is server context, not a server-selected wallet nonce.",
    "Success returns HTTP 200, the exact version 0.29.0 response envelope and PAYMENT-RESPONSE. On HTTP 409 or an uncertain payment outcome, retain the original credential and reconcile; do not blindly request a new quote or pay again. Raw JSON repair input and result are not retained in the ledger. Recovery requires the original input and hash-bound recomputation against the original reservation; the hashes are not a retrievable copy of the text. At most four entitlement deliveries per reservation, including the initial delivery. Preserve the original credential, exact canonical input and resource, and the optional Idempotency-Key unchanged (including its original absence). Recovery, backpressure or uncertain errors never authorize automatically buying a fresh quote or paying again.",
    "Do not submit a new authorization after the quote or pilot deadline. No static specification, compatible preflight or unsigned challenge grants permission to spend."
  ],
  "paths": {
    "/v1/x402/content-digest": {
      "post": {
        "operationId": "content-digest",
        "summary": "Content Digest",
        "description": "Use to fingerprint UTF-8 payloads for content-addressing, cache keys and integrity comparisons. Computes SHA-256/384/512; this is not a signature or authentication service. This pilot supports x402 v2 only; MPP is unavailable.",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional retry key. Keep the exact same value or original absence on signed retry; changed context conflicts.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]{8,128}$"
            }
          },
          {
            "in": "header",
            "name": "PAYMENT-SIGNATURE",
            "required": false,
            "description": "Omit for the initial unsigned 402. Include the authorized SDK credential on the identical retry, preserving accepted.extra.agentReservation.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32768
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/content_digest_Input"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paid result or admissible replay after entitlement; described contract, not an observed real sale.",
            "headers": {
              "PAYMENT-RESPONSE": {
                "description": "Official x402 payment response receipt; preserve for reconciliation.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/content_digest_Response"
                }
              }
            }
          },
          "402": {
            "description": "Unsigned valid input admitted to an x402 v2 payment offer; consumes a quote unless an admissible keyed quote is reused.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "SDK-encoded x402 v2 PaymentRequired object.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Agent-Quote-Expires-At": {
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "X-Agent-Policy-Expires-At": {
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "400": {
            "description": "Invalid resource, credential, request headers or optional idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Wrong HTTP method; this operation supports POST only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Unknown or conflicting reservation/key, or payment retry/reconciliation required. Preserve original input, key and credential. Do not start another payment blindly.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Declared request body exceeds 131072 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Compressed request bodies are unsupported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid, semantically unsupported or over-limit input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request or policy admission limit reached; check current health/catalogue before any further attempt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "New payments unavailable: closed window, exhausted caps/free allowance, provider conditions or activation gate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-payment": {
          "protocol": "x402-v2",
          "scheme": "exact",
          "network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "amountAtomic": "3000",
          "displayAmount": "0.003 native USDC",
          "payerNetworkFeesIncluded": false,
          "mppAvailable": false
        }
      }
    },
    "/v1/x402/timestamp-convert": {
      "post": {
        "operationId": "timestamp-convert",
        "summary": "Timestamp Convert",
        "description": "Use to normalize RFC3339 timestamps with an explicit offset or Unix epoch milliseconds into UTC ISO text, epoch milliseconds and epoch seconds. Rejects rollover dates and leap seconds. This pilot supports x402 v2 only; MPP is unavailable.",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional retry key. Keep the exact same value or original absence on signed retry; changed context conflicts.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]{8,128}$"
            }
          },
          {
            "in": "header",
            "name": "PAYMENT-SIGNATURE",
            "required": false,
            "description": "Omit for the initial unsigned 402. Include the authorized SDK credential on the identical retry, preserving accepted.extra.agentReservation.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32768
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/timestamp_convert_Input"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paid result or admissible replay after entitlement; described contract, not an observed real sale.",
            "headers": {
              "PAYMENT-RESPONSE": {
                "description": "Official x402 payment response receipt; preserve for reconciliation.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/timestamp_convert_Response"
                }
              }
            }
          },
          "402": {
            "description": "Unsigned valid input admitted to an x402 v2 payment offer; consumes a quote unless an admissible keyed quote is reused.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "SDK-encoded x402 v2 PaymentRequired object.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Agent-Quote-Expires-At": {
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "X-Agent-Policy-Expires-At": {
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "400": {
            "description": "Invalid resource, credential, request headers or optional idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Wrong HTTP method; this operation supports POST only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Unknown or conflicting reservation/key, or payment retry/reconciliation required. Preserve original input, key and credential. Do not start another payment blindly.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Declared request body exceeds 131072 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Compressed request bodies are unsupported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid, semantically unsupported or over-limit input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request or policy admission limit reached; check current health/catalogue before any further attempt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "New payments unavailable: closed window, exhausted caps/free allowance, provider conditions or activation gate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-payment": {
          "protocol": "x402-v2",
          "scheme": "exact",
          "network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "amountAtomic": "3000",
          "displayAmount": "0.003 native USDC",
          "payerNetworkFeesIncluded": false,
          "mppAvailable": false
        }
      }
    },
    "/v1/x402/json-repair": {
      "post": {
        "operationId": "json-repair",
        "summary": "Conservative JSON Repair Batch",
        "description": "Repair 1–5 supplied JSON-like texts under an explicit conservative grammar: comments, trailing commas, ASCII unquoted keys, single quotes, Python True/False/None, leading BOM and one enclosing JSON fence. Return unchanged originals, repaired text, parsed values, exact edit traces and independent item rejections. No missing values, delimiters or truncated data are inferred. Raw JSON repair input and result are not retained in the ledger. Recovery requires the original input and hash-bound recomputation against the original reservation; the hashes are not a retrievable copy of the text. At most four entitlement deliveries per reservation, including the initial delivery. Preserve the original credential, exact canonical input and resource, and the optional Idempotency-Key unchanged (including its original absence). Recovery, backpressure or uncertain errors never authorize automatically buying a fresh quote or paying again. x402 v2 only; MPP and Tempo are unavailable.",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional retry key. Keep the exact same value or original absence on signed retry; changed context conflicts.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]{8,128}$"
            }
          },
          {
            "in": "header",
            "name": "PAYMENT-SIGNATURE",
            "required": false,
            "description": "Omit for the initial unsigned 402. Include the authorized SDK credential on the identical retry, preserving accepted.extra.agentReservation.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32768
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/json_repair_Input"
              },
              "example": {
                "profile": "conservative-json-repair-v1",
                "items": [
                  {
                    "id": "paid-fixture",
                    "text": "{foo: 'bar', broken: true,}"
                  },
                  {
                    "id": "already-valid",
                    "text": "{\"items\":[1,2],\"ok\":true}"
                  },
                  {
                    "id": "truncated",
                    "text": "{\"name\":\"unfinished"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paid result or admissible replay after entitlement; described contract, not an observed real sale.",
            "headers": {
              "PAYMENT-RESPONSE": {
                "description": "Official x402 payment response receipt; preserve for reconciliation.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/json_repair_Response"
                },
                "example": {
                  "operation": "json-repair",
                  "version": "0.29.0",
                  "result": {
                    "profile": "conservative-json-repair-v1",
                    "offsetUnit": "utf16-code-units",
                    "itemCount": 3,
                    "successCount": 2,
                    "rejectedCount": 1,
                    "results": [
                      {
                        "id": "paid-fixture",
                        "originalText": "{foo: 'bar', broken: true,}",
                        "status": "repaired",
                        "originalSha256": "180949792a87351e726ae3e5ea90bfa3ecf362028e987b6edce90abe359c0b2f",
                        "originalWasValidJson": false,
                        "repairedText": "{\"foo\": \"bar\", \"broken\": true}",
                        "repairedSha256": "a5640e8bcad859bf34dc8849af8f22a455c7dbd86f81a83287666b3dc0bb6eeb",
                        "value": {
                          "foo": "bar",
                          "broken": true
                        },
                        "edits": [
                          {
                            "kind": "quote-key",
                            "start": 1,
                            "end": 4,
                            "before": "foo",
                            "after": "\"foo\""
                          },
                          {
                            "kind": "convert-single-quoted-string",
                            "start": 6,
                            "end": 11,
                            "before": "'bar'",
                            "after": "\"bar\""
                          },
                          {
                            "kind": "quote-key",
                            "start": 13,
                            "end": 19,
                            "before": "broken",
                            "after": "\"broken\""
                          },
                          {
                            "kind": "remove-trailing-comma",
                            "start": 25,
                            "end": 26,
                            "before": ",",
                            "after": ""
                          }
                        ]
                      },
                      {
                        "id": "already-valid",
                        "originalText": "{\"items\":[1,2],\"ok\":true}",
                        "status": "unchanged",
                        "originalSha256": "067816002380371fc6726553d6797b9cddfb32289bc801f9a82612f09f74e5d4",
                        "originalWasValidJson": true,
                        "repairedText": "{\"items\":[1,2],\"ok\":true}",
                        "repairedSha256": "067816002380371fc6726553d6797b9cddfb32289bc801f9a82612f09f74e5d4",
                        "value": {
                          "items": [
                            1,
                            2
                          ],
                          "ok": true
                        },
                        "edits": []
                      },
                      {
                        "id": "truncated",
                        "originalText": "{\"name\":\"unfinished",
                        "status": "rejected",
                        "originalSha256": "24f03ddd7eff759bda2f2f10cae68b37cc828cf219b149b3011577819c32b8f3",
                        "error": {
                          "code": "TRUNCATED_STRING",
                          "message": "Missing string closing quote; no value is inferred",
                          "offset": 8
                        }
                      }
                    ]
                  },
                  "provenance": {
                    "inputSha256": "a2c462b8c4f3bb0e6a6b0c6f4d34ad90507da1a4e1b48ac23a5d571ef2802b46",
                    "outputSha256": "6aa3bc1bf9fbc05627e4cf7534f8e8bf280ca6614eb13213262cf2e6479987dc",
                    "deterministic": true,
                    "externalRequests": 0
                  }
                }
              }
            }
          },
          "402": {
            "description": "Unsigned valid input admitted to an x402 v2 payment offer; consumes a quote unless an admissible keyed quote is reused.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "SDK-encoded x402 v2 PaymentRequired object.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Agent-Quote-Expires-At": {
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "X-Agent-Policy-Expires-At": {
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "400": {
            "description": "Invalid resource, credential, request headers or optional idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Wrong HTTP method; this operation supports POST only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Unknown or conflicting reservation/key, or payment retry/reconciliation required. Preserve original input, key and credential. Do not start another payment blindly.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Declared request body exceeds 131072 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Compressed request bodies are unsupported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid, semantically unsupported or over-limit input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request or policy admission limit reached; check current health/catalogue before any further attempt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "New payments unavailable: closed window, exhausted caps/free allowance, provider conditions or activation gate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-payment": {
          "protocol": "x402-v2",
          "scheme": "exact",
          "network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "amountAtomic": "3000",
          "displayAmount": "0.003 native USDC",
          "payerNetworkFeesIncluded": false,
          "mppAvailable": false
        },
        "x-json-repair-limits": {
          "items": 5,
          "textCodeUnitsPerItem": 16000,
          "inputBytes": 100000,
          "outputBytes": 400000,
          "nodesPerItem": 4000,
          "depth": 20,
          "editsPerItem": 200,
          "numberTokenCodeUnits": 256,
          "rawHttpRequestBytes": 131072,
          "admittedResponseEnvelopeBytes": 400512,
          "observedLocalMaximumFixtureEnvelopeBytes": 400276,
          "resultStorage": "hash-bound-recompute-v1",
          "maxEntitlementDeliveriesPerReservationIncludingInitial": 4
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PaymentRequired": {
        "type": "object",
        "required": [
          "x402Version",
          "resource",
          "accepts"
        ],
        "properties": {
          "x402Version": {
            "type": "integer",
            "const": 2
          },
          "resource": {
            "type": "object",
            "required": [
              "url"
            ],
            "properties": {
              "url": {
                "type": "string",
                "enum": [
                  "https://api.carloshbcabral.com/v1/x402/content-digest",
                  "https://api.carloshbcabral.com/v1/x402/timestamp-convert",
                  "https://api.carloshbcabral.com/v1/x402/json-repair"
                ]
              }
            }
          },
          "accepts": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "object",
              "required": [
                "scheme",
                "network",
                "asset",
                "amount",
                "payTo",
                "extra"
              ],
              "properties": {
                "scheme": {
                  "const": "exact"
                },
                "network": {
                  "const": "eip155:8453"
                },
                "asset": {
                  "type": "string",
                  "pattern": "^0[xX]833589[fF][cC][dD]6[eE][dD][bB]6[eE]08[fF]4[cC]7[cC]32[dD]4[fF]71[bB]54[bB][dD][aA]02913$"
                },
                "amount": {
                  "const": "3000"
                },
                "payTo": {
                  "type": "string",
                  "pattern": "^0x[0-9a-fA-F]{40}$",
                  "description": "Validate the actual challenge destination independently; no recipient is embedded in this static document."
                },
                "extra": {
                  "type": "object",
                  "required": [
                    "agentReservation"
                  ],
                  "properties": {
                    "agentReservation": {
                      "type": "object",
                      "required": [
                        "version",
                        "id"
                      ],
                      "properties": {
                        "version": {
                          "const": 1
                        },
                        "id": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        }
                      },
                      "additionalProperties": false
                    }
                  }
                }
              }
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code"
            ],
            "properties": {
              "code": {
                "type": "string"
              }
            }
          }
        }
      },
      "content_digest_Input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 100000
          },
          "algorithm": {
            "default": "SHA-256",
            "type": "string",
            "enum": [
              "SHA-256",
              "SHA-384",
              "SHA-512"
            ]
          }
        },
        "required": [
          "text"
        ],
        "additionalProperties": false
      },
      "content_digest_Response": {
        "type": "object",
        "required": [
          "operation",
          "version",
          "result",
          "provenance"
        ],
        "properties": {
          "operation": {
            "const": "content-digest",
            "type": "string"
          },
          "version": {
            "const": "0.29.0",
            "type": "string"
          },
          "result": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "algorithm": {
                "type": "string"
              },
              "hex": {
                "type": "string"
              },
              "base64": {
                "type": "string"
              },
              "byteLength": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "algorithm",
              "hex",
              "base64",
              "byteLength"
            ],
            "additionalProperties": false
          },
          "provenance": {
            "type": "object",
            "required": [
              "inputSha256",
              "outputSha256",
              "deterministic",
              "externalRequests"
            ],
            "properties": {
              "inputSha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "outputSha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "deterministic": {
                "const": true
              },
              "externalRequests": {
                "const": 0
              }
            }
          }
        },
        "additionalProperties": false
      },
      "timestamp_convert_Input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "value": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64
              },
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            ]
          }
        },
        "required": [
          "value"
        ],
        "additionalProperties": false
      },
      "timestamp_convert_Response": {
        "type": "object",
        "required": [
          "operation",
          "version",
          "result",
          "provenance"
        ],
        "properties": {
          "operation": {
            "const": "timestamp-convert",
            "type": "string"
          },
          "version": {
            "const": "0.29.0",
            "type": "string"
          },
          "result": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "iso": {
                "type": "string"
              },
              "epochMilliseconds": {
                "type": "number"
              },
              "epochSeconds": {
                "type": "number"
              }
            },
            "required": [
              "iso",
              "epochMilliseconds",
              "epochSeconds"
            ],
            "additionalProperties": false
          },
          "provenance": {
            "type": "object",
            "required": [
              "inputSha256",
              "outputSha256",
              "deterministic",
              "externalRequests"
            ],
            "properties": {
              "inputSha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "outputSha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "deterministic": {
                "const": true
              },
              "externalRequests": {
                "const": 0
              }
            }
          }
        },
        "additionalProperties": false
      },
      "json_repair_Input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "profile": {
            "type": "string",
            "const": "conservative-json-repair-v1"
          },
          "items": {
            "minItems": 1,
            "maxItems": 5,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80,
                  "pattern": "^[A-Za-z0-9_-]+$"
                },
                "text": {
                  "type": "string",
                  "maxLength": 16000
                }
              },
              "required": [
                "id",
                "text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "profile",
          "items"
        ],
        "additionalProperties": false
      },
      "json_repair_Response": {
        "type": "object",
        "required": [
          "operation",
          "version",
          "result",
          "provenance"
        ],
        "properties": {
          "operation": {
            "const": "json-repair",
            "type": "string"
          },
          "version": {
            "const": "0.29.0",
            "type": "string"
          },
          "result": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "profile": {
                "type": "string",
                "const": "conservative-json-repair-v1"
              },
              "offsetUnit": {
                "type": "string",
                "const": "utf16-code-units"
              },
              "itemCount": {
                "type": "integer",
                "minimum": 1,
                "maximum": 5
              },
              "successCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "rejectedCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "results": {
                "minItems": 1,
                "maxItems": 5,
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80,
                          "pattern": "^[A-Za-z0-9_-]+$"
                        },
                        "originalText": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "repaired",
                            "unchanged"
                          ]
                        },
                        "originalSha256": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "originalWasValidJson": {
                          "type": "boolean"
                        },
                        "repairedText": {
                          "type": "string"
                        },
                        "repairedSha256": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "value": {
                          "$ref": "#/components/schemas/json_repair_Response/properties/result/$defs/__schema0"
                        },
                        "edits": {
                          "maxItems": 200,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "remove-bom",
                                  "remove-fence",
                                  "replace-comment",
                                  "remove-trailing-comma",
                                  "quote-key",
                                  "convert-single-quoted-string",
                                  "convert-python-literal"
                                ]
                              },
                              "start": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "end": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "before": {
                                "type": "string"
                              },
                              "after": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "kind",
                              "start",
                              "end",
                              "before",
                              "after"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "id",
                        "originalText",
                        "status",
                        "originalSha256",
                        "originalWasValidJson",
                        "repairedText",
                        "repairedSha256",
                        "value",
                        "edits"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80,
                          "pattern": "^[A-Za-z0-9_-]+$"
                        },
                        "originalText": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "const": "rejected"
                        },
                        "originalSha256": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            },
                            "offset": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "code",
                            "message",
                            "offset"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "originalText",
                        "status",
                        "originalSha256",
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            },
            "required": [
              "profile",
              "offsetUnit",
              "itemCount",
              "successCount",
              "rejectedCount",
              "results"
            ],
            "additionalProperties": false,
            "$defs": {
              "__schema0": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/json_repair_Response/properties/result/$defs/__schema0"
                    }
                  },
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "$ref": "#/components/schemas/json_repair_Response/properties/result/$defs/__schema0"
                    }
                  }
                ]
              }
            }
          },
          "provenance": {
            "type": "object",
            "required": [
              "inputSha256",
              "outputSha256",
              "deterministic",
              "externalRequests"
            ],
            "properties": {
              "inputSha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "outputSha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "deterministic": {
                "const": true
              },
              "externalRequests": {
                "const": 0
              }
            }
          }
        },
        "additionalProperties": false
      }
    }
  },
  "x-payment-compatibility": {
    "nonce": "client-selected",
    "reservation": "Echo exact accepted.extra.agentReservation version/id",
    "idempotencyKey": "Optional; preserve unchanged including absence",
    "maxEntitlementDeliveriesPerReservationIncludingInitial": 4,
    "recovery": "At most four entitlement deliveries per reservation, including the initial delivery. Preserve the original credential, exact canonical input and resource, and the optional Idempotency-Key unchanged (including its original absence). Recovery, backpressure or uncertain errors never authorize automatically buying a fresh quote or paying again."
  }
}
