{
  "openapi": "3.1.0",
  "info": {
    "title": "AgentProof Base Token Evidence API",
    "version": "1.0.0",
    "description": "Pay per successful evidence check using native x402 v2, USDC on Base. No API key. Explicit source coverage; no trade recommendations."
  },
  "servers": [
    {
      "url": "https://agentproof-base.softcreek2.chatgpt.site"
    }
  ],
  "paths": {
    "/v1/base/token": {
      "get": {
        "operationId": "analyzeBaseToken",
        "summary": "Get Base token contract, security and liquidity evidence",
        "description": "Costs 0.01 USDC. All upstream sources failing returns 503 without settlement.",
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{40}$",
              "description": "Base token contract address"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Timestamped evidence report; PAYMENT-RESPONSE contains successful settlement receipt.",
            "headers": {
              "PAYMENT-RESPONSE": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Timestamped contract, security and liquidity evidence with explicit source coverage and findings",
                  "required": [
                    "schema_version",
                    "generated_at",
                    "network",
                    "token",
                    "coverage",
                    "summary",
                    "sources",
                    "flags",
                    "limitations"
                  ],
                  "properties": {
                    "schema_version": {
                      "type": "string"
                    },
                    "generated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "network": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "const": "base"
                        },
                        "chain_id": {
                          "const": 8453
                        }
                      },
                      "required": [
                        "name",
                        "chain_id"
                      ]
                    },
                    "token": {
                      "type": "object",
                      "properties": {
                        "address": {
                          "type": "string",
                          "pattern": "^0x[0-9a-fA-F]{40}$"
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "symbol": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "decimals": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "address"
                      ]
                    },
                    "coverage": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "enum": [
                            "complete",
                            "partial"
                          ]
                        },
                        "usable_sources": {
                          "type": "integer"
                        },
                        "total_sources": {
                          "type": "integer",
                          "minimum": 3,
                          "maximum": 4
                        },
                        "missing_sources": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        },
                        "unknown_security_checks": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "detected_flags": {
                          "type": "integer"
                        },
                        "highest_flag_severity": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "assessment": {
                          "const": "evidence_only"
                        }
                      }
                    },
                    "security": {
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "onchain": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "description": "Direct Base RPC contract evidence at an exact block; code fingerprint, ERC20 metadata and EIP-1967 slots. No safety certification."
                    },
                    "liquidity": {
                      "type": "object"
                    },
                    "price_comparison": {
                      "type": "object"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "url": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "retrieved_at": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        }
                      }
                    },
                    "flags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "severity": {
                            "enum": [
                              "information",
                              "elevated",
                              "high"
                            ]
                          },
                          "source": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "limitations": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid address; no payment settled"
          },
          "402": {
            "description": "x402 v2 challenge. Buyer-authorized wallet signs the accepted requirement and retries using PAYMENT-SIGNATURE. Discover schema before purchasing.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable. An unconfirmed settlement must be retried with the identical signed request before authorizing another payment."
          }
        },
        "x-x402": {
          "price": "0.01",
          "currency": "USDC",
          "network": "eip155:8453"
        },
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          }
        }
      }
    },
    "/v1/base/batch": {
      "get": {
        "operationId": "analyzeBaseTokens",
        "summary": "Evidence for up to three Base tokens",
        "parameters": [
          {
            "name": "addresses",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "One to three comma-separated Base token contract addresses"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Timestamped evidence report; PAYMENT-RESPONSE contains successful settlement receipt.",
            "headers": {
              "PAYMENT-RESPONSE": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "count",
                    "reports"
                  ],
                  "properties": {
                    "schema_version": {
                      "type": "string"
                    },
                    "network": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "const": "base"
                        },
                        "chain_id": {
                          "const": 8453
                        }
                      },
                      "required": [
                        "name",
                        "chain_id"
                      ]
                    },
                    "count": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 3
                    },
                    "reports": {
                      "type": "array",
                      "minItems": 1,
                      "maxItems": 3,
                      "items": {
                        "type": "object",
                        "description": "Timestamped contract, security and liquidity evidence with explicit source coverage and findings",
                        "required": [
                          "schema_version",
                          "generated_at",
                          "network",
                          "token",
                          "coverage",
                          "summary",
                          "sources",
                          "flags",
                          "limitations"
                        ],
                        "properties": {
                          "schema_version": {
                            "type": "string"
                          },
                          "generated_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "network": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "const": "base"
                              },
                              "chain_id": {
                                "const": 8453
                              }
                            },
                            "required": [
                              "name",
                              "chain_id"
                            ]
                          },
                          "token": {
                            "type": "object",
                            "properties": {
                              "address": {
                                "type": "string",
                                "pattern": "^0x[0-9a-fA-F]{40}$"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "symbol": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "decimals": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "address"
                            ]
                          },
                          "coverage": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "enum": [
                                  "complete",
                                  "partial"
                                ]
                              },
                              "usable_sources": {
                                "type": "integer"
                              },
                              "total_sources": {
                                "type": "integer",
                                "minimum": 3,
                                "maximum": 4
                              },
                              "missing_sources": {
                                "type": "array",
                                "items": {
                                  "type": "object"
                                }
                              },
                              "unknown_security_checks": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "summary": {
                            "type": "object",
                            "properties": {
                              "detected_flags": {
                                "type": "integer"
                              },
                              "highest_flag_severity": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "assessment": {
                                "const": "evidence_only"
                              }
                            }
                          },
                          "security": {
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "onchain": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "Direct Base RPC contract evidence at an exact block; code fingerprint, ERC20 metadata and EIP-1967 slots. No safety certification."
                          },
                          "liquidity": {
                            "type": "object"
                          },
                          "price_comparison": {
                            "type": "object"
                          },
                          "sources": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "status": {
                                  "type": "string"
                                },
                                "url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "retrieved_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              }
                            }
                          },
                          "flags": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "severity": {
                                  "enum": [
                                    "information",
                                    "elevated",
                                    "high"
                                  ]
                                },
                                "source": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "limitations": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input; no payment settled"
          },
          "402": {
            "description": "x402 v2 challenge. Buyer-authorized wallet signs the accepted requirement and retries using PAYMENT-SIGNATURE. Discover schema before purchasing.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "No usable data does not settle payment. An unconfirmed settlement must be retried with the identical signed request."
          }
        },
        "x-x402": {
          "price": "0.03",
          "currency": "USDC",
          "network": "eip155:8453"
        },
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.03"
          }
        }
      }
    },
    "/v1/sample": {
      "get": {
        "operationId": "sampleEvidence",
        "summary": "Free illustrative response; not live data",
        "responses": {
          "200": {
            "description": "Illustrative response only"
          }
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "health",
        "responses": {
          "200": {
            "description": "Service and payment configuration status"
          }
        }
      }
    }
  }
}