{
  "openapi": "3.1.0",
  "info": {
    "title": "SEC Filing Brief by Agentropolis",
    "version": "0.1.0",
    "summary": "Ticker → SEC filings, red flags, XBRL financials, insider trades and a cited brief.",
    "description": "SEC Filing Brief: send a US ticker (or CIK / company name) and get the last 90 days (1-365) of SEC filings with 8-K items decoded, rule-based red flags (restatement, auditor change, late filing, delisting notice, bankruptcy, cyber incident, 13D stake...), XBRL key financials vs a year ago, insider open-market buys/sells from Form 4 (with 10b5-1 plan share), and a short brief that cites each filing. $0.04 per call. Data: SEC EDGAR (public domain). Informational, not investment advice. $0.04 USDC per call on Base mainnet.",
    "contact": {
      "name": "Agentropolis",
      "url": "https://agentropolis.io",
      "email": "hello@agentropolis.io"
    },
    "x-guidance": "POST /api/sec with {\"ticker\":\"AAPL\"} (or cik / company) and optional days (1-365, default 90). Branch on flags[].severity (high = restatement, late filing, delisting notice, bankruptcy, debt acceleration, deregistration). insiders.signal is net_buying / cluster_buying / net_selling / no_open_market_trades. brief.key_points[].cites map to filings[].id. Not investment advice."
  },
  "servers": [
    {
      "url": "https://seenly-kit-finder.vercel.app"
    }
  ],
  "paths": {
    "/api/sec": {
      "post": {
        "operationId": "secFilingBrief",
        "summary": "SEC filing brief for a ticker ($0.04)",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.04"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "rails": [
            {
              "protocol": "x402",
              "version": 2,
              "scheme": "exact",
              "network": "eip155:8453",
              "networkName": "Base mainnet",
              "asset": "USDC",
              "assetAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
              "amount": "40000",
              "priceUsd": "0.04",
              "payTo": "0xeE6239F3E17bEBe5e89F21F29D74D68CAa0d78CE",
              "facilitator": "Coinbase CDP (gas sponsored; payer needs no ETH)",
              "header": "PAYMENT-SIGNATURE"
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SecRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Brief with filings, flags, financials and insider trades",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecResult"
                }
              }
            }
          },
          "402": {
            "description": "x402 payment required"
          },
          "422": {
            "description": "Invalid or unknown ticker (not charged)"
          },
          "503": {
            "description": "SEC EDGAR or model unavailable (not charged)"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SecRequest": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string",
            "description": "US ticker, e.g. AAPL or BRK-B. One of ticker / cik / company is required."
          },
          "cik": {
            "type": "string",
            "pattern": "^[0-9]{1,10}$",
            "description": "SEC Central Index Key, e.g. 320193."
          },
          "company": {
            "type": "string",
            "minLength": 2,
            "maxLength": 120,
            "description": "Registrant name (exact-ish match against SEC list)."
          },
          "days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 365,
            "default": 90,
            "description": "Look-back window in days."
          },
          "requestKey": {
            "type": "string",
            "maxLength": 128
          }
        }
      },
      "SecResult": {
        "type": "object",
        "properties": {
          "company": {
            "type": "object"
          },
          "window": {
            "type": "object"
          },
          "brief": {
            "type": "object",
            "properties": {
              "headline": {
                "type": "string"
              },
              "summary": {
                "type": "string"
              },
              "key_points": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    },
                    "cites": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "watch_items": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "flags": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "flag": {
                  "type": "string"
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "high",
                    "medium",
                    "info"
                  ]
                },
                "form": {
                  "type": "string"
                },
                "filed": {
                  "type": "string"
                },
                "detail": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                }
              }
            }
          },
          "filings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "form": {
                  "type": "string"
                },
                "filed": {
                  "type": "string"
                },
                "items": {
                  "type": "array"
                },
                "url": {
                  "type": "string"
                }
              }
            }
          },
          "financials": {
            "type": "object"
          },
          "insiders": {
            "type": "object"
          },
          "caveats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "disclaimer": {
            "type": "string"
          }
        },
        "required": [
          "company",
          "brief",
          "flags",
          "filings",
          "financials",
          "insiders"
        ]
      }
    }
  }
}