Bytefusedocs

Protect

Unlock PDF

Remove a password you already know from a PDF and get back an unencrypted copy — useful for downstream tools that can’t open protected files.

Free to try — no key required 10 credits / callSynchronous

Overview

You must supply the current password — this removes a known password, it does not crack an unknown one. On the free-try path.

POSThttps://api.bytefuse.in/api/v1/security/security/password/remove

The path segment is doubled

As with Protect, the real path is /api/v1/security/security/password/remove.

Request

Content type multipart/form-data:

filefilerequired
The protected PDF. Must end in .pdf (else 400).
passwordstringrequired
The current password that opens the file. A file that isn’t actually encrypted still succeeds (returns a re-saved, unencrypted copy).

Response

200 OK, application/json:

200 OK
{
  "job_id": "...",
  "status": "completed",
  "operation_type": "remove_password",
  "success": true,
  "file_url": "https://<r2-host>/password_removed/20260704/<uuid>.pdf",
  "processing_time_ms": 95,
  "created_at": "2026-07-04T12:00:00Z"
}

Download from file_url (public, no expires_at). X-Credits-Charged reports the credits billed (0 anonymous).

Examples

curl -X POST https://api.bytefuse.in/api/v1/security/security/password/remove \
  -H "X-API-Key: dt_live_your_key" \
  -F "file=@locked.pdf" \
  -F "password=open-me-123"

Errors

A wrong password returns 400

Supplying the wrong password fails with 400 (not 401) — the engine treats it as a bad request.
400The file isn’t a .pdf, is empty, the password is wrong, or the PDF is corrupt.
422Missing password.
401Anonymous with no browser origin (server-side no-key call).
402 / 429 / 503Insufficient credits, rate limited, or capacity/config error.