{
  "openapi": "3.1.0",
  "info": {
    "title": "MoonCloser AI",
    "version": "1.1.0",
    "description": "Pay-per-call sales prospect intelligence for humans and autonomous agents. Tool Registry #785 on Base."
  },
  "servers": [
    { "url": "https://mooncloser-ai.floot.app" }
  ],
  "paths": {
    "/_api/score-lead-paid": {
      "post": {
        "operationId": "scoreLead",
        "summary": "Score a sales lead",
        "description": "Fast sales qualification for agent loops. Costs 0.01 USDC via x402 on Base.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": { "context": { "type": "string", "minLength": 20, "maxLength": 12000 } },
                "required": ["context"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Lead score" },
          "400": { "description": "Invalid input" },
          "402": { "description": "Payment required: 0.01 USDC on Base via x402" }
        },
        "x-payment-info": {
          "protocol": "x402",
          "priceUsd": 0.01,
          "network": "eip155:8453",
          "asset": "USDC",
          "payTo": "0xdc1ee414c89fd5ca2e8a5cd537406d27ea0181a6"
        }
      }
    },
    "/_api/analyze-prospect-paid": {
      "post": {
        "operationId": "analyzeProspect",
        "summary": "Analyze a sales prospect",
        "description": "Returns purchase intent, motive, objection, next move and a ready-to-send reply. Costs 0.25 USDC per successful call via x402 on Base.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "context": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 12000
                  }
                },
                "required": ["context"]
              },
              "example": {
                "context": "The prospect is interested, asked about price twice, and wants to discuss it with their partner tonight."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paid analysis result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "temperature": { "type": "string" },
                    "intent": { "type": "integer" },
                    "motive": { "type": "string" },
                    "objection": { "type": "string" },
                    "nextMove": { "type": "string" },
                    "message": { "type": "string" }
                  },
                  "required": ["temperature", "intent", "motive", "objection", "nextMove", "message"]
                }
              }
            }
          },
          "400": { "description": "Invalid input" },
          "402": { "description": "Payment required: 0.25 USDC on Base via x402" }
        },
        "x-payment-info": {
          "protocol": "x402",
          "priceUsd": 0.25,
          "network": "eip155:8453",
          "asset": "USDC",
          "assetAddress": "0x833589fcd6edb6e08f4c7c32d4f71b54bdA02913",
          "payTo": "0xdc1ee414c89fd5ca2e8a5cd537406d27ea0181a6"
        }
      }
    },
    "/_api/analyze-batch-paid": {
      "post": {
        "operationId": "analyzeProspectBatch",
        "summary": "Analyze up to 10 sales prospects",
        "description": "Full MoonCloser batch analysis for 2-10 leads. Costs 1.50 USDC via x402 on Base. Best value at 7-10 leads; for smaller sets, individual full analyses may cost less.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "contexts": {
                    "type": "array",
                    "minItems": 2,
                    "maxItems": 10,
                    "items": { "type": "string", "minLength": 20, "maxLength": 12000 }
                  }
                },
                "required": ["contexts"]
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Batch analysis results" },
          "400": { "description": "Invalid input" },
          "402": { "description": "Payment required: 1.50 USDC on Base via x402" }
        },
        "x-payment-info": {
          "protocol": "x402",
          "priceUsd": 1.5,
          "network": "eip155:8453",
          "asset": "USDC",
          "payTo": "0xdc1ee414c89fd5ca2e8a5cd537406d27ea0181a6"
        }
      }
    }
  }
}