LM-Kit OneDocs2026.8.10lm-kit.com
Document Utilities

PDF Unlock

Unlocks a password-protected PDF and returns an unprotected copy.#

POST/lmkit/v1/pdf-unlock

Decrypts a password-protected PDF using the provided password and saves an unprotected copy on the server. The original file is not modified. Returns 422 if the password is incorrect ('password_required') or the file is not a valid PDF ('invalid_format').

Request body

application/json ·

PropertyTypeDescription
inputrequiredstring

The encrypted PDF document (base64 or file identifier).

input_format

How the input is provided. Defaults to 'Base64EncodedFile'.

passwordrequiredstring

The password to unlock the PDF.

Responses

StatusTypeDescription
200

OK

400

Bad Request

422

Unprocessable Entity

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/pdf-unlock" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": "string",
  "input_format": "Base64EncodedFile",
  "password": "string"
}'