Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nayalsaurav/Storx/llms.txt
Use this file to discover all available pages before exploring further.
GET /api/imagekit-auth generates signed authentication parameters for use with ImageKit’s client-side SDK. It wraps ImageKit’s getAuthenticationParameters() method, signs the parameters server-side using your IMAGEKIT_PRIVATE_KEY, and returns them to the authenticated caller. A valid Clerk session is required.
Request
| Property | Value |
|---|---|
| Method | GET |
| Path | /api/imagekit-auth |
| Auth | Clerk session required |
Response
200 — Success
ImageKit authentication object generated by
imagekit.getAuthenticationParameters().Error Responses
| Status | Error message | Cause |
|---|---|---|
401 | unauthorized | No active Clerk session found for the request. |
500 | failed to generate auth parameters for imagekit | IMAGEKIT_PRIVATE_KEY is missing or ImageKit threw an error. |
Usage
Call this endpoint before performing a client-side upload via the ImageKit Next.js SDK (@imagekit/next). The SDK requires a fresh set of auth parameters for every upload to authenticate the request against ImageKit’s servers — this endpoint is the server-side provider for those parameters.
Typical flow:
Fetch auth parameters
Your client calls
GET /api/imagekit-auth to obtain a signed token,
expire, and signature.Initiate the upload
Pass the
authParams object to the ImageKit client-side upload function
alongside the file and any metadata.Examples
Full client-side upload example
This endpoint is called automatically by the Storx dashboard’s file upload
flow. You only need to call it directly if you are building a custom upload
integration outside of the default dashboard UI.