Get file details

Get file details API

GET https://api.imagekit.io/v1/files/:fileId/details

Get all the details and attributes of the current version of the file.

Path Parameters

NameTypeDescription

fileId

string

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

Headers

NameTypeDescription

Authorization

string

base64 encoding of your_private_api_key:

Note the colon in the end.

{
    "fileId": "598821f949c0a938d57563bd",
    "type": "file",
    "name": "file1.jpg",
    "filePath": "/images/products/file1.jpg",
    "tags": ["t-shirt", "round-neck", "sale2019"],
    "AITags": [
        {
            "name": "Shirt",
            "confidence": 90.12,
            "source": "google-auto-tagging"
        },
        /* ... more googleVision tags ... */
    ],
    "versionInfo": {
            "id": "598821f949c0a938d57563bd",
            "name": "Version 1"
    },
    "isPrivateFile": false,
    "customCoordinates": null,
    "url": "https://ik.imagekit.io/your_imagekit_id/images/products/file1.jpg",
    "thumbnail": "https://ik.imagekit.io/your_imagekit_id/tr:n-media_library_thumbnail/images/products/file1.jpg",
    "fileType": "image",
    "mime": "image/jpeg",
    "width": 100,
    "height": 100,
    "size": 100,
    "hasAlpha": false,
    "customMetadata": {
        brand: "Nike",
        color: "red"
    },
    "createdAt": "2019-08-24T06:14:41.313Z",
    "updatedAt": "2019-08-24T06:14:41.313Z"
}

Response structure and status code (application/JSON)

In case of an error, you will get an error code along with the error message. On success, you will receive a 200 status code with the file object in JSON-encoded response body.

Examples

Here is the example request to understand the API usage.

# The unique fileId of the uploaded file. fileId is returned in response of list files API and upload API.
curl -X GET "https://api.imagekit.io/v1/files/file_id/details" \
-u your_private_api_key:

Last updated