Upload image to imagekit

Hi everyone, I am looking for help on how to upload an image to imagekit through the API.

I’m not sure how to setup the HTTP request, and what it should look like. Is there anyone who has done this, and can put me through. Thanks for your help

The API reference for uploading is here - The POST body is constructed in HTTP Form Field format. The workflow below contains a basic, working image upload setup.

The authentication is done with a Basic Auth header, but Imagekit’s approach is a little weird because the private key is used as the username, and there is no password. n8n seems to create and encode the header ok with a Generic Basic Auth Credential item type, but because the “secret” part is in a *non-secret field (User), it won’t be hidden like the Password field would.
See: API Authentication Docs

(This not my actual key. Replace the User field value with your own private key.)

Hey @Michael_Smith1 hope all is well.

Thanks for reaching out in DM. You mentioned that you are no longer looking for using ImageKit and would rather use UploadCare instead. Here is how you can do it.

https://uploadcare.com/docs/uploading-files/#request-and-response
https://uploadcare.com/api-refs/upload-api/#tag/Upload/operation/baseUpload

Alternatively, if you wish to upload an image based on the existing URL, you can do this instead:

https://uploadcare.com/docs/uploading-files/#from-url
https://uploadcare.com/api-refs/upload-api/#tag/Upload/operation/fromURLUpload

UPD:

an updated version of this post can be found here:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.