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

File Info

Returns identity, facts, and metadata for a file of ANY format.#

POST/lmkit/v1/file-info

Universal file inspection: identifies the format from its leading magic bytes and extracts its metadata - image dimensions and EXIF/GPS, video and audio stream summaries, PDF and Office document properties - into one stable envelope. This is a lightweight, fast operation that does not require an AI model: only container headers are read, media data is never decoded. Inspection never fails on content: an unrecognized format still returns the identity block with format 'unknown', and malformed files return whatever was readable plus warnings. For deep PDF analysis (PDF/A level, permissions, embedded files, raw XMP) use lmkit/v1/pdf-info.

Request body

application/json ·

PropertyTypeDescription
inputrequiredstring

The input file, of ANY format. When input_format is 'Base64EncodedFile', provide a base64-encoded 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'.

file_namestring

Optional original file name. Used only as an identification fallback for signature-less formats; identification is otherwise driven by the file's leading magic bytes.

Responses

StatusTypeDescription
200

OK

400

Bad Request

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