{
  "openapi": "3.1.0",
  "info": {
    "title": "Website 2 Zip PGP Tool API",
    "version": "1.0.0",
    "description": "Free, stateless OpenPGP API. No API key or signup. Server operations receive all supplied keys and content. Use the browser or local SDK to keep private keys on your own device. Limits: 30 requests and 4 key generations/minute/network address, shared ceiling of 120 requests and 12 generations/minute, 2 concurrent workers, 1 MiB JSON, 512 KiB content, 20 recipients, 25 seconds. An email alone cannot recover a key.",
    "termsOfService": "https://website2zip.com/tos.php"
  },
  "servers": [
    {
      "url": "https://website2zip.com/pgp/api/v1"
    }
  ],
  "security": [],
  "paths": {
    "/generate": {
      "post": {
        "operationId": "pgp_generate",
        "summary": "Generate a protected key pair from an email",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "description": "Unverified public identity label.",
                    "format": "email",
                    "maxLength": 254
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "algorithm": {
                    "type": "string",
                    "enum": [
                      "rsa4096",
                      "curve25519",
                      "modern25519"
                    ],
                    "default": "rsa4096"
                  },
                  "passphrase": {
                    "type": "string",
                    "description": "Optional; automatically generated if omitted or empty. User-supplied values need at least 12 characters.",
                    "maxLength": 1024
                  },
                  "expireDays": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3650,
                    "default": 0,
                    "description": "0 means no expiry."
                  }
                },
                "required": [
                  "email"
                ]
              },
              "example": {
                "email": "you@example.com"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation completed. For verification, independently check result.valid or result.verification.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "result"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "fingerprint": {
                          "type": "string"
                        },
                        "keyID": {
                          "type": "string"
                        },
                        "publicKey": {
                          "type": "string",
                          "description": "ASCII-armored OpenPGP key. Maximum 256 KiB.",
                          "maxLength": 262144
                        },
                        "userIDs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "algorithm": {
                          "type": "object"
                        },
                        "created": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "expires": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "revoked": {
                          "type": "boolean"
                        },
                        "valid": {
                          "type": "boolean",
                          "description": "Self-signature/time validity, not real-world identity verification."
                        },
                        "private": {
                          "type": "boolean"
                        },
                        "protected": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "subkeys": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        },
                        "privateKey": {
                          "type": "string",
                          "description": "ASCII-armored OpenPGP key. Maximum 256 KiB.",
                          "maxLength": 262144
                        },
                        "passphrase": {
                          "type": "string",
                          "description": "Private-key passphrase. Required when the supplied key is encrypted.",
                          "maxLength": 1024
                        },
                        "revocationCertificate": {
                          "type": "string",
                          "description": "ASCII-armored OpenPGP key. Maximum 256 KiB.",
                          "maxLength": 262144
                        },
                        "email": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or operation input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Use POST",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Body exceeds 1 MiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Use application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit: retry after 60 seconds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait before retrying."
              }
            }
          },
          "503": {
            "description": "Workers busy or execution limit: retry after 5 seconds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait before retrying."
              }
            }
          }
        }
      }
    },
    "/inspect": {
      "post": {
        "operationId": "pgp_inspect",
        "summary": "Inspect a key and extract its public key",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "ASCII-armored OpenPGP key. Maximum 256 KiB.",
                    "maxLength": 262144
                  }
                },
                "required": [
                  "key"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation completed. For verification, independently check result.valid or result.verification.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "result"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "fingerprint": {
                          "type": "string"
                        },
                        "keyID": {
                          "type": "string"
                        },
                        "publicKey": {
                          "type": "string",
                          "description": "ASCII-armored OpenPGP key. Maximum 256 KiB.",
                          "maxLength": 262144
                        },
                        "userIDs": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "algorithm": {
                          "type": "object"
                        },
                        "created": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "expires": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "revoked": {
                          "type": "boolean"
                        },
                        "valid": {
                          "type": "boolean",
                          "description": "Self-signature/time validity, not real-world identity verification."
                        },
                        "private": {
                          "type": "boolean"
                        },
                        "protected": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "subkeys": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or operation input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Use POST",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Body exceeds 1 MiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Use application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit: retry after 60 seconds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait before retrying."
              }
            }
          },
          "503": {
            "description": "Workers busy or execution limit: retry after 5 seconds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait before retrying."
              }
            }
          }
        }
      }
    },
    "/encrypt": {
      "post": {
        "operationId": "pgp_encrypt",
        "summary": "Encrypt text or a file for keys and/or a password",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "UTF-8 content; at most 512 KiB."
                  },
                  "dataBase64": {
                    "type": "string",
                    "description": "Base64-encoded binary content; at most 512 KiB decoded.",
                    "contentEncoding": "base64"
                  },
                  "filename": {
                    "type": "string",
                    "description": "Optional embedded filename; treat as untrusted on receipt."
                  },
                  "publicKeys": {
                    "description": "One armored string (possibly containing multiple keys) or an array. At most 20 public keys in total; private keys are rejected.",
                    "oneOf": [
                      {
                        "type": "string",
                        "description": "ASCII-armored OpenPGP key. Maximum 256 KiB.",
                        "maxLength": 262144
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "ASCII-armored OpenPGP key. Maximum 256 KiB.",
                          "maxLength": 262144
                        },
                        "minItems": 1,
                        "maxItems": 20
                      }
                    ]
                  },
                  "password": {
                    "type": "string",
                    "description": "Shared encryption password; at least 12 characters when used."
                  },
                  "privateKey": {
                    "type": "string",
                    "description": "ASCII-armored OpenPGP key. Maximum 256 KiB.",
                    "maxLength": 262144
                  },
                  "passphrase": {
                    "type": "string",
                    "description": "Private-key passphrase. Required when the supplied key is encrypted.",
                    "maxLength": 1024
                  },
                  "format": {
                    "enum": [
                      "armored",
                      "binary"
                    ],
                    "default": "armored"
                  }
                },
                "allOf": [
                  {
                    "oneOf": [
                      {
                        "required": [
                          "text"
                        ]
                      },
                      {
                        "required": [
                          "dataBase64"
                        ]
                      }
                    ]
                  },
                  {
                    "anyOf": [
                      {
                        "required": [
                          "publicKeys"
                        ]
                      },
                      {
                        "required": [
                          "password"
                        ]
                      }
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation completed. For verification, independently check result.valid or result.verification.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "result"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "dataBase64": {
                          "type": "string",
                          "description": "Base64-encoded binary content; at most 512 KiB decoded.",
                          "contentEncoding": "base64"
                        },
                        "filename": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or operation input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Use POST",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Body exceeds 1 MiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Use application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit: retry after 60 seconds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait before retrying."
              }
            }
          },
          "503": {
            "description": "Workers busy or execution limit: retry after 5 seconds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait before retrying."
              }
            }
          }
        }
      }
    },
    "/decrypt": {
      "post": {
        "operationId": "pgp_decrypt",
        "summary": "Decrypt a message, file, or login challenge",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "description": "ASCII-armored encrypted message."
                  },
                  "dataBase64": {
                    "type": "string",
                    "description": "Base64-encoded binary content; at most 512 KiB decoded.",
                    "contentEncoding": "base64"
                  },
                  "privateKey": {
                    "type": "string",
                    "description": "ASCII-armored OpenPGP key. Maximum 256 KiB.",
                    "maxLength": 262144
                  },
                  "passphrase": {
                    "type": "string",
                    "description": "Private-key passphrase. Required when the supplied key is encrypted.",
                    "maxLength": 1024
                  },
                  "password": {
                    "type": "string",
                    "description": "Shared encryption password."
                  },
                  "publicKeys": {
                    "description": "One armored string (possibly containing multiple keys) or an array. At most 20 public keys in total; private keys are rejected.",
                    "oneOf": [
                      {
                        "type": "string",
                        "description": "ASCII-armored OpenPGP key. Maximum 256 KiB.",
                        "maxLength": 262144
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "ASCII-armored OpenPGP key. Maximum 256 KiB.",
                          "maxLength": 262144
                        },
                        "minItems": 1,
                        "maxItems": 20
                      }
                    ]
                  },
                  "format": {
                    "enum": [
                      "utf8",
                      "binary"
                    ],
                    "default": "utf8"
                  }
                },
                "allOf": [
                  {
                    "oneOf": [
                      {
                        "required": [
                          "message"
                        ]
                      },
                      {
                        "required": [
                          "dataBase64"
                        ]
                      }
                    ]
                  },
                  {
                    "anyOf": [
                      {
                        "required": [
                          "privateKey"
                        ]
                      },
                      {
                        "required": [
                          "password"
                        ]
                      }
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation completed. For verification, independently check result.valid or result.verification.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "result"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "text": {
                          "type": "string",
                          "description": "UTF-8 content; at most 512 KiB."
                        },
                        "dataBase64": {
                          "type": "string",
                          "description": "Base64-encoded binary content; at most 512 KiB decoded.",
                          "contentEncoding": "base64"
                        },
                        "filename": {
                          "type": "string"
                        },
                        "signatures": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "keyID": {
                                "type": "string"
                              },
                              "valid": {
                                "type": "boolean"
                              },
                              "status": {
                                "enum": [
                                  "valid",
                                  "invalid-or-unknown",
                                  "unverified"
                                ]
                              }
                            }
                          }
                        },
                        "verification": {
                          "enum": [
                            "unsigned",
                            "unverified",
                            "valid",
                            "invalid-or-unknown"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or operation input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Use POST",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Body exceeds 1 MiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Use application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit: retry after 60 seconds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait before retrying."
              }
            }
          },
          "503": {
            "description": "Workers busy or execution limit: retry after 5 seconds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait before retrying."
              }
            }
          }
        }
      }
    },
    "/sign": {
      "post": {
        "operationId": "pgp_sign",
        "summary": "Create a cleartext or detached signature",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "UTF-8 content; at most 512 KiB."
                  },
                  "dataBase64": {
                    "type": "string",
                    "description": "Base64-encoded binary content; at most 512 KiB decoded.",
                    "contentEncoding": "base64"
                  },
                  "filename": {
                    "type": "string",
                    "description": "Optional embedded filename; treat as untrusted on receipt."
                  },
                  "privateKey": {
                    "type": "string",
                    "description": "ASCII-armored OpenPGP key. Maximum 256 KiB.",
                    "maxLength": 262144
                  },
                  "passphrase": {
                    "type": "string",
                    "description": "Private-key passphrase. Required when the supplied key is encrypted.",
                    "maxLength": 1024
                  },
                  "detached": {
                    "type": "boolean",
                    "default": false,
                    "description": "Always true for binary content."
                  }
                },
                "required": [
                  "privateKey"
                ],
                "oneOf": [
                  {
                    "required": [
                      "text"
                    ]
                  },
                  {
                    "required": [
                      "dataBase64"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation completed. For verification, independently check result.valid or result.verification.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "result"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "signedMessage": {
                          "type": "string"
                        },
                        "signature": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or operation input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Use POST",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Body exceeds 1 MiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Use application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit: retry after 60 seconds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait before retrying."
              }
            }
          },
          "503": {
            "description": "Workers busy or execution limit: retry after 5 seconds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait before retrying."
              }
            }
          }
        }
      }
    },
    "/verify": {
      "post": {
        "operationId": "pgp_verify",
        "summary": "Verify signatures; require result.valid === true",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "UTF-8 content; at most 512 KiB."
                  },
                  "dataBase64": {
                    "type": "string",
                    "description": "Base64-encoded binary content; at most 512 KiB decoded.",
                    "contentEncoding": "base64"
                  },
                  "filename": {
                    "type": "string",
                    "description": "Optional embedded filename; treat as untrusted on receipt."
                  },
                  "signedMessage": {
                    "type": "string",
                    "description": "Complete PGP SIGNED MESSAGE block for cleartext verification."
                  },
                  "signature": {
                    "type": "string",
                    "description": "ASCII-armored detached signature; requires text or dataBase64."
                  },
                  "publicKeys": {
                    "description": "One armored string (possibly containing multiple keys) or an array. At most 20 public keys in total; private keys are rejected.",
                    "oneOf": [
                      {
                        "type": "string",
                        "description": "ASCII-armored OpenPGP key. Maximum 256 KiB.",
                        "maxLength": 262144
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "ASCII-armored OpenPGP key. Maximum 256 KiB.",
                          "maxLength": 262144
                        },
                        "minItems": 1,
                        "maxItems": 20
                      }
                    ]
                  }
                },
                "required": [
                  "publicKeys"
                ],
                "oneOf": [
                  {
                    "required": [
                      "signedMessage"
                    ]
                  },
                  {
                    "required": [
                      "text",
                      "signature"
                    ]
                  },
                  {
                    "required": [
                      "dataBase64",
                      "signature"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation completed. For verification, independently check result.valid or result.verification.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "result"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "valid": {
                          "type": "boolean"
                        },
                        "signatures": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "keyID": {
                                "type": "string"
                              },
                              "valid": {
                                "type": "boolean"
                              },
                              "status": {
                                "enum": [
                                  "valid",
                                  "invalid-or-unknown",
                                  "unverified"
                                ]
                              }
                            }
                          }
                        },
                        "text": {
                          "type": "string",
                          "description": "UTF-8 content; at most 512 KiB."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or operation input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Use POST",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Body exceeds 1 MiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Use application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit: retry after 60 seconds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait before retrying."
              }
            }
          },
          "503": {
            "description": "Workers busy or execution limit: retry after 5 seconds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait before retrying."
              }
            }
          }
        }
      }
    },
    "/revoke": {
      "post": {
        "operationId": "pgp_revoke",
        "summary": "Create a revoked public key; does not publish it",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "privateKey": {
                    "type": "string",
                    "description": "ASCII-armored OpenPGP key. Maximum 256 KiB.",
                    "maxLength": 262144
                  },
                  "passphrase": {
                    "type": "string",
                    "description": "Private-key passphrase. Required when the supplied key is encrypted.",
                    "maxLength": 1024
                  },
                  "key": {
                    "type": "string",
                    "description": "ASCII-armored OpenPGP key. Maximum 256 KiB.",
                    "maxLength": 262144
                  },
                  "revocationCertificate": {
                    "type": "string",
                    "description": "ASCII-armored OpenPGP key. Maximum 256 KiB.",
                    "maxLength": 262144
                  }
                },
                "anyOf": [
                  {
                    "required": [
                      "privateKey"
                    ]
                  },
                  {
                    "required": [
                      "key",
                      "revocationCertificate"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation completed. For verification, independently check result.valid or result.verification.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "result"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "publicKey": {
                          "type": "string",
                          "description": "ASCII-armored OpenPGP key. Maximum 256 KiB.",
                          "maxLength": 262144
                        },
                        "fingerprint": {
                          "type": "string"
                        },
                        "revoked": {
                          "const": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or operation input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Use POST",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Body exceeds 1 MiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Use application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit: retry after 60 seconds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait before retrying."
              }
            }
          },
          "503": {
            "description": "Workers busy or execution limit: retry after 5 seconds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait before retrying."
              }
            }
          }
        }
      }
    },
    "/change-passphrase": {
      "post": {
        "operationId": "pgp_change_passphrase",
        "summary": "Create a newly protected copy of a private key",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "privateKey": {
                    "type": "string",
                    "description": "ASCII-armored OpenPGP key. Maximum 256 KiB.",
                    "maxLength": 262144
                  },
                  "passphrase": {
                    "type": "string",
                    "description": "Private-key passphrase. Required when the supplied key is encrypted.",
                    "maxLength": 1024
                  },
                  "newPassphrase": {
                    "type": "string",
                    "description": "At least 12 characters; generated if omitted or empty.",
                    "maxLength": 1024
                  }
                },
                "required": [
                  "privateKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operation completed. For verification, independently check result.valid or result.verification.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "result"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "privateKey": {
                          "type": "string",
                          "description": "ASCII-armored OpenPGP key. Maximum 256 KiB.",
                          "maxLength": 262144
                        },
                        "publicKey": {
                          "type": "string",
                          "description": "ASCII-armored OpenPGP key. Maximum 256 KiB.",
                          "maxLength": 262144
                        },
                        "passphrase": {
                          "type": "string",
                          "description": "Private-key passphrase. Required when the supplied key is encrypted.",
                          "maxLength": 1024
                        },
                        "fingerprint": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or operation input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Use POST",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Body exceeds 1 MiB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Use application/json",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit: retry after 60 seconds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait before retrying."
              }
            }
          },
          "503": {
            "description": "Workers busy or execution limit: retry after 5 seconds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "error"
                  ],
                  "properties": {
                    "ok": {
                      "const": false
                    },
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait before retrying."
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "pgp_health",
        "summary": "Service capabilities, version, and limits",
        "security": [],
        "responses": {
          "200": {
            "description": "Service information",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "externalDocs": {
    "description": "API and local SDK guide",
    "url": "https://website2zip.com/pgp/agent-guide.txt"
  }
}
