ImageKit.io offers REST API so that you can programmatically integrate ImageKit.io into your application. Currently, we offer APIs for:
- File upload - Upload files from server or client-side.
- Media management - Integrate easy-to-use media management APIs in your application for searching, updating, copying, moving, renaming and deleting media.
- File metadata - Get embedded file metadata.
- Custom metadata fields management - Imagekit.io allows you to define a schema for your custom metadata keys. Value filled against that key will have to adhere to those rules. You can create, read and update custom metadata rules and update your file with custom metadata value in file update API or file upload API.
Except for upload API, all our APIs accept JSON-encoded request bodies and returns JSON-encoded response.
We’ve created a Postman collection to make testing and working with our API simpler.
Here is the OpenAPI specification for v1 version of ImageKit's API. See a working demo here in Stoplight.
ImageKit.io API uses standard HTTP error codes.
Error code | Description |
---|---|
2xx |
Everything worked as expected. |
400 |
The request was unacceptable, often due to missing or invalid parameter(s). In this case, a JSON-encoded error response is returned with the message property. message contains the details about the error and possible solution. |
401 |
No valid API key was provided. |
403 Forbidden |
Can be for the following reasons which will be indicated in the
|
429 |
Too many requests hit the API too quickly. |
500, 502, 503, 504 |
Something went wrong with ImageKit.io API. |
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.