ImageKit.io offers REST API so that you can programmatically integrate ImageKit.io in your application. Currently, we offer APIs for:
Uploading files in Media library.
Updating files details e.g., tags and custom coordinates for cropping.
Listing and searching files in Media library by file/folder name, tags.
Purging cache on CDN.
Getting image metadata for an image file.
Except upload API, all our APIs accepts JSON-encoded request bodies and returns JSON-encoded response.
ImageKit.io API uses standard HTTP error codes.
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:
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
500, 502, 503, 504 Server error
Something went wrong with ImageKit.io API. Please create a support ticket by emailing us at email@example.com.
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.
We have released v1 version of all our APIs which start with endpoint
https://api.imagekit.io/v1/. The new APIs are much simpler to understand and implement. However, if you are looking for old upload and admin APIs, then go to https://old-docs.imagekit.io.