{
  "openapi": "3.1.0",
  "info": {
    "title": "Octopus SEC Form D & Crypto-ETF Intelligence",
    "version": "2.0.0",
    "description": "Real-time SEC EDGAR Form D & D/A operating-startup intelligence and Crypto-ETF / Digital-Asset Treasury filings API + Remote MCP server. Automatically strips Pooled Investment Funds & SPVs. Permissionless payment via PayAI x402 v2, direct Solana Mainnet tx-proof (SOL/USDT/USDC), or prepaid credit-pack API keys."
  },
  "servers": [
    {
      "url": "https://sec-formd-intel.nguyenthanhnam-pye.workers.dev"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "Health, KV bindings, and live Solana/x402 rail readiness",
        "responses": {
          "200": {
            "description": "Service health and active payment rail configuration"
          }
        }
      }
    },
    "/.well-known/x402.json": {
      "get": {
        "summary": "Machine-readable x402 v2 and Solana payment discovery manifest",
        "responses": {
          "200": {
            "description": "x402 discovery manifest"
          }
        }
      }
    },
    "/.well-known/mcp/server-card.json": {
      "get": {
        "summary": "Remote MCP Streamable HTTP server card with tool schemas and pricing",
        "responses": {
          "200": {
            "description": "MCP server card"
          }
        }
      }
    },
    "/v1/preview": {
      "get": {
        "summary": "Free rate-limited preview (20/day/IP) returning up to 5 cleaned operating-company Form D filings",
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Optional 2-letter US state code"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5,
              "default": 5
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Up to 5 recent operating-company Form D filings"
          },
          "429": {
            "description": "Daily preview rate limit exceeded"
          }
        }
      }
    },
    "/v1/crypto-etf/preview": {
      "get": {
        "summary": "Free rate-limited preview (20/day/IP) of up to 5 recent SEC Crypto-ETF & Digital-Asset Treasury filings",
        "parameters": [
          {
            "name": "asset",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Optional asset filter (BTC, ETH, SOL, XRP, MULTI_CRYPTO)"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5,
              "default": 5
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Up to 5 recent crypto-ETF filings"
          },
          "429": {
            "description": "Daily preview rate limit exceeded"
          }
        }
      }
    },
    "/v1/filings": {
      "get": {
        "summary": "Paid search of structured SEC EDGAR Form D / D/A filings",
        "description": "Requires $0.05 USD via x402 PAYMENT-SIGNATURE, X-Solana-Tx, or X-API-Key.",
        "x-payment-info": {
          "protocols": [
            "x402",
            "solana-tx-proof",
            "api-key"
          ],
          "x402Version": 2,
          "pricingMode": "fixed",
          "price": "$0.05",
          "priceUsd": 0.05,
          "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
          "payTo": "CU3jGXaBX3TLR24iY9SPcoFWbg5vKpyFKQMjuk9DFckt",
          "facilitator": "https://facilitator.payai.network",
          "fallbackFacilitator": "https://x402.dexter.cash",
          "feePayer": "CjNFTjvBhbJJd2B5ePPMHRLx1ELZpa8dwQgGL727eKww",
          "assets": [
            {
              "symbol": "USDT",
              "mint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
              "ata": "B3wn5B19BwAyV2Zeimb5nQKNEHqyzeebJ5WbG12AanTo",
              "amountAtomic": "50000",
              "decimals": 6
            }
          ],
          "directSolanaAssets": [
            "USDT",
            "USDC",
            "SOL"
          ]
        },
        "parameters": [
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "minAmountSold",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "maxAmountSold",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "industry",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "excludeFunds",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "includeSpvs",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "formType",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "D",
                "D/A"
              ],
              "default": "all"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25,
              "default": 10
            }
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "jsonl",
                "csv"
              ],
              "default": "json"
            }
          },
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "x402 v2 payment signature payload (base64 JSON)"
          },
          {
            "name": "X-PAYMENT",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Legacy x402 v1 payment header"
          },
          {
            "name": "X-Solana-Tx",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Confirmed Solana Mainnet transaction signature (SOL, USDT, or USDC)"
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Prepaid API key redeemed via POST /v1/keys/redeem"
          }
        ],
        "responses": {
          "200": {
            "description": "Normalized Form D filings"
          },
          "402": {
            "description": "Payment Required — x402 v2 PAYMENT-REQUIRED header + Solana tx-proof instructions"
          }
        }
      }
    },
    "/v1/filings/{accession}": {
      "get": {
        "summary": "Paid single Form D / D/A filing lookup by accession number",
        "x-payment-info": {
          "protocols": [
            "x402",
            "solana-tx-proof",
            "api-key"
          ],
          "x402Version": 2,
          "pricingMode": "fixed",
          "price": "$0.05",
          "priceUsd": 0.05,
          "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
          "payTo": "CU3jGXaBX3TLR24iY9SPcoFWbg5vKpyFKQMjuk9DFckt",
          "facilitator": "https://facilitator.payai.network",
          "fallbackFacilitator": "https://x402.dexter.cash",
          "feePayer": "CjNFTjvBhbJJd2B5ePPMHRLx1ELZpa8dwQgGL727eKww",
          "assets": [
            {
              "symbol": "USDT",
              "mint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
              "ata": "B3wn5B19BwAyV2Zeimb5nQKNEHqyzeebJ5WbG12AanTo",
              "amountAtomic": "50000",
              "decimals": 6
            }
          ],
          "directSolanaAssets": [
            "USDT",
            "USDC",
            "SOL"
          ]
        },
        "parameters": [
          {
            "name": "accession",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "SEC accession number (NNNNNNNNNN-NN-NNNNNN)"
          },
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "x402 v2 payment signature payload (base64 JSON)"
          },
          {
            "name": "X-PAYMENT",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Legacy x402 v1 payment header"
          },
          {
            "name": "X-Solana-Tx",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Confirmed Solana Mainnet transaction signature (SOL, USDT, or USDC)"
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Prepaid API key redeemed via POST /v1/keys/redeem"
          }
        ],
        "responses": {
          "200": {
            "description": "Parsed Form D record"
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/v1/startups": {
      "get": {
        "summary": "Paid curated Operating-Startup Form D feed (excludes funds and SPVs)",
        "x-payment-info": {
          "protocols": [
            "x402",
            "solana-tx-proof",
            "api-key"
          ],
          "x402Version": 2,
          "pricingMode": "fixed",
          "price": "$0.05",
          "priceUsd": 0.05,
          "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
          "payTo": "CU3jGXaBX3TLR24iY9SPcoFWbg5vKpyFKQMjuk9DFckt",
          "facilitator": "https://facilitator.payai.network",
          "fallbackFacilitator": "https://x402.dexter.cash",
          "feePayer": "CjNFTjvBhbJJd2B5ePPMHRLx1ELZpa8dwQgGL727eKww",
          "assets": [
            {
              "symbol": "USDT",
              "mint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
              "ata": "B3wn5B19BwAyV2Zeimb5nQKNEHqyzeebJ5WbG12AanTo",
              "amountAtomic": "50000",
              "decimals": 6
            }
          ],
          "directSolanaAssets": [
            "USDT",
            "USDC",
            "SOL"
          ]
        },
        "parameters": [
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "minAmountSold",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "industry",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25,
              "default": 10
            }
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "jsonl",
                "csv"
              ],
              "default": "json"
            }
          },
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "x402 v2 payment signature payload (base64 JSON)"
          },
          {
            "name": "X-PAYMENT",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Legacy x402 v1 payment header"
          },
          {
            "name": "X-Solana-Tx",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Confirmed Solana Mainnet transaction signature (SOL, USDT, or USDC)"
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Prepaid API key redeemed via POST /v1/keys/redeem"
          }
        ],
        "responses": {
          "200": {
            "description": "Operating-startup Form D filings"
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/v1/company/{cik}": {
      "get": {
        "summary": "Paid normalized Form D history and chronological raise deltas for a CIK",
        "x-payment-info": {
          "protocols": [
            "x402",
            "solana-tx-proof",
            "api-key"
          ],
          "x402Version": 2,
          "pricingMode": "fixed",
          "price": "$0.05",
          "priceUsd": 0.05,
          "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
          "payTo": "CU3jGXaBX3TLR24iY9SPcoFWbg5vKpyFKQMjuk9DFckt",
          "facilitator": "https://facilitator.payai.network",
          "fallbackFacilitator": "https://x402.dexter.cash",
          "feePayer": "CjNFTjvBhbJJd2B5ePPMHRLx1ELZpa8dwQgGL727eKww",
          "assets": [
            {
              "symbol": "USDT",
              "mint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
              "ata": "B3wn5B19BwAyV2Zeimb5nQKNEHqyzeebJ5WbG12AanTo",
              "amountAtomic": "50000",
              "decimals": 6
            }
          ],
          "directSolanaAssets": [
            "USDT",
            "USDC",
            "SOL"
          ]
        },
        "parameters": [
          {
            "name": "cik",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 30,
              "default": 15
            }
          },
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "x402 v2 payment signature payload (base64 JSON)"
          },
          {
            "name": "X-PAYMENT",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Legacy x402 v1 payment header"
          },
          {
            "name": "X-Solana-Tx",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Confirmed Solana Mainnet transaction signature (SOL, USDT, or USDC)"
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Prepaid API key redeemed via POST /v1/keys/redeem"
          }
        ],
        "responses": {
          "200": {
            "description": "Normalized company Form D history with raise deltas"
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/v1/crypto-etf": {
      "get": {
        "summary": "Paid Crypto-ETF & Digital-Asset Treasury SEC Filings feed (S-1, 19b-4, 8-K, 424B3, N-1A)",
        "x-payment-info": {
          "protocols": [
            "x402",
            "solana-tx-proof",
            "api-key"
          ],
          "x402Version": 2,
          "pricingMode": "fixed",
          "price": "$0.15",
          "priceUsd": 0.15,
          "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
          "payTo": "CU3jGXaBX3TLR24iY9SPcoFWbg5vKpyFKQMjuk9DFckt",
          "facilitator": "https://facilitator.payai.network",
          "fallbackFacilitator": "https://x402.dexter.cash",
          "feePayer": "CjNFTjvBhbJJd2B5ePPMHRLx1ELZpa8dwQgGL727eKww",
          "assets": [
            {
              "symbol": "USDT",
              "mint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
              "ata": "B3wn5B19BwAyV2Zeimb5nQKNEHqyzeebJ5WbG12AanTo",
              "amountAtomic": "150000",
              "decimals": 6
            }
          ],
          "directSolanaAssets": [
            "USDT",
            "USDC",
            "SOL"
          ]
        },
        "parameters": [
          {
            "name": "asset",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "BTC, ETH, SOL, XRP, MULTI_CRYPTO, ALTCOIN, DIGITAL_ASSET_TREASURY"
          },
          {
            "name": "forms",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 15
            }
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "jsonl",
                "csv"
              ],
              "default": "json"
            }
          },
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "x402 v2 payment signature payload (base64 JSON)"
          },
          {
            "name": "X-PAYMENT",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Legacy x402 v1 payment header"
          },
          {
            "name": "X-Solana-Tx",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Confirmed Solana Mainnet transaction signature (SOL, USDT, or USDC)"
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Prepaid API key redeemed via POST /v1/keys/redeem"
          }
        ],
        "responses": {
          "200": {
            "description": "Structured crypto ETF and digital-asset treasury SEC filings"
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/v1/packs/operating-startups-90d": {
      "get": {
        "summary": "90-day Operating-Startup Form D Snapshot Pack (JSON, JSONL, or CSV export)",
        "x-payment-info": {
          "protocols": [
            "x402",
            "solana-tx-proof",
            "api-key"
          ],
          "x402Version": 2,
          "pricingMode": "fixed",
          "price": "$0.15",
          "priceUsd": 0.15,
          "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
          "payTo": "CU3jGXaBX3TLR24iY9SPcoFWbg5vKpyFKQMjuk9DFckt",
          "facilitator": "https://facilitator.payai.network",
          "fallbackFacilitator": "https://x402.dexter.cash",
          "feePayer": "CjNFTjvBhbJJd2B5ePPMHRLx1ELZpa8dwQgGL727eKww",
          "assets": [
            {
              "symbol": "USDT",
              "mint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
              "ata": "B3wn5B19BwAyV2Zeimb5nQKNEHqyzeebJ5WbG12AanTo",
              "amountAtomic": "150000",
              "decimals": 6
            }
          ],
          "directSolanaAssets": [
            "USDT",
            "USDC",
            "SOL"
          ]
        },
        "parameters": [
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "jsonl",
                "csv"
              ],
              "default": "json"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25,
              "default": 25
            }
          },
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "x402 v2 payment signature payload (base64 JSON)"
          },
          {
            "name": "X-PAYMENT",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Legacy x402 v1 payment header"
          },
          {
            "name": "X-Solana-Tx",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Confirmed Solana Mainnet transaction signature (SOL, USDT, or USDC)"
          },
          {
            "name": "X-API-Key",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Prepaid API key redeemed via POST /v1/keys/redeem"
          }
        ],
        "responses": {
          "200": {
            "description": "90-day cleaned operating-startup Form D snapshot pack"
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/v1/keys/redeem": {
      "post": {
        "summary": "Redeem a confirmed Solana Mainnet tx (SOL, USDT, or USDC) for a KV-backed API key pack",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "signature"
                ],
                "properties": {
                  "signature": {
                    "type": "string",
                    "description": "Confirmed Solana Mainnet transaction signature"
                  },
                  "tier": {
                    "type": "string",
                    "enum": [
                      "starter",
                      "builder",
                      "snapshot_90d",
                      "pro_30d"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "API key issued with remaining calls and tier entitlements"
          },
          "400": {
            "description": "Malformed request or invalid signature"
          },
          "402": {
            "description": "Payment verification failed or underpaid"
          },
          "409": {
            "description": "Transaction signature already redeemed"
          }
        }
      }
    },
    "/v1/keys/status": {
      "get": {
        "summary": "Check remaining calls and tier status for an API key without consuming quota",
        "parameters": [
          {
            "name": "X-API-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API key quota and entitlements"
          },
          "401": {
            "description": "Missing or invalid API key"
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "summary": "Streamable HTTP JSON-RPC 2.0 Remote MCP Server (x402 v2 MCP Transport compliant)",
        "responses": {
          "200": {
            "description": "JSON-RPC 2.0 response (paid tool challenges return isError: true + structuredContent PaymentRequired)"
          }
        }
      }
    }
  }
}