{
  "openapi": "3.1.0",
  "info": {
    "title": "AgentKYB API",
    "version": "1.2.0-x402-mainnet",
    "description": "Pre-payment trust for AI agents. payment_preflight (0.01 USDC) and vendor_preflight (0.05 USDC) are available through the AgentKYB x402 MCP endpoint; lower-level REST evidence utilities remain free beta."
  },
  "servers": [
    {
      "url": "https://agentkyb.andy229651.workers.dev"
    }
  ],
  "paths": {
    "/resolve_company": {
      "get": {
        "operationId": "resolveCompany",
        "summary": "Resolve a company to an official legal entity",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            }
          },
          {
            "name": "compact",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                1
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Entity resolution result"
          }
        }
      }
    },
    "/screen_sanctions": {
      "get": {
        "operationId": "screenSanctions",
        "summary": "Screen a counterparty against indexed official sanctions lists",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sanctions screening result"
          }
        }
      }
    },
    "/check_domain": {
      "get": {
        "operationId": "checkDomain",
        "summary": "Retrieve RDAP domain registration evidence",
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Domain evidence result"
          }
        }
      }
    },
    "/payment_preflight": {
      "post": {
        "summary": "Payment Guard preflight (paid via MCP/x402)",
        "description": "Machine-readable contract for AgentKYB payment_preflight. Execution is only available through the paid MCP endpoint.",
        "operationId": "payment_preflight",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "endpoint",
                  "pay_to",
                  "amount_usd",
                  "network"
                ],
                "properties": {
                  "endpoint": {
                    "type": "string",
                    "format": "uri"
                  },
                  "pay_to": {
                    "type": "string"
                  },
                  "amount_usd": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "network": {
                    "type": "string"
                  },
                  "expected_pay_to": {
                    "type": "string"
                  },
                  "expected_amount_usd": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "expected_network": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "410": {
            "description": "Direct REST execution disabled; use x-agentkyb-paid-mcp endpoint."
          }
        }
      }
    }
  },
  "x-agentkyb-paid-mcp": {
    "endpoint": "https://agentkyb.andy229651.workers.dev/mcp-x402",
    "protocol": "x402",
    "network": "eip155:8453",
    "asset": "USDC",
    "tools": [
      {
        "name": "payment_preflight",
        "price_usd": 0.01
      },
      {
        "name": "vendor_preflight",
        "price_usd": 0.05
      }
    ]
  }
}