API Introduction

ImageKit.io offers REST API so that you can programmatically integrate ImageKit.io in your application. Currently, we offer APIs for:

  1. Uploading files in the Media library.

  2. Updating files details, e.g., tags and custom coordinates for cropping.

  3. Listing and searching files in the Media library by file/folder name, tags.

  4. Purging cache on CDN.

  5. Getting image metadata for an image file.

  6. Bulk add or remove tags.

  7. Copy or move files.

  8. Copy or move folder.

  9. Get bulk job status for copy and move folder jobs.

Request and response encoding

Except for upload API, all our APIs accept JSON-encoded request bodies and returns JSON-encoded response.

Run in Postman

We’ve created a Postman collection to make testing and working with our API simpler.

Run in Postman

Error codes

ImageKit.io API uses standard HTTP error codes.

Error code


2xx OK

Everything worked as expected.

400 Bad request

The request was unacceptable, often due to missing or invalid parameter(s). In this case a JSON-encoded error response is returned with the following properties:

401 Unauthorized

No valid API key provided.

429 Too Many Requests

Too many requests hit the API too quickly. We recommend you to throttle request rate as per the value of X-RateLimit-Limit and X-RateLimit-Reset response headers and stay within rate limits.

500, 502, 503, 504 Server error

Something went wrong with ImageKit.io API. Please create a support ticket by emailing us at support@imagekit.io.

Request ID (x-ik-requestId)

All API response contains a x-ik-requestId header. The value of this header is a unique identifier associated with the API request. If you face any issues with any API, then provide this header value in your support ticket to help us troubleshoot the issue quickly.