Authentication

Your API requests are authenticated using the account's private API key. If you do not include your key when making an API request or use an incorrect one, we return an error. You can view your API keys in ImageKit.io dashboard under the developer's tab.

Authentication to the API is performed via HTTP Basic Auth. Provide your private API key as the basic auth username value. You do not need to provide a password.

Only HTTPs supported All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Examples

You can provide the private API key in a curl request as:

curl https://api.imagekit.io/v1/files \
-u your_private_api_key:
# The colon prevents curl from asking for a password.

You can also use "Authorization" header and provide base64 encoded value of string your_private_api_key:

If you encode your_private_api_key: using base64, you will get eW91cl9wcml2YXRlX2FwaV9rZXk6

curl https://api.imagekit.io/v1/files \
-H 'Authorization: Basic eW91cl9wcml2YXRlX2FwaV9rZXk6'