{
  "openapi": "3.1.0",
  "info": {
    "title": "H1DR4 SKYNET x402 Investigation API",
    "version": "1.0.0",
    "summary": "Paid SKYNET investigation dossiers for autonomous agents, payable per request with x402 on Base USDC.",
    "description": "H1DR4 SKYNET provides paid per-target investigation dossiers for public-interest entity, wallet, handle, domain, phone, email, clue, and case enrichment. The endpoint is designed for agents and x402 marketplaces: an unpaid request returns HTTP 402 payment requirements, and a paid retry returns a structured dossier with findings, profiles, source trails, map cues, timeline cues, wallet recon, and next investigative leads when available.",
    "termsOfService": "https://h1dr4.dev/docs",
    "contact": {
      "name": "H1DR4",
      "url": "https://h1dr4.dev/skynet",
      "email": "contact@h1dr4.dev"
    },
    "license": {
      "name": "Commercial API"
    },
    "x-keywords": [
      "x402",
      "skynet",
      "osint",
      "investigation",
      "entity enrichment",
      "wallet intelligence",
      "Base USDC",
      "agent tool",
      "public intelligence"
    ]
  },
  "servers": [
    {
      "url": "https://h1dr4.dev/api/v1",
      "description": "H1DR4 public API proxy"
    }
  ],
  "tags": [
    {
      "name": "skynet",
      "description": "Paid H1DR4 SKYNET investigation dossiers."
    },
    {
      "name": "x402",
      "description": "Paid requests using HTTP 402 and Base USDC."
    }
  ],
  "paths": {
    "/skynet/x402": {
      "get": {
        "operationId": "getSkynetX402Resource",
        "summary": "Read SKYNET x402 resource metadata",
        "tags": ["skynet", "x402"],
        "responses": {
          "200": {
            "description": "Machine-readable resource metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/skynet/investigate": {
      "post": {
        "operationId": "createPaidSkynetInvestigation",
        "summary": "Run a paid SKYNET investigation dossier",
        "description": "Submit a target or investigative question. Unpaid requests return HTTP 402 payment requirements. Paid retries return a structured SKYNET dossier. Current price is 0.25 USDC on Base.",
        "tags": ["skynet", "x402"],
        "x-x402": {
          "network": "base",
          "chainId": 8453,
          "asset": "USDC",
          "price": "0.25 USDC",
          "amountAtomic": "250000",
          "payTo": "0x99EEDcE3C87Adf3dE1c9B8B08F1810C168D6E039"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkynetInvestigationInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paid SKYNET investigation dossier.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkynetInvestigationResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment required. Returned with x402 payment requirements.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "x402": {
        "type": "apiKey",
        "in": "header",
        "name": "PAYMENT-SIGNATURE",
        "description": "HTTP 402 payment proof returned by an x402-compatible client after paying Base USDC."
      }
    },
    "schemas": {
      "SkynetInvestigationInput": {
        "type": "object",
        "required": ["request"],
        "additionalProperties": false,
        "properties": {
          "request": {
            "type": "string",
            "description": "Natural-language target or investigative question."
          },
          "limit": {
            "type": "integer",
            "minimum": 10,
            "maximum": 10000,
            "default": 100,
            "description": "H1DR4 Lookup limit if the backend lookup tool is called."
          },
          "lang": {
            "type": "string",
            "default": "en"
          },
          "case_id": {
            "type": "string",
            "description": "Optional H1DR4 case id."
          },
          "purpose": {
            "type": "string",
            "description": "Optional operator note."
          },
          "include_raw_tool_results": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "SkynetInvestigationResponse": {
        "type": "object",
        "properties": {
          "ok": { "type": "boolean" },
          "source": { "type": "string", "const": "h1dr4-skynet-x402" },
          "generated_at": { "type": "string" },
          "model": { "type": "string" },
          "endpoint": { "type": "string" },
          "payment": { "type": "object" },
          "query": { "type": "object" },
          "analysis": { "type": "object" },
          "text": { "type": "string" },
          "tool_calls": {
            "type": "array",
            "items": { "type": "object" }
          },
          "next_actions": {
            "type": "array",
            "items": { "type": "string" }
          }
        }
      }
    }
  }
}
