File Info
Returns identity, facts, and metadata for a file of ANY format.#
/lmkit/v1/file-infoUniversal 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 ·
| Property | Type | Description |
|---|---|---|
inputrequired | string | 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_name | string | 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
| Status | Type | Description |
|---|---|---|
| 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"
}'