Examples
Here are some examples to understand the API usage.
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:
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.
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.
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.
Here, you can explore machine-generated code examples. For practical applications, refer to the examples section below, which includes detailed code snippets from the ImageKit SDKs.
curl --request GET \--url https://api.imagekit.io/v1/accounts/usage \--header 'Accept: application/json' \--header 'Authorization: Basic 123'
In the response, you will get different usage metrics.
Amount of bandwidth used in bytes.
Storage used by media library in bytes.
Number of video processing units used.
Number of extension units used.
Storage used by the original cache in bytes.
1{2"bandwidthBytes": 21991583578,3"mediaLibraryStorageBytes": 1878758298,4"videoProcessingUnitsCount": 0,5"extensionUnitsCount": 0,6"originalCacheStorageBytes": 07}
Here are some examples to understand the API usage.
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: