v8

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-214977372.7 KB
File Metadata

Get uploaded file metadata

You can programmatically get image EXIF, pHash, and other metadata for uploaded files in the ImageKit.io media library using this API.

You can also get the metadata in upload API response by passing metadata in responseFields parameter.

get/v1/files/{fileId}/metadata

Path parameters

fileIdstring required

The unique fileId of the uploaded file. fileId is returned in the list and search assets API and upload API.

Response

File metadata object.

heightinteger

The height of the image or video in pixels.

widthinteger

The width of the image or video in pixels.

sizeinteger

The file size in bytes.

formatstring

The format of the file (e.g., 'jpg', 'mp4').

hasColorProfileboolean

Indicates if the image has a color profile.

qualityinteger

The quality indicator of the image.

densityinteger

The density of the image in DPI.

hasTransparencyboolean

Indicates if the image contains transparent areas.

pHashstring

Perceptual hash of the image.

bitRateinteger

The bit rate of the video in kbps (only for video).

durationinteger

The duration of the video in seconds (only for video).

audioCodecstring

The audio codec used in the video (only for video).

videoCodecstring

The video codec used in the video (only for video).