Skip to main content
Use ImageKit through Corsair: one client, typed API calls. Create a private API key in the ImageKit dashboard under Developer options, API keys. Things to know before you call:
  • Uploads accept a URL or base64. files.upload takes an https URL ImageKit fetches, or base64-encoded content. It is exempt from rate limits but the largest payloads take a while, so the client allows 120 seconds.
  • Deletes are permanent. files.delete, files.bulkDelete, fileVersions.delete and folders.delete cannot be undone; ImageKit keeps no trash. Version restore works only while the version still exists.
  • Bulk calls can partly succeed. The three bulk tag calls cap at 50 files per request; files.bulkDelete and the bulk tag calls answer 207 with per-file errors when some targets failed, which this plugin parses as a result, not as a thrown error.
  • Folder operations run as jobs. folders.copy, folders.move and folders.rename answer a jobId at once; poll folders.getJobStatus until status is Completed. cache.purge does the same with a requestId and cache.getPurgeStatus.
  • Rate limits. Every endpoint except upload is rate limited per account; a 429 carries X-RateLimit-Reset in milliseconds. The plugin retries 429s up to three times with backoff starting at one second.
  • Paging. files.list pages with limit (up to 1000) and skip; there is no cursor, so pages past a concurrent change can overlap.
  • Search. files.list narrows with a searchQuery expression over name, tags, type, size and createdAt, e.g. name = "summer" AND tags IN ["sale"]. In a query, type is file, file-version or folder; to keep only images, also pass fileType: 'image'.
What you get:
  • 26 typed API operations

Setup

1

Install

2

Add the plugin

corsair.ts
With multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.
3

Choose authentication

4

Connect a tenant

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.

Example API calls

List files in a folder
Upload a file into the media library
See the full list on the API page.

What’s next

API reference

Every imagekit.api.* operation with input and output types.

Connect / OAuth

createLink, Hub delivery, and tenant connect flows.

Use with agents

Expose this plugin’s operations as MCP tools.