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.

endDate
string<date>
required

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.

startDate
string<date>
required

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.

Auth
API key
:
Parameters
:
:
Note

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.

responses
/
200
bandwidthBytes
integer

Amount of bandwidth used in bytes.

mediaLibraryStorageBytes
integer

Storage used by media library in bytes.

videoProcessingUnitsCount
integer

Number of video processing units used.

extensionUnitsCount
integer

Number of extension units used.

originalCacheStorageBytes
integer

Storage used by the original cache in bytes.

1
{
2
"bandwidthBytes": 21991583578,
3
"mediaLibraryStorageBytes": 1878758298,
4
"videoProcessingUnitsCount": 0,
5
"extensionUnitsCount": 0,
6
"originalCacheStorageBytes": 0
7
}

Examples

Here are some examples to understand the API usage.

Copy
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: