{
  "openapi": "3.1.0",
  "info": {
    "title": "402Check API",
    "version": "1.0.0",
    "description": "Production-readiness audit for x402 payment endpoints. Validates HTTP 402, protocol v2 headers, payment requirements, CORS, and marketplace discovery compatibility.",
    "contact": {
      "url": "https://agent-json-utility.pablovph.chatgpt.site"
    },
    "x-guidance": "Use POST /v1/audit for a fast single-endpoint x402 check at 0.05 USD. Use POST /v1/launch-report for a complete 20 USD origin-level review of OpenAPI discovery, pricing metadata, schemas, and up to five live paid routes. Both accept JSON and settle in USDC on Base."
  },
  "servers": [
    {
      "url": "https://agent-json-utility.pablovph.chatgpt.site"
    }
  ],
  "paths": {
    "/v1/audit": {
      "post": {
        "operationId": "auditX402Endpoint",
        "summary": "Audit an x402 payment endpoint",
        "description": "Returns a scored protocol and discovery-readiness report. Costs 0.05 USDC on Base.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "description": "Public HTTPS x402 endpoint to audit"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "GET",
                      "POST"
                    ],
                    "default": "GET"
                  },
                  "body": {
                    "type": "object",
                    "description": "Optional JSON body for a POST endpoint",
                    "additionalProperties": true
                  }
                },
                "required": [
                  "url"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Audit report after successful x402 payment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "score": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "ready": {
                      "type": "boolean"
                    },
                    "summary": {
                      "type": "string"
                    },
                    "checks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "passed": {
                            "type": "boolean"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "passed",
                          "message"
                        ]
                      }
                    }
                  },
                  "required": [
                    "score",
                    "ready",
                    "summary",
                    "checks"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "x402 payment required"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.050000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "payTo": "0x94269cac87646f7cE6B3D4B4f661C98929025C72"
        }
      }
    },
    "/v1/launch-report": {
      "post": {
        "operationId": "createX402LaunchReport",
        "summary": "Create a complete x402 launch-readiness report",
        "description": "Audits an API origin's OpenAPI contract, paid-route metadata, input/output schemas, and up to five live x402 challenges. Costs 20 USDC on Base.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "format": "uri",
                    "description": "Public HTTPS origin whose OpenAPI and x402 routes should be audited"
                  }
                },
                "required": [
                  "origin"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Origin-level launch report after successful x402 payment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "origin": {
                      "type": "string",
                      "format": "uri"
                    },
                    "score": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "ready": {
                      "type": "boolean"
                    },
                    "summary": {
                      "type": "string"
                    },
                    "paidRoutes": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "findings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "passed": {
                            "type": "boolean"
                          },
                          "severity": {
                            "type": "string",
                            "enum": [
                              "error",
                              "warning"
                            ]
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "passed",
                          "severity",
                          "message"
                        ]
                      }
                    },
                    "endpointAudits": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "score": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "ready": {
                            "type": "boolean"
                          },
                          "summary": {
                            "type": "string"
                          },
                          "checks": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "passed": {
                                  "type": "boolean"
                                },
                                "message": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "passed",
                                "message"
                              ]
                            }
                          }
                        },
                        "required": [
                          "score",
                          "ready",
                          "summary",
                          "checks"
                        ]
                      }
                    },
                    "prioritizedFixes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "origin",
                    "score",
                    "ready",
                    "summary",
                    "paidRoutes",
                    "findings",
                    "endpointAudits",
                    "prioritizedFixes"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "x402 payment required"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "20.000000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "payTo": "0x94269cac87646f7cE6B3D4B4f661C98929025C72"
        }
      }
    }
  }
}