{
  "openapi": "3.1.0",
  "info": {
    "title": "WePostX Public Tools API",
    "version": "1.0.0",
    "description": "Thirteen public utility APIs for human, script and AI clients. No authentication is required.",
    "license": { "name": "Proprietary", "identifier": "LicenseRef-Proprietary" }
  },
  "servers": [{ "url": "https://wepostx.com" }],
  "security": [],
  "paths": {
    "/api/v1/tools": {
      "get": {
        "operationId": "listPublicTools",
        "summary": "Discover public tools",
        "responses": { "200": { "description": "Thirteen tool contracts", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CatalogItem" } } } } }, "4XX": { "$ref": "#/components/responses/Error" } }
      }
    },
    "/api/v1/tools/data-format": { "$ref": "#/components/pathItems/DataFormat" },
    "/api/v1/tools/data-models": { "$ref": "#/components/pathItems/DataModels" },
    "/api/v1/tools/case-converter": { "$ref": "#/components/pathItems/CaseConverter" },
    "/api/v1/tools/regex": { "$ref": "#/components/pathItems/Regex" },
    "/api/v1/tools/table-converter": { "$ref": "#/components/pathItems/TableConverter" },
    "/api/v1/tools/text-diff": { "$ref": "#/components/pathItems/TextDiff" },
    "/api/v1/tools/text-cleaner": { "$ref": "#/components/pathItems/TextCleaner" },
    "/api/v1/tools/url": { "$ref": "#/components/pathItems/URL" },
    "/api/v1/tools/encoding": { "$ref": "#/components/pathItems/Encoding" },
    "/api/v1/tools/datetime": { "$ref": "#/components/pathItems/DateTime" },
    "/api/v1/tools/uuid": { "$ref": "#/components/pathItems/UUID" },
    "/api/v1/tools/cron": { "$ref": "#/components/pathItems/Cron" },
    "/api/v1/tools/random-number": { "$ref": "#/components/pathItems/RandomNumber" }
  },
  "components": {
    "pathItems": {
      "DataFormat": { "post": { "operationId": "convertStructuredData", "summary": "Format, validate or convert JSON, YAML and TOML", "requestBody": { "$ref": "#/components/requestBodies/DataFormat" }, "responses": { "200": { "$ref": "#/components/responses/DataFormatSuccess" }, "400": { "$ref": "#/components/responses/Error" }, "429": { "$ref": "#/components/responses/Error" } } } },
      "DataModels": { "post": { "operationId": "generateDataModels", "summary": "Generate Go, Rust or TypeScript models", "requestBody": { "$ref": "#/components/requestBodies/DataModels" }, "responses": { "200": { "$ref": "#/components/responses/DataModelsSuccess" }, "400": { "$ref": "#/components/responses/Error" }, "429": { "$ref": "#/components/responses/Error" } } } },
      "CaseConverter": { "post": { "operationId": "convertIdentifierCases", "summary": "Batch-convert identifier cases", "requestBody": { "$ref": "#/components/requestBodies/CaseConverter" }, "responses": { "200": { "$ref": "#/components/responses/ToolSuccess" }, "400": { "$ref": "#/components/responses/Error" }, "429": { "$ref": "#/components/responses/Error" } } } },
      "Regex": { "post": { "operationId": "runRegex", "summary": "Run bounded Go RE2 matching and replacement", "requestBody": { "$ref": "#/components/requestBodies/Regex" }, "responses": { "200": { "$ref": "#/components/responses/ToolSuccess" }, "400": { "$ref": "#/components/responses/Error" }, "429": { "$ref": "#/components/responses/Error" } } } },
      "TableConverter": { "post": { "operationId": "convertTable", "summary": "Convert CSV, TSV, JSON and Markdown tables", "requestBody": { "$ref": "#/components/requestBodies/TableConverter" }, "responses": { "200": { "$ref": "#/components/responses/ToolSuccess" }, "400": { "$ref": "#/components/responses/Error" }, "429": { "$ref": "#/components/responses/Error" } } } },
      "TextDiff": { "post": { "operationId": "compareText", "summary": "Compare text by line or character", "requestBody": { "$ref": "#/components/requestBodies/TextDiff" }, "responses": { "200": { "$ref": "#/components/responses/ToolSuccess" }, "400": { "$ref": "#/components/responses/Error" }, "429": { "$ref": "#/components/responses/Error" } } } },
      "TextCleaner": { "post": { "operationId": "cleanText", "summary": "Clean lines and return exact statistics", "requestBody": { "$ref": "#/components/requestBodies/TextCleaner" }, "responses": { "200": { "$ref": "#/components/responses/ToolSuccess" }, "400": { "$ref": "#/components/responses/Error" }, "429": { "$ref": "#/components/responses/Error" } } } },
      "URL": { "post": { "operationId": "useURLTool", "summary": "Parse or encode/decode URL components", "requestBody": { "$ref": "#/components/requestBodies/URL" }, "responses": { "200": { "$ref": "#/components/responses/ToolSuccess" }, "400": { "$ref": "#/components/responses/Error" }, "429": { "$ref": "#/components/responses/Error" } } } },
      "Encoding": { "post": { "operationId": "convertEncoding", "summary": "Convert Base64, Unicode escapes or HTML entities", "requestBody": { "$ref": "#/components/requestBodies/Encoding" }, "responses": { "200": { "$ref": "#/components/responses/ToolSuccess" }, "400": { "$ref": "#/components/responses/Error" }, "429": { "$ref": "#/components/responses/Error" } } } },
      "DateTime": { "post": { "operationId": "convertDateTime", "summary": "Convert timestamps or calculate a date difference", "requestBody": { "$ref": "#/components/requestBodies/DateTime" }, "responses": { "200": { "$ref": "#/components/responses/ToolSuccess" }, "400": { "$ref": "#/components/responses/Error" }, "429": { "$ref": "#/components/responses/Error" } } } },
      "UUID": { "post": { "operationId": "generateUUIDs", "summary": "Generate secure UUID v4 or v7 values", "requestBody": { "$ref": "#/components/requestBodies/UUID" }, "responses": { "200": { "$ref": "#/components/responses/ToolSuccess" }, "400": { "$ref": "#/components/responses/Error" }, "429": { "$ref": "#/components/responses/Error" } } } },
      "Cron": { "post": { "operationId": "previewCron", "summary": "Validate five-field Unix Cron and preview runs", "requestBody": { "$ref": "#/components/requestBodies/Cron" }, "responses": { "200": { "$ref": "#/components/responses/ToolSuccess" }, "400": { "$ref": "#/components/responses/Error" }, "429": { "$ref": "#/components/responses/Error" } } } },
      "RandomNumber": { "post": { "operationId": "generateRandomNumbers", "summary": "Generate secure integers or decimals", "requestBody": { "$ref": "#/components/requestBodies/RandomNumber" }, "responses": { "200": { "$ref": "#/components/responses/ToolSuccess" }, "400": { "$ref": "#/components/responses/Error" }, "429": { "$ref": "#/components/responses/Error" } } } }
    },
    "requestBodies": {
      "DataFormat": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataFormatRequest" } } } },
      "DataModels": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataModelsRequest" } } } },
      "CaseConverter": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CaseConverterRequest" } } } },
      "Regex": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegexRequest" } } } },
      "TableConverter": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TableConverterRequest" } } } },
      "TextDiff": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TextDiffRequest" } } } },
      "TextCleaner": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TextCleanerRequest" } } } },
      "URL": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/URLRequest" } } } },
      "Encoding": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EncodingRequest" } } } },
      "DateTime": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DateTimeRequest" } } } },
      "UUID": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UUIDRequest" } } } },
      "Cron": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CronRequest" } } } },
      "RandomNumber": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RandomNumberRequest" } } } }
    },
    "responses": {
      "DataFormatSuccess": { "description": "Structured-data result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataFormatSuccess" } } } },
      "DataModelsSuccess": { "description": "Generated model result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DataModelsSuccess" } } } },
      "ToolSuccess": { "description": "Exact tool result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolSuccess" } } } },
      "Error": { "description": "Standard API error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
    },
    "schemas": {
      "CatalogItem": { "type": "object", "required": ["slug", "name", "method", "endpoint", "description"], "properties": { "slug": { "type": "string" }, "name": { "type": "string" }, "method": { "const": "POST" }, "endpoint": { "type": "string" }, "description": { "type": "string" } } },
      "DataFormatSuccess": { "type": "object", "additionalProperties": false, "required": ["output", "source_format", "warnings", "execution"], "properties": { "output": { "type": "string" }, "source_format": { "enum": ["json", "yaml", "toml"] }, "warnings": { "type": "array", "items": { "type": "string" } }, "execution": { "const": "server" } } },
      "DataModelsSuccess": { "type": "object", "additionalProperties": false, "required": ["output", "source_format", "extension", "warnings", "execution"], "properties": { "output": { "type": "string" }, "source_format": { "enum": ["json", "yaml", "toml"] }, "extension": { "enum": ["go", "rs", "ts"] }, "warnings": { "type": "array", "items": { "type": "string" } }, "execution": { "const": "server" } } },
      "ToolSuccess": { "type": "object", "additionalProperties": false, "required": ["tool", "output", "execution"], "properties": { "tool": { "type": "string" }, "output": { "type": "object", "description": "Operation-specific result documented by the selected tool." }, "execution": { "const": "server" } } },
      "DataFormatRequest": { "type": "object", "additionalProperties": false, "required": ["input", "source", "target", "indent"], "properties": { "input": { "type": "string" }, "source": { "enum": ["auto", "json", "yaml", "toml"] }, "target": { "enum": ["json", "yaml", "toml"] }, "indent": { "enum": [2, 4] } } },
      "DataModelsRequest": { "type": "object", "additionalProperties": false, "required": ["input", "source", "language", "root_name"], "properties": { "input": { "type": "string" }, "source": { "enum": ["auto", "json", "yaml", "toml"] }, "language": { "enum": ["go", "rust", "typescript"] }, "root_name": { "type": "string" } } },
      "CaseConverterRequest": { "type": "object", "additionalProperties": false, "required": ["input", "target"], "properties": { "input": { "type": "string" }, "target": { "enum": ["snake", "camel", "pascal", "kebab", "constant", "dot"] }, "preserve_empty": { "type": "boolean", "default": false } } },
      "RegexRequest": { "type": "object", "additionalProperties": false, "required": ["input", "pattern", "flags", "replacement"], "properties": { "input": { "type": "string", "maxLength": 200000 }, "pattern": { "type": "string" }, "flags": { "type": "string", "pattern": "^[gims]*$" }, "replacement": { "type": "string" } } },
      "TableConverterRequest": { "type": "object", "additionalProperties": false, "required": ["input", "source", "target"], "properties": { "input": { "type": "string" }, "source": { "enum": ["csv", "tsv", "json", "markdown"] }, "target": { "enum": ["csv", "tsv", "json", "markdown"] }, "alignment": { "enum": ["left", "center", "right"], "default": "left" } } },
      "TextDiffRequest": { "type": "object", "additionalProperties": false, "required": ["left", "right", "mode"], "properties": { "left": { "type": "string" }, "right": { "type": "string" }, "mode": { "enum": ["line", "character"] } } },
      "TextCleanerRequest": { "type": "object", "additionalProperties": false, "required": ["input"], "properties": { "input": { "type": "string" }, "trim_lines": { "type": "boolean" }, "remove_empty": { "type": "boolean" }, "deduplicate": { "type": "boolean" }, "sort": { "enum": ["none", "asc", "desc"], "default": "none" }, "collapse_spaces": { "type": "boolean" } } },
      "URLRequest": { "type": "object", "additionalProperties": false, "required": ["input", "operation"], "properties": { "input": { "type": "string" }, "operation": { "enum": ["parse", "encode", "decode"] } } },
      "EncodingRequest": { "type": "object", "additionalProperties": false, "required": ["input", "scheme", "operation"], "properties": { "input": { "type": "string" }, "scheme": { "enum": ["base64", "unicode", "html"] }, "operation": { "enum": ["encode", "decode"] } } },
      "DateTimeRequest": { "type": "object", "additionalProperties": false, "required": ["operation"], "properties": { "operation": { "enum": ["timestamp_to_date", "date_to_timestamp", "difference"] }, "timestamp": { "type": "string" }, "unit": { "enum": ["auto", "seconds", "milliseconds"] }, "datetime": { "type": "string", "format": "date-time" }, "start": { "type": "string", "format": "date-time" }, "end": { "type": "string", "format": "date-time" } } },
      "UUIDRequest": { "type": "object", "additionalProperties": false, "required": ["version", "count"], "properties": { "version": { "enum": ["v4", "v7"] }, "count": { "type": "integer", "minimum": 1, "maximum": 100 }, "uppercase": { "type": "boolean", "default": false }, "hyphens": { "type": "boolean", "default": true } } },
      "CronRequest": { "type": "object", "additionalProperties": false, "required": ["expression", "timezone"], "properties": { "expression": { "type": "string" }, "timezone": { "type": "string" }, "current_date": { "type": "string", "format": "date-time" }, "count": { "type": "integer", "minimum": 1, "maximum": 50, "default": 10 } } },
      "RandomNumberRequest": { "type": "object", "additionalProperties": false, "required": ["mode", "min", "max", "count"], "properties": { "mode": { "enum": ["integer", "decimal"] }, "min": { "type": "number" }, "max": { "type": "number" }, "count": { "type": "integer", "minimum": 1, "maximum": 1000 }, "decimals": { "type": "integer", "minimum": 0, "maximum": 10, "default": 2 }, "unique": { "type": "boolean", "default": false }, "sort": { "enum": ["none", "asc", "desc"], "default": "none" } } },
      "Error": { "type": "object", "required": ["error"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string" }, "message": { "type": "string" } } } } }
    }
  }
}
