{
  "name": "Dr Fast Upload API",
  "description": "Public API for lossless, encrypted file hosting.",
  "base_url": "https://dr-fast-upload.pages.dev",
  "endpoints": {
    "POST /api/upload": {
      "description": "Upload a single file with client-side AES-256-GCM encryption and instant duplicate detection.",
      "headers": {
        "Content-Type": "application/json"
      },
      "body": {
        "filename": "string (required, e.g. 'image.png')",
        "content": "string (required, Base64 encoded AES-256-GCM ciphertext, max 24MB decoded)",
        "encrypted": "boolean (required, must be true)",
        "rawHash": "string (recommended, hex SHA-256 of unencrypted file for instant duplicate detection)",
        "uploadDate": "string (optional, ISO 8601 date)",
        "clientTimestamp": "number (optional, UNIX timestamp)",
        "pHash": "string (optional, perceptual hash for images)"
      },
      "responses": {
        "200 OK": "Successfully uploaded. Returns { success: true, url: '...', cached: false }",
        "409 Conflict": "File already exists. Returns existing file URL instantly. { success: true, cached: true, url: '...' }",
        "413 Payload Too Large": "File exceeds 24MB limit.",
        "415 Unsupported Media Type": "Executable file extension blocked."
      }
    },
    "POST /api/batch-upload": {
      "description": "Upload multiple files in a single request under one single Git commit.",
      "headers": {
        "Content-Type": "application/json"
      },
      "body": {
        "files": [
          {
            "filename": "string (required)",
            "content": "string (required, Base64 encrypted ciphertext)",
            "encrypted": "boolean (required, true)",
            "rawHash": "string (recommended, plaintext SHA-256)"
          }
        ]
      },
      "responses": {
        "200 OK": "Returns { success: true, results: [{ filename: '...', url: '...', cached: boolean }] }"
      }
    },
    "POST /api/album/create": {
      "description": "Create a grouped shareable album collection for multiple files.",
      "headers": {
        "Content-Type": "application/json"
      },
      "body": {
        "files": "array of strings (required, list of file stored names/hashes)"
      },
      "responses": {
        "200 OK": "Returns { success: true, albumId: '...', url: '...' }"
      }
    },
    "POST /api/fetch-url": {
      "description": "Fetch a public remote URL and host it automatically.",
      "headers": {
        "Content-Type": "application/json"
      },
      "body": {
        "url": "string (required, remote URL to fetch)"
      },
      "responses": {
        "200 OK": "Returns { success: true, url: '...' }"
      }
    }
  },
  "limits": {
    "max_file_size": "24 MB",
    "blocked_extensions": [
      ".exe",
      ".bat",
      ".cmd",
      ".sh",
      ".ps1",
      ".vbs",
      ".scr",
      ".msi",
      ".com",
      ".pif"
    ]
  }
}