Saved extensions let you create reusable configurations for different ImageKit extensions and apply them across multiple files, either from the dashboard or via APIs. For example, instead of repeatedly selecting the same set of options for background removal or repeatedly creating a long list of sub-tasks within AI tasks, you can create a reusable configuration of these extensions, save it, and reference it by its ID in APIs and the UI.
Key benefits:
- Reusability: Define complex configurations once, use everywhere with just their IDs.
- Consistency: Ensure the same processing logic across all files to eliminate manual errors.
- Team collaboration: Share standardized configurations across your organization.
- Simplified API calls: Reference by ID instead of repeating full JSON configuration.
Supported extension types
Saved extensions work with all ImageKit extensions:
| Extension Type | Common Use Cases |
|---|---|
| AI tasks | Product categorization, brand compliance, quality control with controlled vocabularies |
| Auto-tagging | General image categorization and discovery with free-form AI tags |
| Auto-description | Accessibility, SEO, and content management with AI-generated descriptions |
| Remove background | Product photography, e-commerce, and graphic design automation |
The primary benefit of saved extensions is for AI tasks that inherently have complex JSON configurations containing multiple sub-tasks, vocabularies, and conditional logic. Instead of maintaining and adding the entire JSON of an AI task every time, you can simply reference the saved extension ID in the APIs and from the dashboard.
We have included sample configurations for different extension types in this documentation and under AI tasks to make it easier for you to copy-paste and modify the configurations as per your requirements.
Alternatively, your technology team, or ImageKit's support team, or your dedicated Customer Success Manager, can also help you configure these extensions.
Managing saved extensions via dashboard
Creating a saved extension
Go to Settings → Media Library → Saved Extensions and click Add New.
Fill in the form:
- Name: Descriptive name for the extension (e.g., "Product Image Classifier")
- Description: Explain what this extension does
- Configuration: The complete extension JSON. Sample configurations are given below.
Click Create to save.
Sample configurations for Saved Extensions
{
"name": "remove-bg",
"options": {
"add_shadow": false,
"semitransparency": true,
"bg_color": "81d4fa", //if used, bg_image_url must be empty
"bg_image_url": "<background_image_url>" //if used, bg_color must be empty
}
}
{
"name": "google-auto-tagging" //or "aws-auto-tagging",
"options": {
"minConfidence": 70, //number
"maxTags": 5 //number
}
}
{
"name": "ai-auto-description"
}
Refer to AI Tasks documentation.
Viewing saved extensions
All saved extensions are listed at Settings → Media Library → Saved Extensions with their names, descriptions, and IDs.
Click any extension to view its full configuration.
Editing and deleting
Click the three-dot menu on any saved extension to Edit or Delete it.
Changes to saved extensions apply to future uses only. Files already processed with the old configuration are not affected.
Managing saved extensions via API
Use the Saved Extensions API for programmatic CRUD operations:
- Create saved extension
- List saved extensions
- Get saved extension details
- Update saved extension
- Delete saved extension
The API returns a unique id for each saved extension, which you use in upload and update operations.
Using saved extensions
During upload (UI)
When uploading files, expand Settings and select saved extensions from the list.
All selected files will be processed with the chosen saved extensions.
On existing files (UI)
Select files in Media Library → Right-click → Apply Saved extensions → Choose from the list → Apply
During upload (API)
Reference the saved extension ID in the extensions parameter:
curl -X POST 'https://upload.imagekit.io/api/v2/files/upload' \
-u private_key: \
-F 'file=@image.jpg' \
-F 'fileName=image.jpg' \
-F 'extensions=[{
"name": "saved-extension",
"id": "ext_abc123def456"
}]'
On existing files (API)
Use the Update File Details API:
curl -X PATCH 'https://api.imagekit.io/v1/files/:fileId/details' \
-H 'Content-Type: application/json' \
-u private_key: \
-d '{
"extensions": [{
"name": "saved-extension",
"id": "ext_abc123def456"
}]
}'