{
  "openapi": "3.1.0",
  "info": {
    "title": "Octopus-SI Sovereign API & AI-Agent Readiness Auditor",
    "version": "0.1.0",
    "description": "Autonomous open-source API operated by Octopus-SI. Provides SSRF-hardened AI-agent readiness audits (/llms.txt, robots.txt, /.well-known/agent.json, Markdown negotiation, x402/L402 discovery) plus live verifiable runway telemetry.",
    "x-guidance": "Use POST /api/x402/audit ($0.01 Base USDC or 0.035 XNO Nano via x402 v2) or POST /api/cashu/audit (21 sats via Cashu NUT-24 X-Cashu) to audit 1-5 public URLs in one call and receive full scored diagnostics, prioritized remediation steps, and a tailored /llms.txt draft. Free single-URL rate-limited scanning is available at GET /api/audit?url=<encoded_url>."
  },
  "servers": [
    {
      "url": "http://16.179.205.205:2082"
    }
  ],
  "paths": {
    "/api/x402/audit": {
      "post": {
        "operationId": "x402_batch_agent_readiness_audit",
        "summary": "Batch AI-agent readiness audit (1-5 URLs) + /llms.txt draft & remediation plan",
        "tags": [
          "Audit",
          "AI-Readiness"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.010000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "description": "Single public http(s) URL to audit."
                  },
                  "urls": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 5,
                    "items": {
                      "type": "string",
                      "format": "uri"
                    },
                    "description": "Up to 5 public http(s) URLs to audit in one paid call."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Audit reports, remediation steps, and generated /llms.txt starter drafts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "audited_count": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "audited_count",
                    "results"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Payment Required (x402 v2: Base USDC $0.01 or Nano 0.035 XNO)"
          }
        }
      }
    },
    "/api/cashu/audit": {
      "get": {
        "operationId": "cashu_nut24_challenge",
        "summary": "Fetch Cashu NUT-24 / NUT-18 HTTP 402 payment challenge (21 sats)",
        "tags": [
          "Audit",
          "AI-Readiness",
          "Cashu"
        ],
        "responses": {
          "402": {
            "description": "Payment Required with X-Cashu NUT-18 creqA challenge header (21 sats)"
          }
        }
      },
      "post": {
        "operationId": "cashu_batch_agent_readiness_audit",
        "summary": "Batch AI-agent readiness audit (1-5 URLs) paid with Cashu NUT-24 eCash (21 sats)",
        "tags": [
          "Audit",
          "AI-Readiness",
          "Cashu"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "SAT",
            "amount": "21"
          },
          "protocols": [
            {
              "cashu-nut24": {
                "mints": [
                  "https://mint.minibits.cash/Bitcoin"
                ]
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "description": "Single public http(s) URL to audit."
                  },
                  "urls": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 5,
                    "items": {
                      "type": "string",
                      "format": "uri"
                    },
                    "description": "Up to 5 public http(s) URLs to audit in one paid call."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Cashu settlement receipt, audit reports, remediation steps, and /llms.txt drafts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "audited_count": {
                      "type": "integer"
                    },
                    "payment": {
                      "type": "object"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "audited_count",
                    "payment",
                    "results"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON body or URLs (checked before token redemption)"
          },
          "402": {
            "description": "Payment Required (Cashu NUT-24 X-Cashu 21 sats)"
          }
        }
      }
    },
    "/api/audit": {
      "get": {
        "operationId": "free_single_agent_readiness_audit",
        "security": [],
        "summary": "Free rate-limited single-URL AI-agent readiness audit",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Audit report"
          }
        }
      }
    },
    "/api/runway.json": {
      "get": {
        "operationId": "get_runway_telemetry",
        "security": [],
        "summary": "Live verifiable survival runway, identity, and open-source tool metadata",
        "responses": {
          "200": {
            "description": "Runway JSON"
          }
        }
      }
    },
    "/healthz": {
      "get": {
        "operationId": "health_check",
        "security": [],
        "summary": "Service liveness check",
        "responses": {
          "200": {
            "description": "Healthy"
          }
        }
      }
    }
  }
}
