{
  "openapi": "3.1.0",
  "info": {
    "title": "Numetal launch router",
    "version": "0.1.0",
    "description": "x402 amount 0 on Base USDC. Bare POST → 402. Agents retry with PAYMENT-SIGNATURE and call for $0. User signs deploys. No broadcast."
  },
  "servers": [
    {
      "url": "https://launch.numetal.xyz"
    }
  ],
  "security": [
    {
      "x402": []
    }
  ],
  "components": {
    "securitySchemes": {
      "x402": {
        "type": "apiKey",
        "in": "header",
        "name": "PAYMENT-SIGNATURE",
        "description": "x402 v2. Bare request returns 402 with PAYMENT-REQUIRED (amount 0). Retry with PAYMENT-SIGNATURE or X-Payment. $0 — no on-chain transfer."
      }
    }
  },
  "paths": {
    "/mcp": {
      "post": {
        "operationId": "mcp",
        "summary": "MCP JSON-RPC 2.0. x402 amount 0. Bare POST → 402, then retry with payment header.",
        "security": [
          {
            "x402": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC result"
          },
          "402": {
            "description": "x402 v2 Payment Required, amount 0. PAYMENT-REQUIRED is base64(JSON). Sign $0 and retry with PAYMENT-SIGNATURE (or X-Payment)."
          }
        }
      }
    },
    "/api/v1/list_pads": {
      "post": {
        "operationId": "list_pads",
        "summary": "List every pad in the matrix (wired + unproven) with chains, notes, and howToSign. Same matrix the Mini App uses. Call this first.",
        "security": [
          {
            "x402": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "ok"
          },
          "402": {
            "description": "x402 v2 Payment Required, amount 0. PAYMENT-REQUIRED is base64(JSON). Sign $0 and retry with PAYMENT-SIGNATURE (or X-Payment)."
          }
        }
      }
    },
    "/api/v1/list_networks": {
      "post": {
        "operationId": "list_networks",
        "summary": "Union of chain IDs the pads actually list. We do not invent networks.",
        "security": [
          {
            "x402": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "ok"
          },
          "402": {
            "description": "x402 v2 Payment Required, amount 0. PAYMENT-REQUIRED is base64(JSON). Sign $0 and retry with PAYMENT-SIGNATURE (or X-Payment)."
          }
        }
      }
    },
    "/api/v1/get_capabilities": {
      "post": {
        "operationId": "get_capabilities",
        "summary": "Knobs, forbidden fields, chains, status, and howToSign for one pad. Same as the Mini App. Stock pairing is Pons only.",
        "security": [
          {
            "x402": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pad": {
                    "type": "string",
                    "description": "Pad id from list_pads (clanker, bankr, poolsfun, …)"
                  }
                },
                "required": [
                  "pad"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "ok"
          },
          "402": {
            "description": "x402 v2 Payment Required, amount 0. PAYMENT-REQUIRED is base64(JSON). Sign $0 and retry with PAYMENT-SIGNATURE (or X-Payment)."
          }
        }
      }
    },
    "/api/v1/draft_intent": {
      "post": {
        "operationId": "draft_intent",
        "summary": "Validate a LaunchIntent against the matrix. Returns warnings for ignored knobs; errors for unproven pads / forbidden stock pairs.",
        "security": [
          {
            "x402": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "intent": {
                    "type": "object",
                    "description": "LaunchIntent: name, symbol, chainId, pad, creator (0x). Optional knobs per get_capabilities. Never salt. Never RH_STOCK except pad=pons."
                  }
                },
                "required": [
                  "intent"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "ok"
          },
          "402": {
            "description": "x402 v2 Payment Required, amount 0. PAYMENT-REQUIRED is base64(JSON). Sign $0 and retry with PAYMENT-SIGNATURE (or X-Payment)."
          }
        }
      }
    },
    "/api/v1/simulate_launch": {
      "post": {
        "operationId": "simulate_launch",
        "summary": "Build the pad-sign payload (same object as Mini App Simulate and get_sign_payload). Does not broadcast. No keys.",
        "security": [
          {
            "x402": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "intent": {
                    "type": "object",
                    "description": "LaunchIntent: name, symbol, chainId, pad, creator (0x). Optional knobs per get_capabilities. Never salt. Never RH_STOCK except pad=pons."
                  }
                },
                "required": [
                  "intent"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "ok"
          },
          "402": {
            "description": "x402 v2 Payment Required, amount 0. PAYMENT-REQUIRED is base64(JSON). Sign $0 and retry with PAYMENT-SIGNATURE (or X-Payment)."
          }
        }
      }
    },
    "/api/v1/get_sign_payload": {
      "post": {
        "operationId": "get_sign_payload",
        "summary": "Same pad-sign payload the Mini App Sign uses. Clanker = SDK deploy() config. Bankr = POST body + liveBody + howToSign (user's bk_usr_ key on their machine; this origin never sees it). pools.fun = PartyFactory.launch tx. Never a REST argument this origin posts with a hot key.",
        "security": [
          {
            "x402": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "intent": {
                    "type": "object",
                    "description": "LaunchIntent: name, symbol, chainId, pad, creator (0x). Optional knobs per get_capabilities. Never salt. Never RH_STOCK except pad=pons."
                  }
                },
                "required": [
                  "intent"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "ok"
          },
          "402": {
            "description": "x402 v2 Payment Required, amount 0. PAYMENT-REQUIRED is base64(JSON). Sign $0 and retry with PAYMENT-SIGNATURE (or X-Payment)."
          }
        }
      }
    },
    "/api/v1/check_bankr_split": {
      "post": {
        "operationId": "check_bankr_split",
        "summary": "Same 57% split check the Mini App runs before a Bankr live POST. Pass feeDistribution from a simulate response. Refuses partner shares. No keys.",
        "security": [
          {
            "x402": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "feeDistribution": {
                    "type": "object",
                    "description": "Bankr feeDistribution (flat bps or nested { bps }). Expected 5700/3610/190/500."
                  }
                },
                "required": [
                  "feeDistribution"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "ok"
          },
          "402": {
            "description": "x402 v2 Payment Required, amount 0. PAYMENT-REQUIRED is base64(JSON). Sign $0 and retry with PAYMENT-SIGNATURE (or X-Payment)."
          }
        }
      }
    }
  }
}