Get usage

You can programmatically get your account usage information using this API.

Please note that the response of this API is cached internally and refreshes every 6 hours.

Get account usage information

GET https://api.imagekit.io/v1/accounts/usage

Get the account usage information between two dates. Note that the API response includes data from the start date while excluding data from the end date. In other words, the data covers the period starting from the specified start date up to, but not including, the end date.

Query Parameters

NameTypeDescription

startDate

String

Specify a startDate in YYYY-MM-DD format. It should be before the endDate. The difference between startDate and endDate should be less than 90 days.

endDate

String

Specify a endDate in YYYY-MM-DD format. It should be after the startDate. The difference between startDate and endDate should be less than 90 days.

Headers

NameTypeDescription

Authorization*

String

base64 encoding of your_private_api_key:

Note the colon in the end.

{
    "bandwidthBytes": 21991583578,
    "mediaLibraryStorageBytes": 1878758298,
    "videoProcessingUnitsCount": 0,
    "extensionUnitsCount": 0,
    "originalCacheStorageBytes": 0
}

Examples

Get usage between 2023-04-01 and 2023-03-01.

curl -X GET "https://api.imagekit.io/v1/accounts/usage?startDate=2023-04-01&endDate=2023-03-01" \
-H 'Content-Type: application/json' \
-u your_private_key:

Last updated