{
  "openapi": "3.1.0",
  "info": {
    "title": "UtilVet",
    "version": "1.2.0",
    "description": "Exact utilities agents get wrong: business days, holidays, time zones, cron, units, FX, JSON repair. Free tier 100 calls/day/IP; then $0.001/call via x402 (USDC on Base) or L402 (Lightning, 100 sats per 1,000 calls)."
  },
  "servers": [
    {
      "url": "https://utilvet.pages.dev"
    }
  ],
  "paths": {
    "/api/business-days": {
      "get": {
        "operationId": "businessDays",
        "summary": "Count or add business days (with public holidays)",
        "description": "Count business days between two dates, or add/subtract N business days from a date, skipping weekends and (optionally) the country's official public holidays. Returns the holidays skipped. Exact; do not do this in your head.",
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": true,
            "description": "Start date YYYY-MM-DD",
            "schema": {
              "type": "string",
              "description": "Start date YYYY-MM-DD"
            }
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "description": "End date YYYY-MM-DD (to count business days between)",
            "schema": {
              "type": "string",
              "description": "End date YYYY-MM-DD (to count business days between)"
            }
          },
          {
            "name": "add_days",
            "in": "query",
            "required": false,
            "description": "Or: number of business days to add (negative to subtract)",
            "schema": {
              "type": "integer",
              "description": "Or: number of business days to add (negative to subtract)"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "ISO country code for holidays, e.g. US, GB, DE (optional)",
            "schema": {
              "type": "string",
              "description": "ISO country code for holidays, e.g. US, GB, DE (optional)"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      },
      "post": {
        "operationId": "businessDaysPost",
        "summary": "Count or add business days (with public holidays) (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "start": {
                    "type": "string",
                    "description": "Start date YYYY-MM-DD"
                  },
                  "end": {
                    "type": "string",
                    "description": "End date YYYY-MM-DD (to count business days between)"
                  },
                  "add_days": {
                    "type": "integer",
                    "description": "Or: number of business days to add (negative to subtract)"
                  },
                  "country": {
                    "type": "string",
                    "description": "ISO country code for holidays, e.g. US, GB, DE (optional)"
                  }
                },
                "required": [
                  "start"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      }
    },
    "/api/public-holidays": {
      "get": {
        "operationId": "publicHolidays",
        "summary": "Public holidays for a country and year",
        "description": "List official public holidays for 100+ countries for a given year (date, local name, English name, national or regional), from the Nager.Date open dataset.",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "description": "ISO 3166 alpha-2 code, e.g. US",
            "schema": {
              "type": "string",
              "description": "ISO 3166 alpha-2 code, e.g. US"
            }
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "description": "Year (default current)",
            "schema": {
              "type": "integer",
              "description": "Year (default current)"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      },
      "post": {
        "operationId": "publicHolidaysPost",
        "summary": "Public holidays for a country and year (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "country": {
                    "type": "string",
                    "description": "ISO 3166 alpha-2 code, e.g. US"
                  },
                  "year": {
                    "type": "integer",
                    "description": "Year (default current)"
                  }
                },
                "required": [
                  "country"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      }
    },
    "/api/timezone-convert": {
      "get": {
        "operationId": "timezoneConvert",
        "summary": "Convert a time between time zones (DST-aware)",
        "description": "Convert a date/time from one IANA time zone to one or more others with correct daylight-saving rules. Returns local times, UTC offsets, abbreviations and the UTC instant.",
        "parameters": [
          {
            "name": "time",
            "in": "query",
            "required": true,
            "description": "Time: ISO datetime, 'YYYY-MM-DD HH:mm', or 'now'",
            "schema": {
              "type": "string",
              "description": "Time: ISO datetime, 'YYYY-MM-DD HH:mm', or 'now'"
            }
          },
          {
            "name": "from_tz",
            "in": "query",
            "required": false,
            "description": "IANA zone of the input wall time (default UTC; ignored if time has an offset)",
            "schema": {
              "type": "string",
              "description": "IANA zone of the input wall time (default UTC; ignored if time has an offset)"
            }
          },
          {
            "name": "to_tz",
            "in": "query",
            "required": true,
            "description": "Target IANA zone(s), comma-separated, e.g. America/New_York,Asia/Tokyo",
            "schema": {
              "type": "string",
              "description": "Target IANA zone(s), comma-separated, e.g. America/New_York,Asia/Tokyo"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      },
      "post": {
        "operationId": "timezoneConvertPost",
        "summary": "Convert a time between time zones (DST-aware) (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "time": {
                    "type": "string",
                    "description": "Time: ISO datetime, 'YYYY-MM-DD HH:mm', or 'now'"
                  },
                  "from_tz": {
                    "type": "string",
                    "description": "IANA zone of the input wall time (default UTC; ignored if time has an offset)"
                  },
                  "to_tz": {
                    "type": "string",
                    "description": "Target IANA zone(s), comma-separated, e.g. America/New_York,Asia/Tokyo"
                  }
                },
                "required": [
                  "time",
                  "to_tz"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      }
    },
    "/api/cron-next": {
      "get": {
        "operationId": "cronNext",
        "summary": "Explain a cron expression and list next run times",
        "description": "Parse a cron expression and return the next N run times in a time zone (DST-aware), plus a plain-English description. Validates syntax.",
        "parameters": [
          {
            "name": "expression",
            "in": "query",
            "required": true,
            "description": "5-field cron or @daily/@hourly/@weekly/@monthly/@yearly",
            "schema": {
              "type": "string",
              "description": "5-field cron or @daily/@hourly/@weekly/@monthly/@yearly"
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "How many next runs (default 5, max 50)",
            "schema": {
              "type": "integer",
              "description": "How many next runs (default 5, max 50)"
            }
          },
          {
            "name": "timezone",
            "in": "query",
            "required": false,
            "description": "IANA time zone (default UTC)",
            "schema": {
              "type": "string",
              "description": "IANA time zone (default UTC)"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "Start from this ISO time (default now)",
            "schema": {
              "type": "string",
              "description": "Start from this ISO time (default now)"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      },
      "post": {
        "operationId": "cronNextPost",
        "summary": "Explain a cron expression and list next run times (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expression": {
                    "type": "string",
                    "description": "5-field cron or @daily/@hourly/@weekly/@monthly/@yearly"
                  },
                  "count": {
                    "type": "integer",
                    "description": "How many next runs (default 5, max 50)"
                  },
                  "timezone": {
                    "type": "string",
                    "description": "IANA time zone (default UTC)"
                  },
                  "from": {
                    "type": "string",
                    "description": "Start from this ISO time (default now)"
                  }
                },
                "required": [
                  "expression"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      }
    },
    "/api/unit-convert": {
      "get": {
        "operationId": "unitConvert",
        "summary": "Convert units (length, mass, volume, area, speed, data...)",
        "description": "Exact unit conversion across length, mass, volume, area, speed, time, data size (SI and binary), energy, pressure, power and temperature using standard definitions.",
        "parameters": [
          {
            "name": "value",
            "in": "query",
            "required": true,
            "description": "Number to convert",
            "schema": {
              "type": "number",
              "description": "Number to convert"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "description": "Unit, e.g. mi, kg, gal, f, mb",
            "schema": {
              "type": "string",
              "description": "Unit, e.g. mi, kg, gal, f, mb"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "description": "Target unit",
            "schema": {
              "type": "string",
              "description": "Target unit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      },
      "post": {
        "operationId": "unitConvertPost",
        "summary": "Convert units (length, mass, volume, area, speed, data...) (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "number",
                    "description": "Number to convert"
                  },
                  "from": {
                    "type": "string",
                    "description": "Unit, e.g. mi, kg, gal, f, mb"
                  },
                  "to": {
                    "type": "string",
                    "description": "Target unit"
                  }
                },
                "required": [
                  "value",
                  "from",
                  "to"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      }
    },
    "/api/currency-convert": {
      "get": {
        "operationId": "currencyConvert",
        "summary": "Convert currency at ECB reference rates",
        "description": "Convert an amount between ~30 currencies using European Central Bank reference rates (latest or historical date since 1999). Reference rates, not executable quotes.",
        "parameters": [
          {
            "name": "amount",
            "in": "query",
            "required": false,
            "description": "Amount (default 1)",
            "schema": {
              "type": "number",
              "description": "Amount (default 1)"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "description": "ISO 4217 code, e.g. USD",
            "schema": {
              "type": "string",
              "description": "ISO 4217 code, e.g. USD"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "description": "Target code(s), comma-separated",
            "schema": {
              "type": "string",
              "description": "Target code(s), comma-separated"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Historical date YYYY-MM-DD (optional)",
            "schema": {
              "type": "string",
              "description": "Historical date YYYY-MM-DD (optional)"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      },
      "post": {
        "operationId": "currencyConvertPost",
        "summary": "Convert currency at ECB reference rates (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "number",
                    "description": "Amount (default 1)"
                  },
                  "from": {
                    "type": "string",
                    "description": "ISO 4217 code, e.g. USD"
                  },
                  "to": {
                    "type": "string",
                    "description": "Target code(s), comma-separated"
                  },
                  "date": {
                    "type": "string",
                    "description": "Historical date YYYY-MM-DD (optional)"
                  }
                },
                "required": [
                  "from",
                  "to"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      }
    },
    "/api/json-repair": {
      "get": {
        "operationId": "jsonRepair",
        "summary": "Repair broken JSON (LLM output)",
        "description": "Fix malformed JSON typically produced by LLMs: code fences, leading prose, single quotes, unquoted keys, trailing commas, comments, Python True/False/None, NaN, missing closing brackets. Returns the parsed JSON and a list of fixes.",
        "parameters": [
          {
            "name": "text",
            "in": "query",
            "required": true,
            "description": "The broken JSON text",
            "schema": {
              "type": "string",
              "description": "The broken JSON text"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      },
      "post": {
        "operationId": "jsonRepairPost",
        "summary": "Repair broken JSON (LLM output) (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "The broken JSON text"
                  }
                },
                "required": [
                  "text"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      }
    },
    "/api/json-validate": {
      "get": {
        "operationId": "jsonValidate",
        "summary": "Validate JSON against a JSON Schema",
        "description": "Validate data against a JSON Schema (core keywords incl. type, required, properties, enum, pattern, formats, anyOf/oneOf, $ref). Returns every error with its JSON path. Use before returning structured output.",
        "parameters": [
          {
            "name": "data",
            "in": "query",
            "required": true,
            "description": "JSON value or JSON string",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "schema",
            "in": "query",
            "required": false,
            "description": "JSON Schema (object or string); omit to check syntax only",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repair",
            "in": "query",
            "required": false,
            "description": "Try json_repair on invalid input (default true)",
            "schema": {
              "type": "boolean",
              "description": "Try json_repair on invalid input (default true)"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      },
      "post": {
        "operationId": "jsonValidatePost",
        "summary": "Validate JSON against a JSON Schema (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "description": "JSON value or JSON string"
                  },
                  "schema": {
                    "description": "JSON Schema (object or string); omit to check syntax only"
                  },
                  "repair": {
                    "type": "boolean",
                    "description": "Try json_repair on invalid input (default true)"
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      }
    },
    "/api/regex-test": {
      "get": {
        "operationId": "regexTest",
        "summary": "Test a regular expression",
        "description": "Run a JavaScript regular expression against text and return all matches with index, capture groups and named groups, or the replaced text. Confirms a regex works before you rely on it.",
        "parameters": [
          {
            "name": "pattern",
            "in": "query",
            "required": true,
            "description": "JavaScript regex pattern (no slashes)",
            "schema": {
              "type": "string",
              "description": "JavaScript regex pattern (no slashes)"
            }
          },
          {
            "name": "text",
            "in": "query",
            "required": true,
            "description": "Text to search",
            "schema": {
              "type": "string",
              "description": "Text to search"
            }
          },
          {
            "name": "flags",
            "in": "query",
            "required": false,
            "description": "Flags, e.g. gi",
            "schema": {
              "type": "string",
              "description": "Flags, e.g. gi"
            }
          },
          {
            "name": "replace",
            "in": "query",
            "required": false,
            "description": "Optional replacement string ($1 etc.)",
            "schema": {
              "type": "string",
              "description": "Optional replacement string ($1 etc.)"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      },
      "post": {
        "operationId": "regexTestPost",
        "summary": "Test a regular expression (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pattern": {
                    "type": "string",
                    "description": "JavaScript regex pattern (no slashes)"
                  },
                  "text": {
                    "type": "string",
                    "description": "Text to search"
                  },
                  "flags": {
                    "type": "string",
                    "description": "Flags, e.g. gi"
                  },
                  "replace": {
                    "type": "string",
                    "description": "Optional replacement string ($1 etc.)"
                  }
                },
                "required": [
                  "pattern",
                  "text"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      }
    },
    "/api/csv-to-json": {
      "get": {
        "operationId": "csvToJson",
        "summary": "Convert CSV to JSON",
        "description": "Parse CSV/TSV (RFC 4180 quotes, auto-detected delimiter) into JSON rows with inferred numbers/booleans, plus column names and row count.",
        "parameters": [
          {
            "name": "csv",
            "in": "query",
            "required": true,
            "description": "CSV text (max 500 KB)",
            "schema": {
              "type": "string",
              "description": "CSV text (max 500 KB)"
            }
          },
          {
            "name": "delimiter",
            "in": "query",
            "required": false,
            "description": "Delimiter (auto-detected: , ; tab |)",
            "schema": {
              "type": "string",
              "description": "Delimiter (auto-detected: , ; tab |)"
            }
          },
          {
            "name": "header",
            "in": "query",
            "required": false,
            "description": "First row is header (default true)",
            "schema": {
              "type": "boolean",
              "description": "First row is header (default true)"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      },
      "post": {
        "operationId": "csvToJsonPost",
        "summary": "Convert CSV to JSON (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "csv": {
                    "type": "string",
                    "description": "CSV text (max 500 KB)"
                  },
                  "delimiter": {
                    "type": "string",
                    "description": "Delimiter (auto-detected: , ; tab |)"
                  },
                  "header": {
                    "type": "boolean",
                    "description": "First row is header (default true)"
                  }
                },
                "required": [
                  "csv"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      }
    },
    "/api/text-diff": {
      "get": {
        "operationId": "textDiff",
        "summary": "Diff two texts",
        "description": "Compare two texts line-by-line or word-by-word and return a unified-style diff with counts of added/removed/unchanged and a similarity score.",
        "parameters": [
          {
            "name": "a",
            "in": "query",
            "required": true,
            "description": "Original text",
            "schema": {
              "type": "string",
              "description": "Original text"
            }
          },
          {
            "name": "b",
            "in": "query",
            "required": true,
            "description": "New text",
            "schema": {
              "type": "string",
              "description": "New text"
            }
          },
          {
            "name": "mode",
            "in": "query",
            "required": false,
            "description": "line (default) or word",
            "schema": {
              "type": "string",
              "description": "line (default) or word"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      },
      "post": {
        "operationId": "textDiffPost",
        "summary": "Diff two texts (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "a": {
                    "type": "string",
                    "description": "Original text"
                  },
                  "b": {
                    "type": "string",
                    "description": "New text"
                  },
                  "mode": {
                    "type": "string",
                    "description": "line (default) or word"
                  }
                },
                "required": [
                  "a",
                  "b"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      }
    },
    "/api/hash-encode": {
      "get": {
        "operationId": "hashEncode",
        "summary": "Hash, encode/decode (SHA, base64, hex, URL, JWT)",
        "description": "Compute SHA-1/256/384/512 hashes or encode/decode base64, base64url, hex, URL and HTML entities, or decode a JWT's header and payload (signature not verified).",
        "parameters": [
          {
            "name": "text",
            "in": "query",
            "required": true,
            "description": "Input text",
            "schema": {
              "type": "string",
              "description": "Input text"
            }
          },
          {
            "name": "operation",
            "in": "query",
            "required": true,
            "description": "sha1|sha256|sha384|sha512|base64_encode|base64_decode|base64url_encode|base64url_decode|hex_encode|hex_decode|url_encode|url_decode|html_escape|html_unescape|jwt_decode",
            "schema": {
              "type": "string",
              "description": "sha1|sha256|sha384|sha512|base64_encode|base64_decode|base64url_encode|base64url_decode|hex_encode|hex_decode|url_encode|url_decode|html_escape|html_unescape|jwt_decode"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      },
      "post": {
        "operationId": "hashEncodePost",
        "summary": "Hash, encode/decode (SHA, base64, hex, URL, JWT) (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Input text"
                  },
                  "operation": {
                    "type": "string",
                    "description": "sha1|sha256|sha384|sha512|base64_encode|base64_decode|base64url_encode|base64url_decode|hex_encode|hex_decode|url_encode|url_decode|html_escape|html_unescape|jwt_decode"
                  }
                },
                "required": [
                  "text",
                  "operation"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      }
    },
    "/api/uuid-generate": {
      "get": {
        "operationId": "uuidGenerate",
        "summary": "Generate UUIDs (v4 or v7)",
        "description": "Generate cryptographically random UUIDs, v4 or time-sortable v7.",
        "parameters": [
          {
            "name": "version",
            "in": "query",
            "required": false,
            "description": "v4 (random, default) or v7 (time-ordered)",
            "schema": {
              "type": "string",
              "description": "v4 (random, default) or v7 (time-ordered)"
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "How many (1-100)",
            "schema": {
              "type": "integer",
              "description": "How many (1-100)"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      },
      "post": {
        "operationId": "uuidGeneratePost",
        "summary": "Generate UUIDs (v4 or v7) (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "string",
                    "description": "v4 (random, default) or v7 (time-ordered)"
                  },
                  "count": {
                    "type": "integer",
                    "description": "How many (1-100)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      }
    },
    "/api/semver-compare": {
      "get": {
        "operationId": "semverCompare",
        "summary": "Compare versions / check a semver range",
        "description": "Compare two semantic versions (incl. prerelease ordering) or test whether a version satisfies an npm-style range (^, ~, x, comparators, ||).",
        "parameters": [
          {
            "name": "a",
            "in": "query",
            "required": true,
            "description": "Version, e.g. 1.4.2",
            "schema": {
              "type": "string",
              "description": "Version, e.g. 1.4.2"
            }
          },
          {
            "name": "b",
            "in": "query",
            "required": false,
            "description": "Version to compare with",
            "schema": {
              "type": "string",
              "description": "Version to compare with"
            }
          },
          {
            "name": "range",
            "in": "query",
            "required": false,
            "description": "Range to test a against, e.g. ^1.2.0 || >=2.0.0 <3",
            "schema": {
              "type": "string",
              "description": "Range to test a against, e.g. ^1.2.0 || >=2.0.0 <3"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      },
      "post": {
        "operationId": "semverComparePost",
        "summary": "Compare versions / check a semver range (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "a": {
                    "type": "string",
                    "description": "Version, e.g. 1.4.2"
                  },
                  "b": {
                    "type": "string",
                    "description": "Version to compare with"
                  },
                  "range": {
                    "type": "string",
                    "description": "Range to test a against, e.g. ^1.2.0 || >=2.0.0 <3"
                  }
                },
                "required": [
                  "a"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      }
    },
    "/api/text-stats": {
      "get": {
        "operationId": "textStats",
        "summary": "Word, character, sentence and token counts",
        "description": "Count characters, words, sentences, paragraphs and lines, estimate LLM tokens and reading time, and compute a Flesch reading-ease score.",
        "parameters": [
          {
            "name": "text",
            "in": "query",
            "required": true,
            "description": "Text",
            "schema": {
              "type": "string",
              "description": "Text"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      },
      "post": {
        "operationId": "textStatsPost",
        "summary": "Word, character, sentence and token counts (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Text"
                  }
                },
                "required": [
                  "text"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      }
    },
    "/api/slugify": {
      "get": {
        "operationId": "slugify",
        "summary": "Make a URL slug",
        "description": "Convert text to a clean URL slug: transliterates accents (é→e, ß→ss), drops punctuation, collapses separators, trims to a word boundary.",
        "parameters": [
          {
            "name": "text",
            "in": "query",
            "required": true,
            "description": "Text",
            "schema": {
              "type": "string",
              "description": "Text"
            }
          },
          {
            "name": "separator",
            "in": "query",
            "required": false,
            "description": "Separator (default -)",
            "schema": {
              "type": "string",
              "description": "Separator (default -)"
            }
          },
          {
            "name": "max_length",
            "in": "query",
            "required": false,
            "description": "Max length (default 80)",
            "schema": {
              "type": "integer",
              "description": "Max length (default 80)"
            }
          },
          {
            "name": "lowercase",
            "in": "query",
            "required": false,
            "description": "Lowercase (default true)",
            "schema": {
              "type": "boolean",
              "description": "Lowercase (default true)"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      },
      "post": {
        "operationId": "slugifyPost",
        "summary": "Make a URL slug (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Text"
                  },
                  "separator": {
                    "type": "string",
                    "description": "Separator (default -)"
                  },
                  "max_length": {
                    "type": "integer",
                    "description": "Max length (default 80)"
                  },
                  "lowercase": {
                    "type": "boolean",
                    "description": "Lowercase (default true)"
                  }
                },
                "required": [
                  "text"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      }
    },
    "/api/detect-language": {
      "get": {
        "operationId": "detectLanguage",
        "summary": "Detect the language of a text",
        "description": "Detect the language of a text (25+ languages via script detection and stopword profiles) with ISO 639-1 code, name and confidence.",
        "parameters": [
          {
            "name": "text",
            "in": "query",
            "required": true,
            "description": "Text (a sentence or more works best)",
            "schema": {
              "type": "string",
              "description": "Text (a sentence or more works best)"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      },
      "post": {
        "operationId": "detectLanguagePost",
        "summary": "Detect the language of a text (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Text (a sentence or more works best)"
                  }
                },
                "required": [
                  "text"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result JSON (ok:false with error on bad input)"
          },
          "402": {
            "description": "Payment required: x402 `accepts` (USDC on Base) + L402 WWW-Authenticate"
          },
          "429": {
            "description": "Free limit reached"
          }
        }
      }
    },
    "/api/pricing": {
      "get": {
        "operationId": "pricing",
        "summary": "Pricing and limits",
        "responses": {
          "200": {
            "description": "Pricing"
          }
        }
      }
    }
  }
}