{
  "openapi": "3.1.0",
  "info": {
    "title": "x402-tools-hub",
    "description": "Agent Toolkit + AI Gateway + Alpha Scraper — 13 paid endpoints for AI agents.",
    "version": "1.0.0",
    "x-guidance": "Use POST requests with JSON body. Each endpoint returns structured data. Payment via x402 protocol on Base chain."
  },
  "servers": [{ "url": "https://x402-tools-hub.vercel.app" }],
  "paths": {
    "/api/url-to-text": {
      "post": {
        "tags": ["Agent Toolkit"],
        "summary": "Scrape URL and return clean text",
        "x-payment-info": { "description": "Scrape URL and return clean text", "price": "$0.05", "network": "eip155:8453" },
        "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "url": { "type": "string", "description": "URL to scrape" } } } } } },
        "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object" } } } } } }, "402": { "description": "Payment required" } }
      }
    },
    "/api/json-transform": {
      "post": {
        "tags": ["Agent Toolkit"],
        "summary": "Transform JSON data",
        "x-payment-info": { "description": "Transform JSON: filter, pick, flatten", "price": "$0.05", "network": "eip155:8453" },
        "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object" } } } },
        "responses": { "200": { "description": "Success" }, "402": { "description": "Payment required" } }
      }
    },
    "/api/csv-parse": {
      "post": {
        "tags": ["Agent Toolkit"],
        "summary": "Parse CSV to JSON",
        "x-payment-info": { "description": "Parse CSV text into structured JSON", "price": "$0.05", "network": "eip155:8453" },
        "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object" } } } },
        "responses": { "200": { "description": "Success" }, "402": { "description": "Payment required" } }
      }
    },
    "/api/text-stats": {
      "post": {
        "tags": ["Agent Toolkit"],
        "summary": "Text statistics",
        "x-payment-info": { "description": "Text statistics: word count, reading time", "price": "$0.05", "network": "eip155:8453" },
        "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object" } } } },
        "responses": { "200": { "description": "Success" }, "402": { "description": "Payment required" } }
      }
    },
    "/api/hash-generate": {
      "post": {
        "tags": ["Agent Toolkit"],
        "summary": "Generate hash",
        "x-payment-info": { "description": "Generate hash (MD5, SHA256, SHA512)", "price": "$0.05", "network": "eip155:8453" },
        "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object" } } } },
        "responses": { "200": { "description": "Success" }, "402": { "description": "Payment required" } }
      }
    },
    "/api/summarize": {
      "post": {
        "tags": ["AI Gateway"],
        "summary": "Summarize text with Gemini AI",
        "x-payment-info": { "description": "Summarize text using Gemini AI", "price": "$0.05", "network": "eip155:8453" },
        "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "text": { "type": "string" } } } } } },
        "responses": { "200": { "description": "Success" }, "402": { "description": "Payment required" } }
      }
    },
    "/api/translate": {
      "post": {
        "tags": ["AI Gateway"],
        "summary": "Translate text",
        "x-payment-info": { "description": "Translate text to target language", "price": "$0.05", "network": "eip155:8453" },
        "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object" } } } },
        "responses": { "200": { "description": "Success" }, "402": { "description": "Payment required" } }
      }
    },
    "/api/sentiment": {
      "post": {
        "tags": ["AI Gateway"],
        "summary": "Analyze sentiment",
        "x-payment-info": { "description": "Analyze sentiment with confidence score", "price": "$0.05", "network": "eip155:8453" },
        "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object" } } } },
        "responses": { "200": { "description": "Success" }, "402": { "description": "Payment required" } }
      }
    },
    "/api/extract-keywords": {
      "post": {
        "tags": ["AI Gateway"],
        "summary": "Extract keywords",
        "x-payment-info": { "description": "Extract top 10 keywords from text", "price": "$0.05", "network": "eip155:8453" },
        "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object" } } } },
        "responses": { "200": { "description": "Success" }, "402": { "description": "Payment required" } }
      }
    },
    "/api/code-explain": {
      "post": {
        "tags": ["AI Gateway"],
        "summary": "Explain code",
        "x-payment-info": { "description": "Explain code snippet in plain English", "price": "$0.08", "network": "eip155:8453" },
        "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object" } } } },
        "responses": { "200": { "description": "Success" }, "402": { "description": "Payment required" } }
      }
    },
    "/api/airdrops/active": {
      "post": {
        "tags": ["Alpha Scraper"],
        "summary": "Active airdrops",
        "x-payment-info": { "description": "Active airdrop lists and tasks", "price": "$0.08", "network": "eip155:8453" },
        "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object" } } } },
        "responses": { "200": { "description": "Success" }, "402": { "description": "Payment required" } }
      }
    },
    "/api/smart-money/transfers": {
      "post": {
        "tags": ["Alpha Scraper"],
        "summary": "Smart money transfers",
        "x-payment-info": { "description": "Smart-money wallet transfers on Base", "price": "$0.10", "network": "eip155:8453" },
        "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object" } } } },
        "responses": { "200": { "description": "Success" }, "402": { "description": "Payment required" } }
      }
    },
    "/api/gas/recommendation": {
      "post": {
        "tags": ["Alpha Scraper"],
        "summary": "Gas fee recommendation",
        "x-payment-info": { "description": "Real-time optimal gas fee recommendation", "price": "$0.05", "network": "eip155:8453" },
        "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object" } } } },
        "responses": { "200": { "description": "Success" }, "402": { "description": "Payment required" } }
      }
    }
  }
}