{
  "openapi": "3.1.1",
  "info": {
    "title": "CyberChef-lite Pipeline API",
    "version": "1.0.0",
    "summary": "One-click decoding recipes: JWT, base64 → gunzip → JSON, double URL decode, hex dump.",
    "description": "Every endpoint performs the same calculation as the human page and returns inputs, result, units, assumptions, sources, warnings and computedAt. MCP endpoint: /mcp."
  },
  "servers": [
    {
      "url": "https://cybercheflitepipeline.usefulweb.site"
    }
  ],
  "paths": {
    "/api/v1/calculate": {
      "post": {
        "operationId": "calculate",
        "summary": "One-click decoding recipes: JWT, base64 → gunzip → JSON, double URL decode, hex dump.",
        "description": "A simple front end for common data transformations: pick a ready recipe such as “decode a JWT”, “base64 → gunzip → pretty JSON”, “URL decode twice” or “hex dump”, or chain up to five steps from a short list. Shows every intermediate result. Uses the same engine as Crypto Kitchen, which offers all operations and arguments.\n\nMethodology:\n- Each preset is a fixed list of Crypto Kitchen operations; “Custom” runs up to five steps chosen from a curated list with default arguments.\n- The engine and its safety limits (50 MB decompression limit, 10 MB input) are shared with Crypto Kitchen; the equivalent recipe text is shown so you can continue there with more operations and arguments.\n- JWT decoding never verifies the signature; use Crypto Kitchen’s jwt-verify with the key for that.",
        "tags": [
          "developer"
        ],
        "x-mcp-tool": "cyberchef_lite_pipeline",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CyberchefLitePipelineInput"
              },
              "examples": {
                "example1": {
                  "summary": "Decode a JWT",
                  "value": {
                    "input": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
                    "preset": "jwt-decode"
                  }
                },
                "example2": {
                  "summary": "Base64 → gunzip → pretty JSON",
                  "value": {
                    "input": "H4sIAAAAAAACA6tWKi1OLVKyUkpMSVTSUSrKz0ktVrKKVkpMyc3MU9JRSkktU4rVUUpMLsksS1WyKikqTa0FAJsiBuU0AAAA",
                    "preset": "base64-gunzip-json"
                  }
                },
                "example3": {
                  "summary": "URL decode twice",
                  "value": {
                    "input": "name%3DJ%25C3%25BCrgen%2520M%25C3%25BCller%26city%3DK%25C3%25B6ln",
                    "preset": "url-decode-twice"
                  }
                },
                "example4": {
                  "summary": "Hex dump",
                  "value": {
                    "input": "Hello, usefulweb!\n",
                    "preset": "hex-dump"
                  }
                },
                "example5": {
                  "summary": "Custom: base64 decode, then SHA-256",
                  "value": {
                    "input": "aGVsbG8gd29ybGQ=",
                    "preset": "custom",
                    "step1": "from-base64",
                    "step2": "hash-sha256"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculation result envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CyberchefLitePipelineResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input (see errors[]).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (see Retry-After).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tool": {
      "get": {
        "operationId": "getToolDefinition",
        "summary": "Inputs, output schema and examples for this tool",
        "responses": {
          "200": {
            "description": "Tool definition.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "description": "RFC 9457 problem details. 422 responses include per-field `errors`.",
        "required": [
          "type",
          "title",
          "status",
          "detail"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "field",
                "message"
              ],
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "CyberchefLitePipelineInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "input": {
            "title": "Input",
            "type": "string",
            "maxLength": 2000000
          },
          "inputFile": {
            "title": "Or upload a file",
            "description": "Up to 10 MB, processed as raw bytes. Upload as {filename, contentType?, contentBase64}. Max 10240 KiB. Accepts */*.",
            "type": "object",
            "additionalProperties": false,
            "required": [
              "filename",
              "contentBase64"
            ],
            "properties": {
              "filename": {
                "type": "string"
              },
              "contentType": {
                "type": "string"
              },
              "contentBase64": {
                "type": "string"
              }
            }
          },
          "preset": {
            "title": "Recipe",
            "type": "string",
            "enum": [
              "jwt-decode",
              "base64-gunzip-json",
              "url-decode-twice",
              "hex-dump",
              "base64-decode",
              "hex-to-text",
              "sha256",
              "magic",
              "custom"
            ],
            "default": "magic"
          },
          "step1": {
            "title": "Step 1",
            "description": "Only used with “Custom”.",
            "type": "string",
            "enum": [
              "",
              "from-base64",
              "to-base64",
              "from-hex",
              "to-hex",
              "to-hexdump",
              "url-decode",
              "url-encode",
              "html-decode",
              "html-encode",
              "gunzip",
              "gzip",
              "inflate",
              "inflate-raw",
              "brotli-decompress",
              "json-pretty",
              "json-minify",
              "jwt-decode",
              "from-base32",
              "punycode-decode",
              "qp-decode",
              "rot13",
              "uuid-parse",
              "timestamp",
              "magic",
              "entropy",
              "crc32",
              "hash-md5",
              "hash-sha1",
              "hash-sha256",
              "hash-sha512",
              "upper",
              "lower"
            ]
          },
          "step2": {
            "title": "Step 2",
            "type": "string",
            "enum": [
              "",
              "from-base64",
              "to-base64",
              "from-hex",
              "to-hex",
              "to-hexdump",
              "url-decode",
              "url-encode",
              "html-decode",
              "html-encode",
              "gunzip",
              "gzip",
              "inflate",
              "inflate-raw",
              "brotli-decompress",
              "json-pretty",
              "json-minify",
              "jwt-decode",
              "from-base32",
              "punycode-decode",
              "qp-decode",
              "rot13",
              "uuid-parse",
              "timestamp",
              "magic",
              "entropy",
              "crc32",
              "hash-md5",
              "hash-sha1",
              "hash-sha256",
              "hash-sha512",
              "upper",
              "lower"
            ]
          },
          "step3": {
            "title": "Step 3",
            "type": "string",
            "enum": [
              "",
              "from-base64",
              "to-base64",
              "from-hex",
              "to-hex",
              "to-hexdump",
              "url-decode",
              "url-encode",
              "html-decode",
              "html-encode",
              "gunzip",
              "gzip",
              "inflate",
              "inflate-raw",
              "brotli-decompress",
              "json-pretty",
              "json-minify",
              "jwt-decode",
              "from-base32",
              "punycode-decode",
              "qp-decode",
              "rot13",
              "uuid-parse",
              "timestamp",
              "magic",
              "entropy",
              "crc32",
              "hash-md5",
              "hash-sha1",
              "hash-sha256",
              "hash-sha512",
              "upper",
              "lower"
            ]
          },
          "step4": {
            "title": "Step 4",
            "type": "string",
            "enum": [
              "",
              "from-base64",
              "to-base64",
              "from-hex",
              "to-hex",
              "to-hexdump",
              "url-decode",
              "url-encode",
              "html-decode",
              "html-encode",
              "gunzip",
              "gzip",
              "inflate",
              "inflate-raw",
              "brotli-decompress",
              "json-pretty",
              "json-minify",
              "jwt-decode",
              "from-base32",
              "punycode-decode",
              "qp-decode",
              "rot13",
              "uuid-parse",
              "timestamp",
              "magic",
              "entropy",
              "crc32",
              "hash-md5",
              "hash-sha1",
              "hash-sha256",
              "hash-sha512",
              "upper",
              "lower"
            ]
          },
          "step5": {
            "title": "Step 5",
            "type": "string",
            "enum": [
              "",
              "from-base64",
              "to-base64",
              "from-hex",
              "to-hex",
              "to-hexdump",
              "url-decode",
              "url-encode",
              "html-decode",
              "html-encode",
              "gunzip",
              "gzip",
              "inflate",
              "inflate-raw",
              "brotli-decompress",
              "json-pretty",
              "json-minify",
              "jwt-decode",
              "from-base32",
              "punycode-decode",
              "qp-decode",
              "rot13",
              "uuid-parse",
              "timestamp",
              "magic",
              "entropy",
              "crc32",
              "hash-md5",
              "hash-sha1",
              "hash-sha256",
              "hash-sha512",
              "upper",
              "lower"
            ]
          }
        },
        "required": []
      },
      "CyberchefLitePipelineResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "tool",
          "computedAt",
          "inputs",
          "summary",
          "result",
          "units",
          "assumptions",
          "sources",
          "warnings",
          "presentation",
          "links"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string",
            "const": "1.0"
          },
          "tool": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "version"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "computedAt": {
            "type": "string",
            "format": "date-time"
          },
          "inputs": {
            "type": "object",
            "description": "Normalised inputs actually used, including applied defaults."
          },
          "summary": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "preset",
              "inputBytes",
              "recipe",
              "steps",
              "failed",
              "output",
              "artifact"
            ],
            "properties": {
              "preset": {
                "type": "string"
              },
              "inputBytes": {
                "type": "integer"
              },
              "recipe": {
                "type": "string",
                "description": "Equivalent Crypto Kitchen recipe"
              },
              "steps": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "index",
                    "op",
                    "label",
                    "args",
                    "bytes",
                    "kind",
                    "preview",
                    "notes",
                    "error"
                  ],
                  "properties": {
                    "index": {
                      "type": "integer"
                    },
                    "op": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "args": {
                      "type": "string",
                      "description": "Arguments as given; secret values are hidden."
                    },
                    "bytes": {
                      "type": "integer"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "text",
                        "binary"
                      ]
                    },
                    "preview": {
                      "type": "string"
                    },
                    "notes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "error": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              },
              "failed": {
                "type": "boolean"
              },
              "output": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "bytes",
                  "kind",
                  "text",
                  "hex",
                  "base64",
                  "sha256",
                  "truncated"
                ],
                "properties": {
                  "bytes": {
                    "type": "integer"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "text",
                      "binary"
                    ]
                  },
                  "text": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "hex": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "base64": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "truncated": {
                    "type": "boolean",
                    "description": "true if text/hex/base64 were cut to 100,000 characters (download the artifact for everything)"
                  }
                }
              },
              "artifact": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "units": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "title"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "publisher": {
                  "type": "string"
                },
                "retrievedAt": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "presentation": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Display blocks used by the human page (same data)."
          },
          "links": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "human",
              "api",
              "openapi",
              "methodology"
            ],
            "properties": {
              "human": {
                "type": "string",
                "format": "uri"
              },
              "api": {
                "type": "string",
                "format": "uri"
              },
              "openapi": {
                "type": "string",
                "format": "uri"
              },
              "methodology": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    }
  }
}