{
  "openapi": "3.1.0",
  "info": {
    "title": "Summarize",
    "version": "1.0.0",
    "description": "Text summarization for AI agents. Extractive summarization (TF-IDF + semantic ranking). Supports paragraph, bullet, and one-liner styles. 50+ languages.",
    "x-guidance": "Use POST /api/summarize with body {text, max_words, style}. Returns a shorter version of the input text.",
    "contact": {
      "email": "dev@desk.node01.org"
    }
  },
  "paths": {
    "/api/summarize": {
      "post": {
        "operationId": "summarize",
        "summary": "Summarize text",
        "tags": [
          "Summarization"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Text to summarize (max 50000 chars)"
                  },
                  "max_words": {
                    "type": "integer",
                    "description": "Max summary words (default 100)"
                  },
                  "style": {
                    "type": "string",
                    "enum": [
                      "paragraph",
                      "bullet",
                      "one-liner"
                    ],
                    "description": "Summary style"
                  }
                },
                "required": [
                  "text"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Summary"
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "operationId": "health",
        "summary": "Health check",
        "tags": [
          "Health"
        ],
        "responses": {
          "200": {
            "description": "Service health"
          }
        },
        "security": []
      }
    }
  }
}