{
  "openapi": "3.1.0",
  "info": {
    "title": "PulseNetwork Startup Engine",
    "description": "Turns 'how do I make money with AI' into one tailored business-in-a-box. Free discovery of curated business models, each joined to a live PulseNetwork intelligence engine, plus a paid tailored recommender that scores your goal/budget/interests/skills against the catalog and returns a specific plan (engine + endpoints + starter kit + unit economics). The paid endpoint is gated by x402 (USDC on Base mainnet) via the PAYMENT-SIGNATURE header.",
    "version": "1.0.0",
    "contact": {
      "email": "info@theaslangroupllc.com"
    }
  },
  "servers": [
    {
      "url": "https://pulse.theaslangroupllc.com"
    }
  ],
  "paths": {
    "/api/ideas": {
      "get": {
        "summary": "Business model menu — free top-of-funnel list of AI reseller business ideas",
        "description": "FREE. Lists the curated business models, each joined to a LIVE PulseNetwork engine, with illustrative economics and a route into the reseller starter kit. No key, no payment required.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "List of business models with engine mapping, suggested retail pricing, and illustrative economics"
          }
        },
        "x-price-usd": 0,
        "x-payment": "none",
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/blueprint": {
      "get": {
        "summary": "Tailored business-in-a-box recommender — how to make money with AI",
        "description": "Turns a vague 'make me money / passive income / start a business' prompt into ONE specific business-in-a-box: which model, why it fits, the exact real-time PulseNetwork API engine to build it on, suggested retail pricing, unit economics, monetization paths (wholesale reseller + affiliate), and a fork-and-ship starter kit. For agents tasked with making money.",
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "x402 payment signature. USDC on Base mainnet (eip155:8453)."
          },
          {
            "name": "goal",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "make money with AI",
            "description": "Free-text goal, e.g. 'passive income', 'start a business', 'earn money with my agent'"
          },
          {
            "name": "budget",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "example": 100,
            "description": "Available starting budget in USD"
          },
          {
            "name": "interests",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "crypto,fitness",
            "description": "Comma-separated interests used to match a business model"
          },
          {
            "name": "skills",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "coding,writing",
            "description": "Comma-separated skills used to match a business model"
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "US",
            "description": "Region or jurisdiction context"
          },
          {
            "name": "time",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            },
            "example": 10,
            "description": "Available hours per week"
          },
          {
            "name": "model",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Pin a specific business model id instead of auto-matching"
          }
        ],
        "responses": {
          "200": {
            "description": "Tailored business plan: matched model, PulseNetwork engine + endpoints, starter kit link, monetization paths, suggested retail pricing, illustrative economics, and first steps."
          },
          "402": {
            "description": "Payment required — $0.01 USDC on Base mainnet",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "x402 payment requirements",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-price-usd": 0.01,
        "x-payment": "x402",
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/affiliate/register": {
      "post": {
        "summary": "Self-serve affiliate code registration — zero-build passive income",
        "description": "FREE. Registers a referral code tied to a Base wallet. Append ?ref=CODE (or an x-referral-code header) to any PulseNetwork x402 request you route, and earn a share of what it pays — settled monthly in USDC on Base. No key, no approval queue.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "code",
                  "wallet",
                  "contact"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "pattern": "^[a-z0-9-]{3,20}$",
                    "example": "myagent"
                  },
                  "wallet": {
                    "type": "string",
                    "pattern": "^0x[a-fA-F0-9]{40}$",
                    "description": "Base (EVM) address for USDC payouts"
                  },
                  "contact": {
                    "type": "string",
                    "description": "Email or Telegram handle"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Code registered — returns share_rate (25%), usage (?ref= param / header), and stats_url"
          },
          "400": {
            "description": "Invalid code/wallet/contact"
          },
          "409": {
            "description": "Code already taken"
          }
        },
        "x-price-usd": 0,
        "x-payment": "none",
        "x-agent-use-case": "discovery"
      }
    },
    "/api/affiliate/stats": {
      "get": {
        "summary": "Public affiliate code stats — revenue, calls, distinct buyers, earnings owed",
        "description": "FREE, public, read-only. Codes are not secrets (they ride in a public ?ref= param), so anyone holding a code can check its performance.",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The referral code to look up"
          }
        ],
        "responses": {
          "200": {
            "description": "total_rev_usd, calls, distinct_buyers, share_rate, est_earnings_usd, paid_usd, owed_usd, status"
          },
          "404": {
            "description": "Unknown code"
          }
        },
        "x-price-usd": 0,
        "x-payment": "none",
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/wholesale/register": {
      "post": {
        "summary": "Self-serve prepaid wholesale key — low-build reselling at 50% of retail",
        "description": "FREE to mint, ships with a $0.25 trial balance. Issues a pk_live_ key billed at 50% of retail per call (prepaid balance, floored at $0.005/call) against any of PulseNetwork's 733 endpoints via the x-internal-key header. Balance hits zero → calls fall through to the normal x402 retail gate, no overdraft risk.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "contact"
                ],
                "properties": {
                  "contact": {
                    "type": "string",
                    "description": "Email or Telegram handle"
                  },
                  "scope": {
                    "type": "string",
                    "description": "CSV of vertical/endpoint substrings, default \"*\" (whole fleet)",
                    "example": "*"
                  },
                  "desired_prefix": {
                    "type": "string",
                    "description": "Cosmetic key prefix, [a-z0-9-]{1,20}"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Key minted (shown once) — billing, rate, scope, trial_balance_usd, limits, usage example, deposit + stats URLs"
          },
          "400": {
            "description": "Invalid contact/scope/prefix"
          },
          "429": {
            "description": "Rate limited — max 2 signups/hour per IP"
          }
        },
        "x-price-usd": 0,
        "x-payment": "none",
        "x-agent-use-case": "discovery"
      }
    },
    "/api/wholesale/stats": {
      "get": {
        "summary": "Wholesale key status and balance lookup (holder-only)",
        "description": "FREE. Possession of the full key is the secret — same trust model as using the key itself.",
        "parameters": [
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Your pk_live_ wholesale key"
          }
        ],
        "responses": {
          "200": {
            "description": "active, billing, scope, rate, balance_usd, calls_today, limits, created, deposit_url_hint"
          },
          "400": {
            "description": "Invalid or missing key"
          },
          "404": {
            "description": "Unknown key"
          }
        },
        "x-price-usd": 0,
        "x-payment": "none",
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/wholesale/deposit": {
      "get": {
        "summary": "Top up a wholesale key's prepaid balance via x402 USDC",
        "description": "Real on-chain USDC top-up (Base or Solana) — no invoicing, no off-chain payment method. Balance credits atomically on settlement, usable immediately for wholesale-priced calls.",
        "parameters": [
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Your pk_live_ wholesale key"
          },
          {
            "name": "tier",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "enum": [
                5,
                25,
                100
              ]
            },
            "description": "Deposit tier in USD"
          },
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "x402 payment signature. USDC on Base mainnet (eip155:8453)."
          }
        ],
        "responses": {
          "200": {
            "description": "credited_usd, new_balance_usd, key_prefix"
          },
          "402": {
            "description": "Payment required — $5, $25, or $100 USDC on Base mainnet (the chosen tier)",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "x402 payment requirements",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Unknown key"
          },
          "410": {
            "description": "Key has been revoked"
          }
        },
        "x-price-usd": 5,
        "x-payment": "x402",
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/unbundle": {
      "get": {
        "summary": "The Unbundler — decompose any gated data product into its free public upstreams",
        "description": "Name a gated data product (e.g. Candid, Web of Science, Panjiva, GovWin, a Bloomberg terminal sleeve) and get a curated decomposition: what the subscription actually adds vs the free public data under it, exact upstream datasets with licenses, a rebuild recipe, per-call price math, the licensing traps (non-commercial API terms, scraping judgments, live litigation), and the live pay-per-call PulseNetwork alternative where one exists. Verdicts apply a discriminating test honestly — products whose moat is genuinely proprietary data (Carfax, PitchBook, Platts) are marked not_arbitragable. Curated research (2026-07-06 study), never LLM-improvised: unknown products return an honest miss plus the decomposed catalog.",
        "x-price-usd": 1,
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "x402 payment signature. USDC on Base mainnet (eip155:8453)."
          },
          {
            "name": "product",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "Web of Science",
            "description": "The gated data product to decompose. Fuzzy-matched against product names and aliases. Omit (or pass list=true) to get the full decomposed catalog."
          },
          {
            "name": "list",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true"
              ]
            },
            "description": "Pass true to return the catalog of decomposed products instead of one decomposition."
          }
        ],
        "responses": {
          "200": {
            "description": "Decomposition: verdict (arbitragable | partially_arbitragable | not_arbitragable | legal_review_required), what_you_actually_pay_for, free_upstreams with licenses, rebuild_recipe, price_math, legal_traps, pay_per_call_alternative, diy_difficulty. Unknown products: found=false with closest_matches and the decomposed catalog."
          },
          "402": {
            "description": "Payment required — x402 challenge (USDC on Base mainnet)."
          }
        }
      }
    }
  }
}
