{
  "openapi": "3.1.0",
  "info": {
    "title": "Arch Tools API",
    "version": "1.10.0",
    "description": "Production-ready API tools for developers and AI agents. Use one API key across the platform or pay with x402 USDC micropayments.",
    "contact": {
      "url": "https://archtools.dev",
      "email": "support@archtools.dev"
    }
  },
  "servers": [
    {
      "url": "https://archtools.dev"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    }
  },
  "paths": {
    "/v1/tools/validate-data": {
      "post": {
        "operationId": "validateData",
        "summary": "Validate JSON against a JSON Schema",
        "tags": [
          "Utility"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "data",
                  "schema"
                ],
                "properties": {
                  "data": {
                    "description": "The JSON data to validate"
                  },
                  "schema": {
                    "type": "object",
                    "description": "JSON Schema to validate against"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Validation result with errors if any"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/generate-hash": {
      "post": {
        "operationId": "generateHash",
        "summary": "Generate cryptographic hashes (sha256/sha512/md5)",
        "tags": [
          "Utility"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Text to hash"
                  },
                  "algorithm": {
                    "type": "string",
                    "enum": [
                      "sha256",
                      "sha512",
                      "md5",
                      "sha1"
                    ],
                    "default": "sha256"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Hashed value"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/qr-code": {
      "post": {
        "operationId": "qrCode",
        "summary": "Generate QR codes (PNG or SVG)",
        "tags": [
          "Utility"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Text or URL to encode"
                  },
                  "size": {
                    "type": "integer",
                    "default": 200,
                    "description": "Image size in pixels"
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "png",
                      "svg"
                    ],
                    "default": "png"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Base64 encoded QR code image"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/convert-format": {
      "post": {
        "operationId": "convertFormat",
        "summary": "Convert between JSON, YAML, CSV, XML",
        "tags": [
          "Utility"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "input",
                  "from",
                  "to"
                ],
                "properties": {
                  "input": {
                    "type": "string",
                    "description": "The content to convert (serialized as a string)"
                  },
                  "from": {
                    "type": "string",
                    "enum": [
                      "json",
                      "yaml",
                      "csv",
                      "xml",
                      "toml"
                    ],
                    "description": "Source format"
                  },
                  "to": {
                    "type": "string",
                    "enum": [
                      "json",
                      "yaml",
                      "csv",
                      "xml",
                      "toml"
                    ],
                    "description": "Target format"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Converted content"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/transform-text": {
      "post": {
        "operationId": "transformText",
        "summary": "Transform text (10 modes: slug, camel, base64\u2026)",
        "tags": [
          "Utility"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text",
                  "mode"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Text to transform"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "slug",
                      "camel",
                      "snake",
                      "pascal",
                      "kebab",
                      "upper",
                      "lower",
                      "title",
                      "base64_encode",
                      "base64_decode"
                    ],
                    "description": "Transformation mode"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Transformed text"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/extract-metadata": {
      "post": {
        "operationId": "extractMetadata",
        "summary": "Extract OG tags, word count, links from text or URLs",
        "tags": [
          "Web"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "URL to extract metadata from"
                  },
                  "text": {
                    "type": "string",
                    "description": "Raw text to analyze (alternative to url)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Metadata including OG tags, word count, and links"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/web-scrape": {
      "post": {
        "operationId": "webScrape",
        "summary": "Scrape any public URL with optional CSS selector",
        "tags": [
          "Web"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "URL to scrape"
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "markdown",
                      "html",
                      "text"
                    ],
                    "default": "markdown"
                  },
                  "selector": {
                    "type": "string",
                    "description": "CSS selector to extract specific element"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Scraped content"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.015"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/extract-page": {
      "post": {
        "operationId": "extractPage",
        "summary": "Clean text, links, and metadata from any webpage",
        "tags": [
          "Web"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "URL of the webpage to extract"
                  },
                  "include_links": {
                    "type": "boolean",
                    "default": true,
                    "description": "Include extracted links"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Clean text, links, and metadata from the page"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.015"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/search-web": {
      "post": {
        "operationId": "searchWeb",
        "summary": "Web search with structured results (DuckDuckGo)",
        "tags": [
          "Web"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "query"
                ],
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "Search query"
                  },
                  "limit": {
                    "type": "integer",
                    "default": 10,
                    "maximum": 20
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Search results"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.015"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/rss-parse": {
      "post": {
        "operationId": "rssParse",
        "summary": "Parse RSS/Atom feeds into structured JSON",
        "tags": [
          "Web"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "RSS or Atom feed URL"
                  },
                  "limit": {
                    "type": "integer",
                    "default": 20,
                    "description": "Maximum number of items to return"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Parsed feed items as structured JSON"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/ip-lookup": {
      "post": {
        "operationId": "ipLookup",
        "summary": "Geo, ISP, VPN/proxy detection",
        "tags": [
          "Web"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ip": {
                    "type": "string",
                    "description": "IP address (uses caller's IP if omitted)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Geolocation, ISP, and VPN/proxy detection data"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/whois-lookup": {
      "post": {
        "operationId": "whoisLookup",
        "summary": "Domain registration, expiry, nameservers via RDAP",
        "tags": [
          "Web"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "domain"
                ],
                "properties": {
                  "domain": {
                    "type": "string",
                    "description": "Domain name to look up (e.g. example.com)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Domain registration details, expiry, and nameservers"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/email-verify": {
      "post": {
        "operationId": "emailVerify",
        "summary": "MX check + disposable domain detection",
        "tags": [
          "Utility"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "description": "Email address to verify"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verification result with MX status and disposable flag"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/phone-validate": {
      "post": {
        "operationId": "phoneValidate",
        "summary": "E.164 format, type, country code",
        "tags": [
          "Utility"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "phone"
                ],
                "properties": {
                  "phone": {
                    "type": "string",
                    "description": "Phone number to validate"
                  },
                  "country": {
                    "type": "string",
                    "description": "ISO 3166-1 alpha-2 country code (e.g. US, GB)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Validated phone number in E.164 format with type and country"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/currency-convert": {
      "post": {
        "operationId": "currencyConvert",
        "summary": "170+ currencies with live rates",
        "tags": [
          "Utility"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount",
                  "from",
                  "to"
                ],
                "properties": {
                  "amount": {
                    "type": "number",
                    "description": "Amount to convert"
                  },
                  "from": {
                    "type": "string",
                    "description": "Source currency code (e.g. USD, EUR, GBP)"
                  },
                  "to": {
                    "type": "string",
                    "description": "Target currency code (e.g. EUR, JPY, BTC)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Converted amount with exchange rate"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/timezone-convert": {
      "post": {
        "operationId": "timezoneConvert",
        "summary": "Convert datetime between any two IANA timezones",
        "tags": [
          "Utility"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "datetime",
                  "from_tz",
                  "to_tz"
                ],
                "properties": {
                  "datetime": {
                    "type": "string",
                    "description": "ISO 8601 datetime to convert (e.g. 2024-01-15T14:30:00)"
                  },
                  "from_tz": {
                    "type": "string",
                    "description": "Source IANA timezone (e.g. America/New_York)"
                  },
                  "to_tz": {
                    "type": "string",
                    "description": "Target IANA timezone (e.g. Europe/London)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Converted datetime"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/generate-uuid": {
      "post": {
        "operationId": "generateUuid",
        "summary": "Generate UUIDs, tokens, and API-key-format strings",
        "tags": [
          "Utility"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "uuid",
                      "token",
                      "api-key"
                    ],
                    "default": "uuid",
                    "description": "Type of identifier to generate"
                  },
                  "count": {
                    "type": "integer",
                    "default": 1,
                    "description": "Number of identifiers to generate"
                  },
                  "length": {
                    "type": "integer",
                    "default": 32,
                    "description": "Length for token/api-key types"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Generated identifiers"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/diff-text": {
      "post": {
        "operationId": "diffText",
        "summary": "Structured diff in unified, words, chars, or JSON format",
        "tags": [
          "Utility"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text1",
                  "text2"
                ],
                "properties": {
                  "text1": {
                    "type": "string",
                    "description": "Original text"
                  },
                  "text2": {
                    "type": "string",
                    "description": "Modified text"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "unified",
                      "words",
                      "chars",
                      "json"
                    ],
                    "default": "unified",
                    "description": "Diff output format"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Structured diff output"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/readability-score": {
      "post": {
        "operationId": "readabilityScore",
        "summary": "Flesch-Kincaid readability and grade level",
        "tags": [
          "AI"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Text to analyze for readability"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Readability scores including Flesch-Kincaid grade level"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/language-detect": {
      "post": {
        "operationId": "languageDetect",
        "summary": "Detect language with confidence score (100+ languages)",
        "tags": [
          "AI"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Text to detect the language of"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Detected language with confidence score"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/sentiment-analysis": {
      "post": {
        "operationId": "sentimentAnalysis",
        "summary": "Sentiment + emotion detection (joy, anger, fear\u2026)",
        "tags": [
          "AI"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Text to analyze"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sentiment score and detected emotions"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.015"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/summarize": {
      "post": {
        "operationId": "summarize",
        "summary": "Summarize in 5 styles (bullets, tldr, executive\u2026)",
        "tags": [
          "AI"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Text to summarize"
                  },
                  "style": {
                    "type": "string",
                    "enum": [
                      "bullets",
                      "tldr",
                      "executive",
                      "paragraph",
                      "headline"
                    ],
                    "default": "bullets",
                    "description": "Summary style"
                  },
                  "max_length": {
                    "type": "integer",
                    "description": "Maximum summary length in words"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Summarized text in the requested style"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/extract-entities": {
      "post": {
        "operationId": "extractEntities",
        "summary": "NER: people, orgs, locations, dates, money",
        "tags": [
          "AI"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Text to extract entities from"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Extracted entities categorized by type"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.015"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/regex-generate": {
      "post": {
        "operationId": "regexGenerate",
        "summary": "Generate regex from plain English with explanations",
        "tags": [
          "AI"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "description"
                ],
                "properties": {
                  "description": {
                    "type": "string",
                    "description": "Plain English description of the pattern to match"
                  },
                  "test_strings": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Optional strings to test the generated regex against"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Generated regex pattern with explanation and test results"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.015"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/pii-detect": {
      "post": {
        "operationId": "piiDetect",
        "summary": "Detect and optionally redact PII",
        "tags": [
          "AI"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Text to scan for PII"
                  },
                  "redact": {
                    "type": "boolean",
                    "default": false,
                    "description": "Whether to return redacted version of the text"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Detected PII items with optional redacted text"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/web-search": {
      "post": {
        "operationId": "webSearch",
        "summary": "Real-time web search with AI-synthesized answer",
        "tags": [
          "Web"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "query"
                ],
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "Search query"
                  },
                  "limit": {
                    "type": "integer",
                    "default": 5,
                    "description": "Number of source results"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "AI-synthesized answer with source citations"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.025"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/ai-generate": {
      "post": {
        "operationId": "aiGenerate",
        "summary": "AI text generation via Claude",
        "tags": [
          "AI"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "prompt"
                ],
                "properties": {
                  "prompt": {
                    "type": "string",
                    "description": "The prompt or question"
                  },
                  "model": {
                    "type": "string",
                    "enum": [
                      "claude",
                      "gpt4",
                      "grok",
                      "gemini"
                    ],
                    "default": "claude",
                    "description": "AI model to use"
                  },
                  "system": {
                    "type": "string",
                    "description": "System prompt / persona"
                  },
                  "max_tokens": {
                    "type": "integer",
                    "default": 1024
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Generated text"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.04"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/ocr-extract": {
      "post": {
        "operationId": "ocrExtract",
        "summary": "Extract text from images (URL or base64)",
        "tags": [
          "AI"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "image_url": {
                    "type": "string",
                    "description": "Public URL of the image"
                  },
                  "image_base64": {
                    "type": "string",
                    "description": "Base64-encoded image (alternative to image_url)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Extracted text from image"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.015"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/browser-task": {
      "post": {
        "operationId": "browserTask",
        "summary": "Fetch a public page and extract its text or HTML, optionally by CSS selector (static HTML only: no JavaScript, clicking or typing)",
        "tags": [
          "Web"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Public page URL to fetch"
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "extract",
                      "html"
                    ],
                    "default": "extract",
                    "description": "extract = visible text, html = inner HTML of the selected element"
                  },
                  "selector": {
                    "type": "string",
                    "description": "Optional CSS selector (defaults to the page body)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Extracted text or HTML"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/extract-pdf": {
      "post": {
        "operationId": "extractPdf",
        "summary": "Extract text from a PDF (URL or base64; max 5MB / 50 pages per call)",
        "tags": [
          "AI"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pdf_url": {
                    "type": "string",
                    "description": "Public URL of the PDF (max 5MB / 50 pages per call \u2014 split larger documents into parts)"
                  },
                  "pdf_base64": {
                    "type": "string",
                    "description": "Base64-encoded PDF (alternative to pdf_url; same 5MB / 50-page limit applies)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Extracted PDF content"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.015"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/screenshot-capture": {
      "post": {
        "operationId": "screenshotCapture",
        "summary": "Get a page's title, description, Open Graph image and a text preview (metadata only; no rendered screenshot)",
        "tags": [
          "Web"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Public page URL"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Page title, description, Open Graph image, first heading and a text preview (no image)"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/html-to-markdown": {
      "post": {
        "operationId": "htmlToMarkdown",
        "summary": "Convert HTML content to clean Markdown",
        "tags": [
          "Utility"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "html"
                ],
                "properties": {
                  "html": {
                    "type": "string",
                    "description": "HTML content to convert"
                  },
                  "url": {
                    "type": "string",
                    "description": "URL to fetch and convert (alternative to html)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Converted Markdown text"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/url-shorten": {
      "post": {
        "operationId": "urlShorten",
        "summary": "Shorten a URL",
        "tags": [
          "Utility"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Long URL to shorten"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Shortened URL"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/webhook-send": {
      "post": {
        "operationId": "webhookSend",
        "summary": "POST a JSON payload to any webhook URL",
        "tags": [
          "Utility"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "webhook_url",
                  "payload"
                ],
                "properties": {
                  "webhook_url": {
                    "type": "string",
                    "description": "The webhook endpoint URL to POST to"
                  },
                  "payload": {
                    "type": "object",
                    "description": "JSON body to send in the POST request"
                  },
                  "headers": {
                    "type": "object",
                    "description": "Optional custom headers to include"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "GET",
                      "POST",
                      "PUT",
                      "PATCH",
                      "DELETE"
                    ],
                    "default": "POST"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook response status and body"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/jsonpath-query": {
      "post": {
        "operationId": "jsonpathQuery",
        "summary": "Run a JSONPath expression against a JSON object",
        "tags": [
          "Utility"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "data",
                  "path"
                ],
                "properties": {
                  "data": {
                    "type": "object",
                    "description": "The JSON object to query"
                  },
                  "path": {
                    "type": "string",
                    "description": "JSONPath expression, e.g. $.store.book[*].title"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Matching values from the JSONPath query"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/image-generate": {
      "post": {
        "operationId": "imageGenerate",
        "summary": "Generate images from text prompts",
        "tags": [
          "Image"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "prompt"
                ],
                "properties": {
                  "prompt": {
                    "type": "string",
                    "description": "Image description / prompt"
                  },
                  "size": {
                    "type": "string",
                    "enum": [
                      "1024x1024",
                      "1792x1024",
                      "1024x1792"
                    ],
                    "default": "1024x1024"
                  },
                  "style": {
                    "type": "string",
                    "enum": [
                      "vivid",
                      "natural"
                    ],
                    "default": "vivid"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Generated image URL"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.03"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/barcode-generate": {
      "post": {
        "operationId": "barcodeGenerate",
        "summary": "Generate barcodes in various formats",
        "tags": [
          "Utility"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "data"
                ],
                "properties": {
                  "data": {
                    "type": "string",
                    "description": "Text or number to encode"
                  },
                  "value": {
                    "type": "string",
                    "description": "Alias for data"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "code128",
                      "qr"
                    ],
                    "default": "code128",
                    "description": "Barcode type"
                  },
                  "width": {
                    "type": "integer",
                    "default": 250,
                    "description": "Output width in pixels"
                  },
                  "height": {
                    "type": "integer",
                    "default": 100,
                    "description": "Bar height in pixels"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Base64 encoded barcode image"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/workflow-agent": {
      "post": {
        "operationId": "workflowAgent",
        "summary": "Execute multi-step AI workflows with tool chaining",
        "tags": [
          "AI"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "goal"
                ],
                "properties": {
                  "goal": {
                    "type": "string",
                    "description": "High-level goal for the workflow agent"
                  },
                  "context": {
                    "type": "string",
                    "description": "Optional additional context for the workflow"
                  },
                  "steps": {
                    "type": "integer",
                    "default": 3,
                    "description": "Target number of workflow steps"
                  },
                  "max_steps": {
                    "type": "integer",
                    "description": "Legacy alias for steps"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Workflow execution result with step-by-step log"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.025"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/crypto-price": {
      "post": {
        "operationId": "cryptoPrice",
        "summary": "Get current cryptocurrency price and market data",
        "tags": [
          "Crypto"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "symbol"
                ],
                "properties": {
                  "symbol": {
                    "type": "string",
                    "description": "CoinGecko coin ID (e.g. bitcoin, ethereum, solana)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current price and market data (powered by CoinGecko)"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/crypto-ohlcv": {
      "post": {
        "operationId": "cryptoOhlcv",
        "summary": "Get OHLCV (candlestick) data for a cryptocurrency",
        "tags": [
          "Crypto"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "symbol"
                ],
                "properties": {
                  "symbol": {
                    "type": "string",
                    "description": "CoinGecko coin ID (e.g. bitcoin, ethereum)"
                  },
                  "days": {
                    "type": "integer",
                    "default": 7,
                    "description": "Number of days of OHLCV data (1, 7, 14, 30, 90, 180, 365)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OHLCV candlestick data (powered by CoinGecko)"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/crypto-market-cap": {
      "post": {
        "operationId": "cryptoMarketCap",
        "summary": "Get top cryptocurrencies by market cap",
        "tags": [
          "Crypto"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "default": 10,
                    "description": "Number of top coins to return"
                  },
                  "currency": {
                    "type": "string",
                    "default": "usd",
                    "description": "Fiat currency for prices"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Top cryptocurrencies ranked by market cap (powered by CoinGecko)"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/crypto-fear-greed": {
      "post": {
        "operationId": "cryptoFearGreed",
        "summary": "Get the crypto Fear & Greed Index",
        "tags": [
          "Crypto"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "default": 1,
                    "description": "Number of historical entries (1 = current)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Fear & Greed Index value and classification"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/crypto-sentiment": {
      "post": {
        "operationId": "cryptoSentiment",
        "summary": "Get community sentiment for a cryptocurrency",
        "tags": [
          "Crypto"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "symbol"
                ],
                "properties": {
                  "symbol": {
                    "type": "string",
                    "description": "CoinGecko coin ID (e.g. bitcoin, ethereum)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Community sentiment data (powered by CoinGecko)"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/crypto-news": {
      "post": {
        "operationId": "cryptoNews",
        "summary": "Get latest crypto news from CoinDesk, CoinTelegraph, Bitcoin Magazine",
        "tags": [
          "Crypto"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "symbol": {
                    "type": "string",
                    "description": "Filter by coin symbol (e.g. BTC, ETH)"
                  },
                  "limit": {
                    "type": "integer",
                    "default": 10,
                    "maximum": 20
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Latest crypto news articles"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.015"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/token-lookup": {
      "post": {
        "operationId": "tokenLookup",
        "summary": "Search CoinGecko for a token by name or ticker symbol",
        "tags": [
          "Crypto"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "query"
                ],
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "Token name or ticker to search (e.g. bitcoin, BTC, solana)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Token metadata including CoinGecko ID (powered by CoinGecko)"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/ai-oracle": {
      "post": {
        "operationId": "aiOracle",
        "summary": "Premium reasoning with structured analysis and confidence levels",
        "tags": [
          "AI"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "question"
                ],
                "properties": {
                  "question": {
                    "type": "string",
                    "description": "Question or topic to analyze"
                  },
                  "context": {
                    "type": "string",
                    "description": "Additional context for the analysis"
                  },
                  "depth": {
                    "type": "string",
                    "enum": [
                      "quick",
                      "standard",
                      "deep"
                    ],
                    "default": "standard",
                    "description": "Analysis depth level"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Structured analysis with confidence levels and reasoning"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.025"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/session-create": {
      "post": {
        "operationId": "sessionCreate",
        "summary": "Create a managed conversation session",
        "tags": [
          "AI"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "namespace"
                ],
                "properties": {
                  "namespace": {
                    "type": "string",
                    "description": "Session namespace or grouping key"
                  },
                  "system_prompt": {
                    "type": "string",
                    "description": "System prompt for the session"
                  },
                  "system": {
                    "type": "string",
                    "description": "Legacy alias for system_prompt"
                  },
                  "model": {
                    "type": "string",
                    "enum": [
                      "claude-sonnet-4-6",
                      "claude-opus-4-6",
                      "claude-haiku-4-5-20251001",
                      "gpt-4o",
                      "gpt-4o-mini"
                    ],
                    "default": "claude-sonnet-4-6",
                    "description": "AI model to use"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Session ID and metadata"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/session-message": {
      "post": {
        "operationId": "sessionMessage",
        "summary": "Send a message in an existing conversation session",
        "description": "Credits scale with the session model: 20 base x model multiplier (Sonnet 1x, Opus 2x, Haiku 0.4x). x402-paid calls are served the standard Sonnet-tier model at the flat x402 price.",
        "tags": [
          "AI"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "session_id",
                  "message"
                ],
                "properties": {
                  "session_id": {
                    "type": "string",
                    "description": "Session ID from session-create"
                  },
                  "message": {
                    "type": "string",
                    "description": "User message to send"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "AI response within the session context"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.02"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/text-to-speech": {
      "post": {
        "operationId": "textToSpeech",
        "summary": "Convert text to natural-sounding audio via ElevenLabs (returns base64 MP3)",
        "tags": [
          "Audio"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Text to convert (max 5,000 chars)"
                  },
                  "voice_id": {
                    "type": "string",
                    "description": "ElevenLabs voice ID",
                    "default": "EXAVITQu4vr4xnSDxMaL"
                  },
                  "model_id": {
                    "type": "string",
                    "description": "ElevenLabs model ID (default: eleven_turbo_v2_5)"
                  },
                  "stability": {
                    "type": "number",
                    "description": "Voice stability 0-1 (default: 0.42)"
                  },
                  "similarity_boost": {
                    "type": "number",
                    "description": "Voice similarity boost 0-1 (default: 0.82)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Base64 MP3 audio"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.1"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/transcribe-audio": {
      "post": {
        "operationId": "transcribeAudio",
        "summary": "Transcribe audio files to text via OpenAI Whisper (URL input, 100+ languages)",
        "tags": [
          "Audio"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "audio_url"
                ],
                "properties": {
                  "audio_url": {
                    "type": "string",
                    "description": "Public URL of the audio file (MP3, WAV, M4A, OGG)"
                  },
                  "language": {
                    "type": "string",
                    "description": "ISO-639-1 language code (auto-detected if omitted)"
                  },
                  "prompt": {
                    "type": "string",
                    "description": "Context hint for better accuracy"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Transcript text"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.03"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/email-send": {
      "post": {
        "operationId": "emailSend",
        "summary": "Send transactional emails via Resend \u2014 plain text or HTML",
        "tags": [
          "Communication"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "to",
                  "subject",
                  "body"
                ],
                "properties": {
                  "to": {
                    "type": "string",
                    "description": "Recipient email address"
                  },
                  "subject": {
                    "type": "string",
                    "description": "Email subject line"
                  },
                  "body": {
                    "type": "string",
                    "description": "Plain text email body"
                  },
                  "html": {
                    "type": "string",
                    "description": "HTML email body (alternative to body)"
                  },
                  "from": {
                    "type": "string",
                    "description": "Sender (default: no-reply@archtools.dev)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Message ID"
          }
        }
      }
    },
    "/v1/tools/design-create": {
      "post": {
        "operationId": "designCreate",
        "summary": "Generate images from text prompts via DALL-E 3 (1024x1024, 1792x1024, 1024x1792)",
        "tags": [
          "Image"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "prompt"
                ],
                "properties": {
                  "prompt": {
                    "type": "string",
                    "description": "Image description"
                  },
                  "size": {
                    "type": "string",
                    "enum": [
                      "1024x1024",
                      "1792x1024",
                      "1024x1792"
                    ],
                    "default": "1024x1024"
                  },
                  "quality": {
                    "type": "string",
                    "enum": [
                      "standard",
                      "hd"
                    ],
                    "default": "standard"
                  },
                  "style": {
                    "type": "string",
                    "enum": [
                      "vivid",
                      "natural"
                    ],
                    "default": "vivid"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Generated image URL"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.055"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/domain-check": {
      "post": {
        "operationId": "domainCheck",
        "summary": "Check if a domain is available or registered via RDAP (no key needed)",
        "tags": [
          "Utility"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "domain"
                ],
                "properties": {
                  "domain": {
                    "type": "string",
                    "description": "Domain name (e.g. example.com)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Registration status, expiry, nameservers"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/news-search": {
      "post": {
        "operationId": "newsSearch",
        "summary": "Search real-time news articles by keyword",
        "tags": [
          "Web"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "query"
                ],
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "News search query"
                  },
                  "limit": {
                    "type": "integer",
                    "default": 10,
                    "description": "Maximum number of articles to return"
                  },
                  "language": {
                    "type": "string",
                    "default": "en",
                    "description": "ISO-639-1 language code"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "News articles with title, source, date, and URL"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.015"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/research-report": {
      "post": {
        "operationId": "researchReport",
        "summary": "Generate a structured research report on any topic",
        "tags": [
          "AI"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "query"
                ],
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "Research topic or question"
                  },
                  "topic": {
                    "type": "string",
                    "description": "Legacy alias for query"
                  },
                  "depth": {
                    "type": "string",
                    "enum": [
                      "brief",
                      "standard",
                      "deep"
                    ],
                    "default": "standard",
                    "description": "Report depth level"
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "markdown",
                      "json"
                    ],
                    "default": "markdown"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Structured research report with sources"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.055"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/fact-check": {
      "post": {
        "operationId": "factCheck",
        "summary": "Verify claims against real-time web sources",
        "tags": [
          "AI"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "claim"
                ],
                "properties": {
                  "claim": {
                    "type": "string",
                    "description": "The claim or statement to verify"
                  },
                  "context": {
                    "type": "string",
                    "description": "Additional context about the claim"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Fact-check result with verdict, sources, and confidence"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.02"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/video-generate": {
      "post": {
        "operationId": "videoGenerate",
        "summary": "AI video generation from text prompts via Runway Gen-3",
        "tags": [
          "Image"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "prompt"
                ],
                "properties": {
                  "prompt": {
                    "type": "string",
                    "description": "Text description of the video to generate"
                  },
                  "duration": {
                    "type": "integer",
                    "default": 5,
                    "description": "Video duration in seconds (5 or 10)"
                  },
                  "aspect_ratio": {
                    "type": "string",
                    "enum": [
                      "16:9",
                      "9:16",
                      "1280:720",
                      "720:1280"
                    ],
                    "default": "16:9",
                    "description": "Output aspect ratio"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Generated video URL"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "1.1"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/image-remove-bg": {
      "post": {
        "operationId": "imageRemoveBg",
        "summary": "Remove background from any image via RemoveBG",
        "tags": [
          "Image"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "image_url": {
                    "type": "string",
                    "description": "Public URL of the image"
                  },
                  "image_base64": {
                    "type": "string",
                    "description": "Base64-encoded image (alternative to image_url)"
                  },
                  "size": {
                    "type": "string",
                    "enum": [
                      "preview",
                      "full",
                      "auto"
                    ],
                    "default": "auto",
                    "description": "Output size"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Image with background removed (base64 PNG)"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.35"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/email-find": {
      "post": {
        "operationId": "emailFind",
        "summary": "Find email address for a person at a company via Hunter.io",
        "tags": [
          "Communication"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "domain"
                ],
                "properties": {
                  "domain": {
                    "type": "string",
                    "description": "Company domain (e.g. google.com)"
                  },
                  "first_name": {
                    "type": "string",
                    "description": "Person's first name"
                  },
                  "last_name": {
                    "type": "string",
                    "description": "Person's last name"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Found email address with confidence score"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.12"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/semantic-search": {
      "post": {
        "operationId": "semanticSearch",
        "summary": "Neural/semantic web search via Exa AI",
        "tags": [
          "Web"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "query"
                ],
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "Natural language search query"
                  },
                  "num_results": {
                    "type": "integer",
                    "default": 10,
                    "description": "Number of results to return"
                  },
                  "include_text": {
                    "type": "boolean",
                    "default": true,
                    "description": "Include full page text in results"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Semantically relevant search results with content"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.015"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/send-email": {
      "post": {
        "operationId": "sendEmail",
        "summary": "Send transactional emails via Resend (alias of email-send)",
        "tags": [
          "Communication"
        ],
        "description": "Alias of /v1/tools/email-send. Same parameters and pricing.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "to",
                  "subject",
                  "body"
                ],
                "properties": {
                  "to": {
                    "type": "string",
                    "description": "Recipient email address"
                  },
                  "subject": {
                    "type": "string",
                    "description": "Email subject line"
                  },
                  "body": {
                    "type": "string",
                    "description": "Email body (plain text or HTML)"
                  },
                  "from": {
                    "type": "string",
                    "description": "Sender address (optional, defaults to verified domain)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Email queued with Resend message ID"
          }
        }
      }
    },
    "/v1/tools/generate-image": {
      "post": {
        "operationId": "generateImage",
        "summary": "Generate images from text prompts (alias of design-create)",
        "tags": [
          "Image"
        ],
        "description": "Alias of /v1/tools/design-create. Same parameters and pricing.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "prompt"
                ],
                "properties": {
                  "prompt": {
                    "type": "string",
                    "description": "Text description of the image to generate"
                  },
                  "size": {
                    "type": "string",
                    "enum": [
                      "1024x1024",
                      "1792x1024",
                      "1024x1792"
                    ],
                    "default": "1024x1024"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Generated image URL"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.055"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/tools/check-domain": {
      "post": {
        "operationId": "checkDomain",
        "summary": "Check if a domain is available or registered (alias of domain-check)",
        "tags": [
          "Utility"
        ],
        "description": "Alias of /v1/tools/domain-check. Same parameters and pricing.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "domain"
                ],
                "properties": {
                  "domain": {
                    "type": "string",
                    "description": "Domain name to check (e.g. example.com)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Domain availability status and registration details"
          }
        },
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/v1/billing/plans": {
      "get": {
        "operationId": "billingPlans",
        "summary": "List one-time credit packs and monthly subscription plans",
        "description": "Public, no auth. One-time packs: Starter Pack (3,000 credits, $9), Pro Pack (25,000 credits, $49), Business Pack (125,000 credits, $199). Each pack's `id` is the exact value POST /v1/billing/checkout accepts as `pack`; each subscription's `id` is what POST /v1/billing/subscribe accepts as `plan`.",
        "tags": [
          "Billing"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Available packs and plans",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "one_time_packs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "enum": [
                              "starter",
                              "pro",
                              "business"
                            ]
                          },
                          "label": {
                            "type": "string",
                            "enum": [
                              "Starter Pack",
                              "Pro Pack",
                              "Business Pack"
                            ]
                          },
                          "credits": {
                            "type": "integer",
                            "description": "3000 (starter), 25000 (pro), 125000 (business)"
                          },
                          "price_usd": {
                            "type": "number",
                            "description": "9 (starter), 49 (pro), 199 (business)"
                          },
                          "price_per_credit": {
                            "type": "string"
                          },
                          "expires": {
                            "type": "boolean"
                          },
                          "auto_renew": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "subscriptions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "enum": [
                              "starter-monthly",
                              "pro-monthly",
                              "growth-monthly",
                              "business-monthly"
                            ]
                          },
                          "label": {
                            "type": "string"
                          },
                          "billing": {
                            "type": "string"
                          },
                          "credits_per_month": {
                            "type": "integer"
                          },
                          "price_usd": {
                            "type": "number"
                          },
                          "auto_renew": {
                            "type": "boolean"
                          },
                          "credits_refresh": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/checkout": {
      "post": {
        "operationId": "billingCheckout",
        "summary": "Create a Stripe Checkout session for a one-time credit pack",
        "description": "Requires an API key or signed-in session. Packs: starter = Starter Pack (3,000 credits, $9), pro = Pro Pack (25,000 credits, $49), business = Business Pack (125,000 credits, $199). Legacy ids small/medium/large are accepted as aliases for starter/pro/business.",
        "tags": [
          "Billing"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "pack"
                ],
                "properties": {
                  "pack": {
                    "type": "string",
                    "enum": [
                      "starter",
                      "pro",
                      "business"
                    ],
                    "description": "Credit pack id (the `id` from GET /v1/billing/plans). Legacy aliases small/medium/large map to starter/pro/business. The key `plan` is also accepted as an alias for `pack`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stripe Checkout session created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "url": {
                      "type": "string",
                      "description": "Stripe Checkout URL \u2014 open it to complete payment"
                    },
                    "session_id": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unknown pack id, or a subscription plan id was sent (use POST /v1/billing/subscribe for subscriptions)"
          },
          "401": {
            "description": "Missing or invalid API key/session"
          },
          "503": {
            "description": "Stripe not configured"
          }
        }
      }
    },
    "/v1/billing/subscribe": {
      "post": {
        "operationId": "billingSubscribe",
        "summary": "Create a Stripe Checkout session for a monthly subscription plan",
        "description": "Requires an API key or signed-in session. Plans: starter-monthly (10,000 credits/mo, $19), pro-monthly (30,000 credits/mo, $49), growth-monthly (75,000 credits/mo, $99), business-monthly (175,000 credits/mo, $199).",
        "tags": [
          "Billing"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "plan"
                ],
                "properties": {
                  "plan": {
                    "type": "string",
                    "enum": [
                      "starter-monthly",
                      "pro-monthly",
                      "growth-monthly",
                      "business-monthly"
                    ],
                    "description": "Subscription plan id (the `id` from GET /v1/billing/plans). Bare tier names sent as `plan` (starter, pro, growth, business) expand to the -monthly plan id."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stripe Checkout session created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "url": {
                      "type": "string",
                      "description": "Stripe Checkout URL \u2014 open it to complete payment"
                    },
                    "session_id": {
                      "type": "string"
                    },
                    "plan": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unknown plan id, or a one-time pack id was sent via `pack` (use POST /v1/billing/checkout for one-time packs)"
          },
          "401": {
            "description": "Missing or invalid API key/session"
          },
          "503": {
            "description": "Stripe not configured"
          }
        }
      }
    }
  }
}