{
  "openapi": "3.1.0",
  "info": {
    "title": "ONE PERCENT Agent Utility Rack",
    "version": "2",
    "description": "Two one-cent x402 tools and one free deterministic utility for autonomous agents.",
    "x-guidance": "Use Agent Discoverability Audit to diagnose whether a public service can be found and understood by agents. Use x402 Payment Preflight before authorizing an unfamiliar payment challenge. Use the free Budget Guard to enforce a local spending policy before any purchase."
  },
  "servers": [
    {
      "url": "https://one-percent-agent-tip.middletontanne137269.chatgpt.site",
      "description": "Canonical execution backend"
    }
  ],
  "paths": {
    "/api/tools/site-audit": {
      "post": {
        "operationId": "siteAudit",
        "summary": "Audit whether a public HTTPS service is findable, machine-readable, and ready for agent marketplaces.",
        "description": "Use this before publishing an agent service or when crawlers and marketplaces are failing to discover it. Fixed price: $0.01 USDC on Base Mainnet. An unpaid valid request returns an x402 challenge.",
        "tags": [
          "agent-discovery",
          "openapi",
          "x402",
          "readiness",
          "audit"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.010000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "gratitude-index"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2048,
                    "description": "Public HTTPS page or service origin to audit.",
                    "example": "https://example.com",
                    "examples": [
                      "https://example.com"
                    ]
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "url": "https://example.com"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful paid result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "schemaVersion",
                    "tool",
                    "ok",
                    "result",
                    "warnings",
                    "checkedAt",
                    "source"
                  ],
                  "properties": {
                    "schemaVersion": {
                      "const": "1"
                    },
                    "tool": {
                      "const": "site-audit"
                    },
                    "ok": {
                      "const": true
                    },
                    "result": {
                      "type": "object",
                      "required": [
                        "reachable",
                        "score",
                        "status",
                        "checks",
                        "findings",
                        "recommendations"
                      ],
                      "properties": {
                        "reachable": {
                          "type": "boolean"
                        },
                        "finalUrl": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "httpStatus": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "latencyMs": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "score": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "ready",
                            "partial",
                            "not_ready"
                          ]
                        },
                        "checks": {
                          "type": "object"
                        },
                        "findings": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "recommendations": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "checkedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "source": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "schemaVersion": "1",
                  "tool": "site-audit",
                  "ok": true,
                  "result": {
                    "reachable": true,
                    "finalUrl": "https://example.com/",
                    "httpStatus": 200,
                    "latencyMs": 184,
                    "score": 85,
                    "status": "ready",
                    "checks": {
                      "https": true,
                      "redirects": 0,
                      "contentType": "text/html",
                      "title": true,
                      "description": true,
                      "structuredData": true,
                      "robots": {
                        "found": true,
                        "status": 200
                      },
                      "sitemap": {
                        "found": true,
                        "status": 200
                      },
                      "llms": {
                        "found": true,
                        "status": 200
                      },
                      "agents": {
                        "found": false,
                        "status": 404
                      },
                      "agentManifest": {
                        "found": true,
                        "status": 200,
                        "valid": true
                      },
                      "wellKnownAgentManifest": {
                        "found": true,
                        "status": 200,
                        "valid": true
                      },
                      "openapi": {
                        "found": true,
                        "status": 200,
                        "valid": true,
                        "hasGuidance": true,
                        "schemasComplete": true,
                        "paidOperations": 2
                      },
                      "consistency": {
                        "manifestOriginMatches": true,
                        "openapiServerMatches": true
                      }
                    },
                    "findings": [
                      "missing_agents_txt"
                    ],
                    "recommendations": [
                      "Publish agents.txt at the audited base path."
                    ]
                  },
                  "warnings": [],
                  "checkedAt": "2026-08-08T00:00:00.000Z",
                  "source": "gratitude-index"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input; no settlement occurs"
          },
          "402": {
            "description": "x402 payment required: $0.01 USDC"
          },
          "503": {
            "description": "Tool disabled by the zero-cost safety policy"
          }
        }
      }
    },
    "/api/tools/payment-preflight": {
      "post": {
        "operationId": "paymentPreflight",
        "summary": "Decide whether an x402 challenge is compatible, within budget, and safe to attempt.",
        "description": "Use this before an agent authorizes an unfamiliar x402 payment challenge; it never pays the target service. Fixed price: $0.01 USDC on Base Mainnet. An unpaid valid request returns an x402 challenge.",
        "tags": [
          "x402",
          "payment-safety",
          "budget",
          "preflight",
          "usdc"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.010000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "gratitude-index"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url",
                  "maxUsd"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2048,
                    "description": "Public HTTPS resource whose unpaid payment challenge should be inspected.",
                    "example": "https://example.com/paid-resource",
                    "examples": [
                      "https://example.com/paid-resource"
                    ]
                  },
                  "maxUsd": {
                    "type": "string",
                    "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]{1,6})?$",
                    "maxLength": 20,
                    "description": "Maximum authorized spend as a decimal USD string.",
                    "example": "0.10",
                    "examples": [
                      "0.10"
                    ]
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "url": "https://example.com/paid-resource",
                "maxUsd": "0.10"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful paid result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "schemaVersion",
                    "tool",
                    "ok",
                    "result",
                    "warnings",
                    "checkedAt",
                    "source"
                  ],
                  "properties": {
                    "schemaVersion": {
                      "const": "1"
                    },
                    "tool": {
                      "const": "payment-preflight"
                    },
                    "ok": {
                      "const": true
                    },
                    "result": {
                      "type": "object",
                      "required": [
                        "reachable",
                        "paymentRequired",
                        "withinBudget",
                        "safeToAttempt",
                        "warnings"
                      ],
                      "properties": {
                        "reachable": {
                          "type": "boolean"
                        },
                        "httpStatus": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "paymentRequired": {
                          "type": "boolean"
                        },
                        "scheme": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "network": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "asset": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "amountUsd": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "payTo": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "withinBudget": {
                          "type": "boolean"
                        },
                        "safeToAttempt": {
                          "type": "boolean"
                        },
                        "warnings": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "checkedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "source": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "schemaVersion": "1",
                  "tool": "payment-preflight",
                  "ok": true,
                  "result": {
                    "reachable": true,
                    "httpStatus": 402,
                    "paymentRequired": true,
                    "scheme": "exact",
                    "network": "eip155:8453",
                    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                    "amountUsd": "0.01",
                    "payTo": "0x1111111111111111111111111111111111111111",
                    "withinBudget": true,
                    "safeToAttempt": true,
                    "warnings": []
                  },
                  "warnings": [],
                  "checkedAt": "2026-08-08T00:00:00.000Z",
                  "source": "gratitude-index"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input; no settlement occurs"
          },
          "402": {
            "description": "x402 payment required: $0.01 USDC"
          },
          "503": {
            "description": "Tool disabled by the zero-cost safety policy"
          }
        }
      }
    },
    "/api/tools/budget-guard": {
      "post": {
        "operationId": "budgetGuard",
        "summary": "Apply remaining-budget, per-call, and reserve rules before an agent makes a purchase.",
        "description": "Use this free local-policy check before any paid agent request, including the two paid tools in this catalog. This operation is free and never requests payment.",
        "tags": [
          "budget",
          "policy",
          "spending",
          "free",
          "deterministic"
        ],
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "gratitude-index"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "proposedUsd",
                  "remainingUsd",
                  "perCallLimitUsd",
                  "reserveUsd"
                ],
                "properties": {
                  "proposedUsd": {
                    "type": "string",
                    "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]{1,6})?$",
                    "maxLength": 20,
                    "example": "0.05",
                    "examples": [
                      "0.05"
                    ]
                  },
                  "remainingUsd": {
                    "type": "string",
                    "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]{1,6})?$",
                    "maxLength": 20,
                    "example": "1.00",
                    "examples": [
                      "1.00"
                    ]
                  },
                  "perCallLimitUsd": {
                    "type": "string",
                    "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]{1,6})?$",
                    "maxLength": 20,
                    "example": "0.10",
                    "examples": [
                      "0.10"
                    ]
                  },
                  "reserveUsd": {
                    "type": "string",
                    "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]{1,6})?$",
                    "maxLength": 20,
                    "example": "0.25",
                    "examples": [
                      "0.25"
                    ]
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "proposedUsd": "0.05",
                "remainingUsd": "1.00",
                "perCallLimitUsd": "0.10",
                "reserveUsd": "0.25"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful free result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "schemaVersion",
                    "tool",
                    "ok",
                    "result",
                    "warnings",
                    "checkedAt",
                    "source"
                  ],
                  "properties": {
                    "schemaVersion": {
                      "const": "1"
                    },
                    "tool": {
                      "const": "budget-guard"
                    },
                    "ok": {
                      "const": true
                    },
                    "result": {
                      "type": "object",
                      "required": [
                        "allowed",
                        "proposedUsd",
                        "remainingAfterUsd",
                        "reasons"
                      ],
                      "properties": {
                        "allowed": {
                          "type": "boolean"
                        },
                        "proposedUsd": {
                          "type": "string"
                        },
                        "remainingAfterUsd": {
                          "type": "string"
                        },
                        "reasons": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "checkedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "source": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "schemaVersion": "1",
                  "tool": "budget-guard",
                  "ok": true,
                  "result": {
                    "allowed": true,
                    "proposedUsd": "0.05",
                    "remainingAfterUsd": "0.95",
                    "reasons": []
                  },
                  "warnings": [],
                  "checkedAt": "2026-08-08T00:00:00.000Z",
                  "source": "gratitude-index"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input; no settlement occurs"
          },
          "503": {
            "description": "Tool disabled by the zero-cost safety policy"
          }
        }
      }
    }
  }
}
