PDF Info
Returns metadata and structural information about a PDF document.#
/lmkit/v1/pdf-infoReturns metadata including page count, PDF version, title, author, creation date, file size, and PDF/A conformance level. This is a lightweight, fast operation that does not require an AI model. Returns 422 Unprocessable Entity with an ErrorResponse body if the input file cannot be processed. The 'error' field contains one of: 'password_required' (encrypted PDF), 'invalid_format' (not a valid PDF), 'unsupported_security' (unsupported encryption), 'page_error' (content error).
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
inputrequired | string | The input PDF document. When input_format is 'Base64EncodedFile', provide a base64-encoded PDF payload. When 'FileIdentifier', provide the file ID previously returned by the lmkit/v1/files/upload endpoint. |
input_format | How the input is provided. Accepted values: 'Base64EncodedFile' or 'FileIdentifier'. Defaults to 'Base64EncodedFile'. |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | OK | |
| 422 | Unprocessable Entity | |
| 400 | Bad Request |
curl -X POST "$LMKIT_ONE_URL/lmkit/v1/pdf-info" \
-H "Authorization: Bearer $LMKIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "",
"input_format": "Base64EncodedFile"
}'