openapi: 3.1.0
info:
title: ImageKit API
version: 1.0.0
description: |-
Checkout [API overview](/docs/api-overview) to learn about ImageKit's APIs, authentication, rate limits, and error codes etc.
contact:
email: developer@imagekit.io
name: ImageKit Team
url: https://imagekit.io
termsOfService: "https://imagekit.io/terms/"
servers:
- url: https://api.imagekit.io
paths:
/v1/dummy/test:
post:
summary: Dummy test endpoint using all shared models
operationId: create-dummy-test
description: |
Internal test endpoint for SDK generation purposes only. This endpoint demonstrates usage of all shared models defined in the Stainless configuration and is not intended for public consumption.
tags:
- Dummy Test
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
extensions:
$ref: '#/components/schemas/Extensions'
savedExtensions:
$ref: '#/components/schemas/SavedExtension'
extensionConfig:
$ref: '#/components/schemas/ExtensionConfig'
srcOptions:
$ref: '#/components/schemas/SrcOptions'
getImageAttributesOptions:
$ref: '#/components/schemas/GetImageAttributesOptions'
responsiveImageAttributes:
$ref: '#/components/schemas/ResponsiveImageAttributes'
transformation:
$ref: '#/components/schemas/Transformation'
transformationPosition:
$ref: '#/components/schemas/TransformationPosition'
streamingResolution:
$ref: '#/components/schemas/StreamingResolution'
overlay:
$ref: '#/components/schemas/Overlay'
baseOverlay:
$ref: '#/components/schemas/BaseOverlay'
overlayPosition:
$ref: '#/components/schemas/OverlayPosition'
overlayTiming:
$ref: '#/components/schemas/OverlayTiming'
textOverlay:
$ref: '#/components/schemas/TextOverlay'
imageOverlay:
$ref: '#/components/schemas/ImageOverlay'
videoOverlay:
$ref: '#/components/schemas/VideoOverlay'
subtitleOverlay:
$ref: '#/components/schemas/SubtitleOverlay'
solidColorOverlay:
$ref: '#/components/schemas/SolidColorOverlay'
textOverlayTransformation:
$ref: '#/components/schemas/TextOverlayTransformation'
subtitleOverlayTransformation:
$ref: '#/components/schemas/SubtitleOverlayTransformation'
solidColorOverlayTransformation:
$ref: '#/components/schemas/SolidColorOverlayTransformation'
responses:
"204":
description: No content - Request processed successfully with empty response
"400":
description: Bad request
content:
application/json:
schema:
type: object
properties:
error:
type: string
example: "Invalid input data"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
/api/v1/files/upload:
servers:
- url: https://upload.imagekit.io
post:
tags:
- Upload File
operationId: upload-file
summary: Upload file V1
description: |
ImageKit.io allows you to upload files directly from both the server and client sides. For server-side uploads, private API key authentication is used. For client-side uploads, generate a one-time `token`, `signature`, and `expire` from your secure backend using private API. [Learn more](/docs/api-reference/upload-file/upload-file#how-to-implement-client-side-file-upload) about how to implement client-side file upload.
The [V2 API](/docs/api-reference/upload-file/upload-file-v2) enhances security by verifying the entire payload using JWT.
**File size limit** \
On the free plan, the maximum upload file sizes are 20MB for images, audio, and raw files and 100MB for videos. On the paid plan, these limits increase to 40MB for images, audio, and raw files and 2GB for videos. These limits can be further increased with higher-tier plans.
**Version limit** \
A file can have a maximum of 100 versions.
**Demo applications**
- A full-fledged [upload widget using Uppy](https://github.com/imagekit-samples/uppy-uploader), supporting file selections from local storage, URL, Dropbox, Google Drive, Instagram, and more.
- [Quick start guides](/docs/quick-start-guides) for various frameworks and technologies.
requestBody:
content:
multipart/form-data:
schema:
$ref: "#/components/schemas/FileUploadV1"
responses:
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
description: File uploaded successfully.
content:
application/json:
schema:
$ref: "#/components/schemas/Upload"
examples:
Simple image file:
value:
$ref: "#/components/examples/UploadResponseImage"
Simple video file:
value:
$ref: "#/components/examples/UploadResonseVideo"
Image with EmbeddedMetadata:
value:
$ref: "#/components/examples/UploadResponseWithEmbeddedMetadata"
"202":
description: File accepted for upload. Pre transformation for video is being processed.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The pre-transformation has been queued successfully.
"400":
description: Bad request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- Your request is missing file parameter.
- Your request contains both signature and basic auth parameter. Use only one method, you might be exposing your private API key.
- Your request contains invalid expire parameter. Expire parameter should be a Unix time in less than 1 hour into the future.
- A file with the same name already exists at the exact location. We could not overwrite it because both overwriteFile and useUniqueFileName are set to false.
- Your request contains invalid file parameter. The file size exceeds limits.
- Upload Limit Exceeded.
- Extensions quota exceeded.
- The file could not be uploaded because the transformation field is invalid.
- The file could not be uploaded because transformations are supported only for image and video files.
- The file could not be uploaded because the detected file type & post-transformation are incompatible.
- You have sent too many requests to update the file recently. Please try again later.
- Your request contains invalid syntax for the checks parameter.
- Your request failed 'checks' validation.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/api/v2/files/upload:
servers:
- url: https://upload.imagekit.io
post:
tags:
- Upload File
operationId: upload-file-v2
summary: Upload file V2
description: |
The V2 API enhances security by verifying the entire payload using JWT. This API is in beta.
ImageKit.io allows you to upload files directly from both the server and client sides. For server-side uploads, private API key authentication is used. For client-side uploads, generate a one-time `token` from your secure backend using private API. [Learn more](/docs/api-reference/upload-file/upload-file-v2#how-to-implement-secure-client-side-file-upload) about how to implement secure client-side file upload.
**File size limit** \
On the free plan, the maximum upload file sizes are 20MB for images, audio, and raw files, and 100MB for videos. On the paid plan, these limits increase to 40MB for images, audio, and raw files, and 2GB for videos. These limits can be further increased with higher-tier plans.
**Version limit** \
A file can have a maximum of 100 versions.
**Demo applications**
- A full-fledged [upload widget using Uppy](https://github.com/imagekit-samples/uppy-uploader), supporting file selections from local storage, URL, Dropbox, Google Drive, Instagram, and more.
- [Quick start guides](/docs/quick-start-guides) for various frameworks and technologies.
requestBody:
content:
multipart/form-data:
schema:
$ref: "#/components/schemas/FileUploadV2"
responses:
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
description: File uploaded successfully.
content:
application/json:
schema:
$ref: "#/components/schemas/Upload"
examples:
Simple image file:
value:
$ref: "#/components/examples/UploadResponseImage"
Simple video file:
value:
$ref: "#/components/examples/UploadResonseVideo"
Image with EmbeddedMetadata:
value:
$ref: "#/components/examples/UploadResponseWithEmbeddedMetadata"
"202":
description: File accepted for upload. Pre transformation for video is being processed.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The pre-transformation has been queued successfully.
"400":
description: Bad request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- Your request is missing file parameter.
- Your request contains both token and basic auth parameter. Use only one method, you might be exposing your private API key.
- Your request contains invalid payload. It does not match with the payload used to generate token.
- Your request is missing token parameter.
- Your request contains expired token.
- Your request has invalid token.
- A file with the same name already exists at the exact location. We could not overwrite it because both overwriteFile and useUniqueFileName are set to false.
- Your request contains invalid file parameter. The file size exceeds limits.
- Upload Limit Exceeded.
- Extensions quota exceeded.
- The file could not be uploaded because the transformation field is invalid.
- The file could not be uploaded because transformations are supported only for image and video files.
- The file could not be uploaded because the detected file type & post-transformation are incompatible.
- You have sent too many requests to update the file recently. Please try again later.
- Your request contains invalid syntax for the checks parameter.
- Your request failed 'checks' validation.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/v1/customMetadataFields:
post:
summary: Create new field
operationId: create-new-field
description: |
This API creates a new custom metadata field. Once a custom metadata field is created either through this API or using the dashboard UI, its value can be set on the assets. The value of a field for an asset can be set using the media library UI or programmatically through upload or update assets API.
requestBody:
content:
application/json:
schema:
type: object
required:
- name
- label
- schema
properties:
name:
type: string
description: API name of the custom metadata field. This should be unique across all (including deleted) custom metadata fields.
label:
type: string
description: Human readable name of the custom metadata field. This should be unique across all non deleted custom metadata fields. This name is displayed as form field label to the users while setting field value on an asset in the media library UI.
schema:
type: object
required:
- type
properties:
type:
description: Type of the custom metadata field.
type: string
enum:
- Text
- Textarea
- Number
- Date
- Boolean
- SingleSelect
- MultiSelect
selectOptions:
type: array
items:
oneOf:
- type: string
- type: number
- type: boolean
description: |
An array of allowed values. This property is only required if `type` property is set to `SingleSelect` or `MultiSelect`.
example:
- small
- medium
- large
- 30
- 40
- true
defaultValue:
description: |
The default value for this custom metadata field. This property is only required if `isValueRequired` property is set to `true`. The value should match the `type` of custom metadata field.
oneOf:
- type: string
- type: number
- type: boolean
- type: array
x-stainless-variantName: Mixed
title: Mixed
items:
oneOf:
- type: string
- type: number
- type: boolean
description: |
Default value should be of type array when custom metadata field type is set to `MultiSelect`.
example:
- true
- 10
- Hello
isValueRequired:
type: boolean
description: |
Sets this custom metadata field as required. Setting custom metadata fields on an asset will throw error if the value for all required fields are not present in upload or update asset API request body.
minValue:
description: |
Minimum value of the field. Only set this property if field type is `Date` or `Number`. For `Date` type field, set the minimum date in ISO8601 string format. For `Number` type field, set the minimum numeric value.
oneOf:
- type: string
- type: number
maxValue:
description: |
Maximum value of the field. Only set this property if field type is `Date` or `Number`. For `Date` type field, set the minimum date in ISO8601 string format. For `Number` type field, set the minimum numeric value.
oneOf:
- type: string
- type: number
minLength:
description: |
Minimum length of string. Only set this property if `type` is set to `Text` or `Textarea`.
type: number
maxLength:
description: |
Maximum length of string. Only set this property if `type` is set to `Text` or `Textarea`.
type: number
example:
name: price
label: price
schema:
type: Number
minValue: 1000
maxValue: 3000
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"201":
description: Custom metadata field created successfully.
content:
application/json:
schema:
$ref: "#/components/schemas/CustomMetadataField"
example:
id: 598821f949c0a938d57563dd
name: price
label: price
schema:
type: Number
minValue: 1000
maxValue: 3000
"400":
description: Bad Request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: A custom metadata field with this name already exists.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
tags:
- Digital Asset Management (DAM)
- Custom metadata fields
get:
tags:
- Digital Asset Management (DAM)
- Custom metadata fields
operationId: list-all-fields
summary: List all fields
description: |
This API returns the array of created custom metadata field objects. By default the API returns only non deleted field objects, but you can include deleted fields in the API response.
You can also filter results by a specific folder path to retrieve custom metadata fields applicable at that location. This path-specific filtering is useful when using the **Path policy** feature to determine which custom metadata fields are selected for a given path.
parameters:
- in: query
description: |
Set it to `true` to include deleted field objects in the API response.
name: includeDeleted
required: false
schema:
type: boolean
default: false
- in: query
description: |
The folder path (e.g., `/path/to/folder`) for which to retrieve applicable custom metadata fields. Useful for determining path-specific field selections when the [Path policy](https://imagekit.io/docs/dam/path-policy) feature is in use.
name: folderPath
required: false
schema:
type: string
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
description: Array of custom metadata field objects.
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/CustomMetadataField"
example:
- id: 598821f949c0a938d57563dd
name: brand
label: brand
schema:
type: Text
defaultValue: Nike
- id: 865421f949c0a835d57563dd
name: price
label: price
schema:
type: Number
minValue: 1000
maxValue: 3000
/v1/files/{fileId}/details:
get:
tags:
- Digital Asset Management (DAM)
- Managing assets
operationId: get-file-details
summary: Get file details
description: This API returns an object with details or attributes about the current version of the file.
parameters:
- description: |
The unique `fileId` of the uploaded file. `fileId` is returned in the list and search assets API and upload API.
in: path
name: fileId
required: true
schema:
type: string
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
description: File details object.
content:
application/json:
schema:
$ref: "#/components/schemas/FileDetails"
example:
fileId: 598821f949c0a938d57563bd
type: file
name: file.jpg
filePath: /images/products/file.jpg
tags:
- t-shirt
- round-neck
- sale2019
AITags:
- name: Shirt
confidence: 90.12
source: google-auto-tagging
- name: T-shirt
confidence: 80.12
source: aws-auto-tagging
versionInfo:
id: 598821f949c0a938d57563bd
name: Version 1
isPrivateFile: false
isPublished: true
customCoordinates: null
url: https://ik.imagekit.io/your_imagekit_id/images/products/file.jpg?updatedAt=1566630881313
thumbnail: https://ik.imagekit.io/your_imagekit_id/images/products/file.jpg?updatedAt=1566630881313&tr=n-ik_ml_thumbnail
fileType: image
mime: image/jpeg
width: 100
height: 100
size: 100
hasAlpha: false
customMetadata:
brand: Nike
color: red
description: "A product description"
createdAt: "2019-08-24T06:14:41.313Z"
updatedAt: "2019-08-24T06:14:41.313Z"
"404":
description: File not found.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested file does not exist.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"400":
description: Bad Request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Your request contains invalid fileId parameter.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
patch:
tags:
- Digital Asset Management (DAM)
- Managing assets
operationId: update-file-details
summary: Update file details
description: |
This API updates the details or attributes of the current version of the file. You can update `tags`, `customCoordinates`, `customMetadata`, publication status, remove existing `AITags` and apply extensions using this API.
parameters:
- description: |
The unique `fileId` of the uploaded file. `fileId` is returned in list and search assets API and upload API.
in: path
name: fileId
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateFileRequest"
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
description: Updated file details object.
content:
application/json:
schema:
allOf:
- $ref: "#/components/schemas/FileDetails"
- type: object
properties:
extensionStatus:
type: object
properties:
google-auto-tagging:
type: string
enum: ["success", "pending", "failed"]
aws-auto-tagging:
type: string
enum: ["success", "pending", "failed"]
remove-bg:
type: string
enum: ["success", "pending", "failed"]
ai-auto-description:
type: string
enum: ["success", "pending", "failed"]
ai-tasks:
type: string
enum: ["success", "pending", "failed"]
example:
fileId: 598821f949c0a938d57563bd
type: file
name: file1.jpg
filePath: /images/products/file.jpg
isPublished: true
tags:
- t-shirt
- round-neck
- sale2019
AITags:
- name: Shirt
confidence: 90.12
source: google-auto-tagging
- name: T-shirt
confidence: 80.12
source: aws-auto-tagging
versionInfo:
id: 598821f949c0a938d57563bd
name: Version 1
isPrivateFile: false
customCoordinates: null
url: https://ik.imagekit.io/your_imagekit_id/images/products/file.jpg?updatedAt=1566630881313
thumbnail: https://ik.imagekit.io/your_imagekit_id/images/products/file.jpg?updatedAt=1566630881313&tr=n-ik_ml_thumbnail
fileType: image
mime: image/jpeg
width: 100
height: 100
size: 100
hasAlpha: false
customMetadata:
brand: Nike
color: red
createdAt: "2019-08-24T06:14:41.313Z"
updatedAt: "2019-08-24T06:14:41.313Z"
extensionStatus:
google-auto-tagging: "success"
remove-bg: "pending"
ai-auto-description: "success"
ai-tasks: "success"
"404":
description: File not found.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested file does not exist.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"400":
description: Bad request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- Invalid custom metadata.
- Your request contains invalid fileId parameter.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
errors:
type: object
/v1/customMetadataFields/{id}:
patch:
tags:
- Digital Asset Management (DAM)
- Custom metadata fields
operationId: update-existing-field
summary: Update existing field
description: |
This API updates the label or schema of an existing custom metadata field.
parameters:
- description: |
Should be a valid custom metadata field id.
in: path
name: id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
label:
type: string
description: Human readable name of the custom metadata field. This should be unique across all non deleted custom metadata fields. This name is displayed as form field label to the users while setting field value on an asset in the media library UI. This parameter is required if `schema` is not provided.
schema:
type: object
description: |
An object that describes the rules for the custom metadata key. This parameter is required if `label` is not provided. Note: `type` cannot be updated and will be ignored if sent with the `schema`. The schema will be validated as per the existing `type`.
properties:
selectOptions:
type: array
items:
oneOf:
- type: string
- type: number
- type: boolean
description: |
An array of allowed values. This property is only required if `type` property is set to `SingleSelect` or `MultiSelect`.
example:
- small
- medium
- large
- 30
- 40
- true
defaultValue:
description: |
The default value for this custom metadata field. This property is only required if `isValueRequired` property is set to `true`. The value should match the `type` of custom metadata field.
oneOf:
- type: string
- type: number
- type: boolean
- type: array
x-stainless-variantName: Mixed
title: Mixed
items:
oneOf:
- type: string
- type: number
- type: boolean
description: |
Default value should be of type array when custom metadata field type is set to `MultiSelect`.
example:
- true
- 10
- Hello
isValueRequired:
type: boolean
description: |
Sets this custom metadata field as required. Setting custom metadata fields on an asset will throw error if the value for all required fields are not present in upload or update asset API request body.
minValue:
description: |
Minimum value of the field. Only set this property if field type is `Date` or `Number`. For `Date` type field, set the minimum date in ISO8601 string format. For `Number` type field, set the minimum numeric value.
oneOf:
- type: string
- type: number
maxValue:
description: |
Maximum value of the field. Only set this property if field type is `Date` or `Number`. For `Date` type field, set the minimum date in ISO8601 string format. For `Number` type field, set the minimum numeric value.
oneOf:
- type: string
- type: number
minLength:
description: |
Minimum length of string. Only set this property if `type` is set to `Text` or `Textarea`.
type: number
maxLength:
description: |
Maximum length of string. Only set this property if `type` is set to `Text` or `Textarea`.
type: number
example:
label: price
schema:
type: Number
minValue: 1000
maxValue: 3000
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"400":
description: Bad request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- Cannot update a deleted custom metadata fields.
- Either label or schema should be provided.
- A custom metadata field with this label already exists.
- Invalid schema object.
- Name cannot be updated.
- Missing id parameter.
- Your request contains invalid ID parameter.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"404":
description: Custom metadata field doesn't exist.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: No such custom metadata field exists.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"200":
description: Custom metadata field updated successfully.
content:
application/json:
schema:
$ref: "#/components/schemas/CustomMetadataField"
example:
id: 598821f949c0a938d57563dd
name: price
label: price
schema:
type: Number
minValue: 1000
maxValue: 3000
delete:
tags:
- Digital Asset Management (DAM)
- Custom metadata fields
operationId: delete-a-field
summary: Delete a field
description: |
This API deletes a custom metadata field. Even after deleting a custom metadata field, you cannot create any new custom metadata field with the same name.
parameters:
- description: |
Should be a valid custom metadata field id.
in: path
name: id
required: true
schema:
type: string
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"400":
description: Bad request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- Missing id parameter.
- Your request contains invalid ID parameter.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"404":
description: Custom metadata field doesn't exist.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: No such custom metadata field exists.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"204":
description: Custom metadata field deleted successfully.
content:
application/json:
schema:
type: object
x-stainless-empty-object: true
/v1/files:
get:
tags:
- Digital Asset Management (DAM)
operationId: list-and-search-assets
summary: List and search assets
description: |
This API can list all the uploaded files and folders in your ImageKit.io media library. In addition, you can fine-tune your query by specifying various filters by generating a query string in a Lucene-like syntax and provide this generated string as the value of the `searchQuery`.
parameters:
- in: query
name: type
required: false
description: |
Filter results by asset type.
- `file` — returns only files
- `file-version` — returns specific file versions
- `folder` — returns only folders
- `all` — returns both files and folders (excludes `file-version`)
schema:
type: string
enum:
- file
- file-version
- folder
- all
default: file
- in: query
name: sort
required: false
description: |
Sort the results by one of the supported fields in ascending or descending order.
schema:
type: string
enum:
- ASC_NAME
- DESC_NAME
- ASC_CREATED
- DESC_CREATED
- ASC_UPDATED
- DESC_UPDATED
- ASC_HEIGHT
- DESC_HEIGHT
- ASC_WIDTH
- DESC_WIDTH
- ASC_SIZE
- DESC_SIZE
- ASC_RELEVANCE
- DESC_RELEVANCE
default: ASC_CREATED
- in: query
name: path
required: false
description: |
Folder path if you want to limit the search within a specific folder. For example, `/sales-banner/` will only search in folder sales-banner.
Note : If your use case involves searching within a folder as well as its subfolders, you can use `path` parameter in `searchQuery` with appropriate operator.
Checkout [Supported parameters](/docs/api-reference/digital-asset-management-dam/list-and-search-assets#supported-parameters) for more information.
schema:
type: string
- in: query
name: searchQuery
required: false
description: |
Query string in a Lucene-like query language e.g. `createdAt > "7d"`.
Note : When the searchQuery parameter is present, the following query parameters will have no effect on the result:
1. `tags`
2. `type`
3. `name`
[Learn more](/docs/api-reference/digital-asset-management-dam/list-and-search-assets#advanced-search-queries) from examples.
schema:
type: string
- in: query
name: fileType
required: false
description: |
Filter results by file type.
- `all` — include all file types
- `image` — include only image files
- `non-image` — include only non-image files (e.g., JS, CSS, video)
schema:
type: string
enum:
- all
- image
- non-image
default: all
- in: query
name: limit
required: false
description: |
The maximum number of results to return in response.
schema:
type: integer
minimum: 1
maximum: 1000
default: 1000
- in: query
name: skip
required: false
description: |
The number of results to skip before returning results.
schema:
type: integer
minimum: 0
default: 0
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
description: List of assets.
content:
application/json:
schema:
type: array
items:
discriminator:
propertyName: type
mapping:
file: "#/components/schemas/FileDetails"
"file-version": "#/components/schemas/FileDetails"
folder: "#/components/schemas/FolderDetails"
oneOf:
- $ref: "#/components/schemas/FileDetails"
- $ref: "#/components/schemas/FolderDetails"
example:
- fileId: 598821f949c0a938d57563bd
type: file
name: file.jpg
filePath: /images/products/file.jpg
tags:
- t-shirt
- round-neck
- sale2019
AITags:
- name: Shirt
confidence: 90.12
source: google-auto-tagging
- name: T-shirt
confidence: 80.12
source: aws-auto-tagging
versionInfo:
id: 598821f949c0a938d57563bd
name: Version 2
isPrivateFile: false
customCoordinates: null
url: https://ik.imagekit.io/your_imagekit_id/images/products/file.jpg?updatedAt=1566630881313
thumbnail: https://ik.imagekit.io/your_imagekit_id/images/products/file.jpg?updatedAt=1566630881313&tr=n-ik_ml_thumbnail
fileType: image
mime: image/jpeg
width: 100
height: 100
size: 100
hasAlpha: false
customMetadata:
brand: Nike
color: red
createdAt: "2019-08-24T06:14:41.313Z"
updatedAt: "2019-08-24T06:14:41.313Z"
- fileId: 598821f949c0a938d81963bd
type: file-version
name: file.jpg
filePath: /images/products/file.jpg
tags:
- t-shirt
- sale2019
AITags:
- name: Shirt
confidence: 90.12
source: google-auto-tagging
- name: T-shirt
confidence: 80.12
source: aws-auto-tagging
versionInfo:
id: 598821f949c0a938d57563bd
name: Version 1
isPrivateFile: false
customCoordinates: null
url: https://ik.imagekit.io/your_imagekit_id/images/products/file.jpg?ik-obj-version=iAg8gxkqo_QUBwqNeQrJzuyce2XB7Gc4&updatedAt=1566630881313
thumbnail: https://ik.imagekit.io/your_imagekit_id/images/products/file.jpg?ik-obj-version=iAg8gxkqo_QUBwqNeQrJzuyce2XB7Gc4&updatedAt=1566630881313&tr=n-ik_ml_thumbnail
fileType: image
mime: image/jpeg
width: 100
height: 100
size: 100
hasAlpha: false
customMetadata:
brand: Nike
color: red
createdAt: "2019-08-24T06:15:41.313Z"
updatedAt: "2019-08-24T06:15:41.313Z"
- folderId: 6441fce4e809dd54b0dee029
type: folder
name: summer
createdAt: "2023-04-21T03:03:00.869Z"
updatedAt: "2023-04-21T03:10:22.374Z"
folderPath: "/sale"
"400":
description: Bad Request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- The value of skip parameter should be greater than or equal to 0. Value sent is -1.
- Minimum value of limit parameter is 1. Value sent is 0.
- Maximum value of limit parameter is 1000. Value sent is 2000.
- Your request contains invalid value for sort parameters.
- "Your request contains invalid value for type parameter. Please provide one of the following: file, file-version, folder, all."
- sd
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/v1/files/{fileId}:
delete:
tags:
- Digital Asset Management (DAM)
- Managing assets
operationId: delete-file
summary: Delete file
description: |
This API deletes the file and all its file versions permanently.
Note: If a file or specific transformation has been requested in the past, then the response is cached. Deleting a file does not purge the cache. You can purge the cache using purge cache API.
parameters:
- description: |
The unique `fileId` of the uploaded file. `fileId` is returned in list and search assets API and upload API.
in: path
name: fileId
required: true
schema:
type: string
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"204":
description: File deleted successfully.
"404":
description: File not found.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested file does not exist.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"400":
description: Bad Request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Your request contains invalid fileId parameter.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/v1/files/batch/deleteByFileIds:
post:
tags:
- Digital Asset Management (DAM)
- Managing assets
operationId: delete-multiple-files
summary: Delete multiple files
description: |
This API deletes multiple files and all their file versions permanently.
Note: If a file or specific transformation has been requested in the past, then the response is cached. Deleting a file does not purge the cache. You can purge the cache using purge cache API.
A maximum of 100 files can be deleted at a time.
requestBody:
content:
application/json:
schema:
type: object
required:
- fileIds
properties:
fileIds:
type: array
items:
type: string
description: |
An array of fileIds which you want to delete.
example:
fileIds:
- 598821f949c0a938d57563bd
- 598821f949c0a938d57563be
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
description: Files deleted successfully.
content:
application/json:
schema:
type: object
properties:
successfullyDeletedFileIds:
type: array
items:
type: string
description: |
An array of fileIds that were successfully deleted.
"207":
description: Partially successful. Some files were not deleted.
content:
application/json:
schema:
type: object
properties:
successfullyDeletedFileIds:
type: array
items:
type: string
description: |
An array of fileIds that were successfully deleted.
errors:
type: array
items:
type: object
properties:
fileId:
type: string
description: Unique identifier of the file that was not deleted.
error:
type: string
description: |
Error message for the file that was not deleted.
description: |
An array of fileIds that were not deleted and the error.
"400":
description: Bad request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- fileIds parameter is missing.
- fileIds cannot have more than 100 items.
- fileIds should be an Array.
- fileIds is empty.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"404":
description: File not found.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested file(s) does not exist.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
missingFileIds:
type: array
items:
type: string
description: |
An array of fileIds that were not found.
/v1/files/copy:
post:
tags:
- Digital Asset Management (DAM)
- Managing assets
operationId: copy-file
summary: Copy file
description: |
This will copy a file from one folder to another.
Note: If any file at the destination has the same name as the source file, then the source file and its versions (if `includeFileVersions` is set to true) will be appended to the destination file version history.
requestBody:
content:
application/json:
schema:
type: object
required:
- sourceFilePath
- destinationPath
properties:
sourceFilePath:
type: string
description: |
The full path of the file you want to copy.
example: /path/to/file.jpg
destinationPath:
type: string
description: |
Full path to the folder you want to copy the above file into.
example: /folder/to/copy/into/
includeFileVersions:
type: boolean
description: |
Option to copy all versions of a file. By default, only the current version of the file is copied. When set to true, all versions of the file will be copied. Default value - `false`.
example: false
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"204":
description: File copied successfully.
content:
application/json:
schema:
type: object
x-stainless-empty-object: true
"404":
description: File not found.
content:
application/json:
schema:
type: object
properties:
reason:
type: string
example: SOURCE_FILE_MISSING
message:
type: string
example: No file found with filePath `/file1.jpg`.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"400":
description: Bad request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Your request is missing parameters / contains invalid parameters.
reason:
type: string
examples:
- MISSING_PARAMETER
- SAME_SOURCE_AND_DESTINATION
- VERSION_LIMIT_EXCEEDED
- INVALID_FOLDER_PATH
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/v1/files/move:
post:
tags:
- Digital Asset Management (DAM)
- Managing assets
operationId: move-file
summary: Move file
description: |
This will move a file and all its versions from one folder to another.
Note: If any file at the destination has the same name as the source file, then the source file and its versions will be appended to the destination file.
requestBody:
content:
application/json:
schema:
type: object
required:
- sourceFilePath
- destinationPath
properties:
sourceFilePath:
type: string
description: |
The full path of the file you want to move.
example: /path/to/file.jpg
destinationPath:
type: string
description: |
Full path to the folder you want to move the above file into.
example: /folder/to/move/into/
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"204":
description: File moved successfully.
content:
application/json:
schema:
type: object
x-stainless-empty-object: true
"404":
description: File not found.
content:
application/json:
schema:
type: object
properties:
reason:
type: string
example: SOURCE_FILE_MISSING
message:
type: string
example: No file found with filePath `/file1.jpg`.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"400":
description: Bad request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Your request is missing parameters / contains invalid parameters.
reason:
type: string
examples:
- MISSING_PARAMETER
- SAME_SOURCE_AND_DESTINATION
- VERSION_LIMIT_EXCEEDED
- INVALID_FOLDER_PATH
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/v1/files/rename:
put:
tags:
- Digital Asset Management (DAM)
- Managing assets
operationId: rename-file
summary: Rename file
description: |
You can rename an already existing file in the media library using rename file API. This operation would rename all file versions of the file.
Note: The old URLs will stop working. The file/file version URLs cached on CDN will continue to work unless a purge is requested.
requestBody:
content:
application/json:
schema:
type: object
required:
- filePath
- newFileName
properties:
filePath:
type: string
description: |
The full path of the file you want to rename.
example: /path/to/file.jpg
newFileName:
type: string
description: |
The new name of the file. A filename can contain:
Alphanumeric Characters: `a-z`, `A-Z`, `0-9` (including Unicode letters, marks, and numerals in other languages).
Special Characters: `.`, `_`, and `-`.
Any other character, including space, will be replaced by `_`.
example: newFileName.jpg
purgeCache:
type: boolean
description: |
Option to purge cache for the old file and its versions' URLs.
When set to true, it will internally issue a purge cache request on CDN to remove cached content of old file and its versions. This purge request is counted against your monthly purge quota.
Note: If the old file were accessible at `https://ik.imagekit.io/demo/old-filename.jpg`, a purge cache request would be issued against `https://ik.imagekit.io/demo/old-filename.jpg*` (with a wildcard at the end). It will remove the file and its versions' URLs and any transformations made using query parameters on this file or its versions. However, the cache for file transformations made using path parameters will persist. You can purge them using the purge API. For more details, refer to the purge API documentation.
Default value - `false`
example: true
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
description: On success, you will receive `purgeRequestId` in the response body, which can be used to get the purge request status. This is only sent if the `purgeCache` is set to `true` in the request. Otherwise, the response is an empty JSON.
content:
application/json:
schema:
type: object
properties:
purgeRequestId:
type: string
description: |
Unique identifier of the purge request. This can be used to check the status of the purge request.
"207":
description: In case purgeCache is set to true and total purge request count has exceeded the quota, we will rename the file but won't purge CDN cache.
content:
application/json:
schema:
type: object
properties:
reason:
type: string
example: PURGE_FAILED
message:
type: string
example: File renamed successfully but we could not purge the CDN cache for old URL because of rate limits on purge API.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"404":
description: If no file is found at the specified filePath in the media library, then a 404 response is returned.
content:
application/json:
schema:
type: object
properties:
reason:
type: string
example: FILE_MISSING
message:
type: string
example: No file found in media library at filePath /path/to/file.jpg
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"409":
description: If a file with newFileName already exist in the same location.
content:
application/json:
schema:
type: object
properties:
reason:
type: string
example: FILE_ALREADY_EXISTS
message:
type: string
example: File with name newFileName already exists at the same location.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"400":
description: Bad request.
content:
application/json:
schema:
type: object
properties:
reason:
type: string
examples:
- MISSING_PARAMETER
- INVALID_PARAMETER
- SAME_OLD_AND_NEW_NAME
message:
type: string
example: newFileName cannot be the same as its existing name.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/v1/files/{fileId}/versions:
get:
tags:
- Digital Asset Management (DAM)
- Managing assets
operationId: list-file-versions
summary: List file versions
description: |
This API returns details of all versions of a file.
parameters:
- description: |
The unique `fileId` of the uploaded file. `fileId` is returned in list and search assets API and upload API.
in: path
name: fileId
required: true
schema:
type: string
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
description: Array of file version objects.
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/FileDetails"
example:
- fileId: 598821f949c0a938d57563bd
type: file
name: file.jpg
filePath: /images/products/file.jpg
tags:
- t-shirt
- round-neck
- sale2019
AITags:
- name: Shirt
confidence: 90.12
source: google-auto-tagging
- name: T-shirt
confidence: 80.12
source: aws-auto-tagging
versionInfo:
id: 598821f949c0a938d57563bd
name: Version 2
isPrivateFile: false
customCoordinates: null
url: https://ik.imagekit.io/your_imagekit_id/images/products/file.jpg?updatedAt=1566630881313
thumbnail: https://ik.imagekit.io/your_imagekit_id/images/products/file.jpg?updatedAt=1566630881313&tr=n-ik_ml_thumbnail
fileType: image
mime: image/jpeg
width: 100
height: 100
size: 100
hasAlpha: false
customMetadata:
brand: Nike
color: red
createdAt: "2019-08-24T06:14:41.313Z"
updatedAt: "2019-08-24T06:14:41.313Z"
- fileId: 598821f949c0a938d81963bd
type: file-version
name: file.jpg
filePath: /images/products/file.jpg
tags:
- t-shirt
- sale2019
AITags:
- name: Shirt
confidence: 90.12
source: google-auto-tagging
- name: T-shirt
confidence: 80.12
source: aws-auto-tagging
versionInfo:
id: 598821f949c0a938d57563bd
name: Version 1
isPrivateFile: false
customCoordinates: null
url: https://ik.imagekit.io/your_imagekit_id/images/products/file.jpg?ik-obj-version=iAg8gxkqo_QUBwqNeQrJzuyce2XB7Gc4&updatedAt=1566630881313
thumbnail: https://ik.imagekit.io/your_imagekit_id/images/products/file.jpg?ik-obj-version=iAg8gxkqo_QUBwqNeQrJzuyce2XB7Gc4&updatedAt=1566630881313&tr=n-ik_ml_thumbnail
fileType: image
mime: image/jpeg
width: 100
height: 100
size: 100
hasAlpha: false
customMetadata:
brand: Nike
color: red
createdAt: "2019-08-24T06:15:41.313Z"
updatedAt: "2019-08-24T06:15:41.313Z"
"404":
description: File not found.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested file does not exist.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"400":
description: Bad Request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Your request contains invalid fileId parameter.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/v1/files/{fileId}/versions/{versionId}:
get:
tags:
- Digital Asset Management (DAM)
- Managing assets
operationId: get-file-version-details
summary: Get file version details
description: This API returns an object with details or attributes of a file version.
parameters:
- description: |
The unique `fileId` of the uploaded file. `fileId` is returned in list and search assets API and upload API.
in: path
name: fileId
required: true
schema:
type: string
- description: |
The unique `versionId` of the uploaded file. `versionId` is returned in list and search assets API and upload API.
in: path
name: versionId
required: true
schema:
type: string
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
description: File version details object.
content:
application/json:
schema:
$ref: "#/components/schemas/FileDetails"
example:
fileId: 598821f949c0a938d81963bd
type: file-version
name: file.jpg
filePath: /images/products/file.jpg
tags:
- t-shirt
- sale2019
AITags:
- name: Shirt
confidence: 90.12
source: google-auto-tagging
- name: T-shirt
confidence: 80.12
source: aws-auto-tagging
versionInfo:
id: 598821f949c0a938d57563bd
name: Version 1
isPrivateFile: false
customCoordinates: null
url: https://ik.imagekit.io/your_imagekit_id/images/products/file.jpg?ik-obj-version=iAg8gxkqo_QUBwqNeQrJzuyce2XB7Gc4&updatedAt=1566630881313
thumbnail: https://ik.imagekit.io/your_imagekit_id/images/products/file.jpg?ik-obj-version=iAg8gxkqo_QUBwqNeQrJzuyce2XB7Gc4&updatedAt=1566630881313&tr=n-ik_ml_thumbnail
fileType: image
mime: image/jpeg
width: 100
height: 100
size: 100
hasAlpha: false
customMetadata:
brand: Nike
color: red
createdAt: "2019-08-24T06:15:41.313Z"
updatedAt: "2019-08-24T06:15:41.313Z"
"404":
description: File version not found.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested file version does not exist.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"400":
description: Bad Request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- Your request contains invalid fileId parameter.
- Your request contains invalid versionId parameter.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
delete:
tags:
- Digital Asset Management (DAM)
- Managing assets
operationId: delete-file-version
summary: Delete file version
description: |
This API deletes a non-current file version permanently. The API returns an empty response.
Note: If you want to delete all versions of a file, use the delete file API.
parameters:
- description: |
The unique `fileId` of the uploaded file. `fileId` is returned in list and search assets API and upload API.
in: path
name: fileId
required: true
schema:
type: string
- description: |
The unique `versionId` of the uploaded file. `versionId` is returned in list and search assets API and upload API.
in: path
name: versionId
required: true
schema:
type: string
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"204":
description: File version deleted successfully.
content:
application/json:
schema:
type: object
x-stainless-empty-object: true
"400":
description: Trying to delete the current version of the file.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- You cannot delete current version of a file.
- Your request contains invalid fileId parameter.
- Your request contains invalid versionId parameter.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"404":
description: File version found.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested asset does not exist.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/v1/files/{fileId}/versions/{versionId}/restore:
put:
tags:
- Digital Asset Management (DAM)
- Managing assets
operationId: restore-file-version
summary: Restore file version
description: |
This API restores a file version as the current file version.
parameters:
- description: |
The unique `fileId` of the uploaded file. `fileId` is returned in list and search assets API and upload API.
in: path
name: fileId
required: true
schema:
type: string
- description: |
The unique `versionId` of the uploaded file. `versionId` is returned in list and search assets API and upload API.
in: path
name: versionId
required: true
schema:
type: string
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
description: Restored file details object.
content:
application/json:
schema:
$ref: "#/components/schemas/FileDetails"
example:
fileId: 598821f949c0a938d57563bd
type: file
name: file.jpg
filePath: /images/products/file.jpg
tags:
- t-shirt
- round-neck
- sale2019
AITags:
- name: Shirt
confidence: 90.12
source: google-auto-tagging
- name: T-shirt
confidence: 80.12
source: aws-auto-tagging
versionInfo:
id: 598821f949c0a938d57563bd
name: Version 2
isPrivateFile: false
customCoordinates: null
url: https://ik.imagekit.io/your_imagekit_id/images/products/file.jpg?updatedAt=1566630881313
thumbnail: https://ik.imagekit.io/your_imagekit_id/images/products/file.jpg?updatedAt=1566630881313&tr=n-ik_ml_thumbnail
fileType: image
mime: image/jpeg
width: 100
height: 100
size: 100
hasAlpha: false
customMetadata:
brand: Nike
color: red
createdAt: "2019-08-24T06:14:41.313Z"
updatedAt: "2019-08-24T06:14:41.313Z"
"404":
description: File or file version does not exist.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested file version does not exist.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"400":
description: Bad Request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- Your request contains invalid fileId parameter.
- Your request contains invalid versionId parameter.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/v1/files/addTags:
post:
tags:
- Digital Asset Management (DAM)
- Managing assets
operationId: add-tags-bulk
summary: Add tags (bulk)
description: |
This API adds tags to multiple files in bulk. A maximum of 50 files can be specified at a time.
requestBody:
content:
application/json:
schema:
type: object
required:
- fileIds
- tags
properties:
fileIds:
type: array
items:
type: string
description: |
An array of fileIds to which you want to add tags.
tags:
type: array
items:
type: string
description: |
An array of tags that you want to add to the files.
example:
fileIds:
- 598821f949c0a938d57563bd
- 598821f949c0a938d57563be
tags:
- t-shirt
- round-neck
- sale2019
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
description: Tags added successfully.
content:
application/json:
schema:
type: object
properties:
successfullyUpdatedFileIds:
type: array
items:
type: string
description: |
An array of fileIds that in which tags were successfully added.
"207":
description: Partially successful. Some files were not updated.
content:
application/json:
schema:
type: object
properties:
successfullyUpdatedFileIds:
type: array
items:
type: string
description: |
An array of fileIds that were successfully updated.
errors:
type: array
items:
type: object
properties:
fileId:
type: string
description: Unique identifier of the file that was not updated.
error:
type: string
description: |
Error message for the file that was not updated.
description: |
An array of fileIds that were not updated and the error.
"404":
description: File not found.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested file(s) does not exist.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
missingFileIds:
type: array
items:
type: string
description: |
An array of fileIds that were not found.
"400":
description: Bad Request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- fileIds parameter is missing.
- fileIds is empty.
- A maximum of 50 files can be edited at a time.
- fileIds should be an Array.
- tags parameter is missing.
- tags array cannot be empty.
- Your request contains invalid value for tags parameter. Combined length of all tags should be less than or equal to 500.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/v1/files/removeTags:
post:
tags:
- Digital Asset Management (DAM)
- Managing assets
operationId: remove-tags-bulk
summary: Remove tags (bulk)
description: |
This API removes tags from multiple files in bulk. A maximum of 50 files can be specified at a time.
requestBody:
content:
application/json:
schema:
type: object
required:
- fileIds
- tags
properties:
fileIds:
type: array
items:
type: string
description: |
An array of fileIds from which you want to remove tags.
tags:
type: array
items:
type: string
description: |
An array of tags that you want to remove from the files.
example:
fileIds:
- 598821f949c0a938d57563bd
- 598821f949c0a938d57563be
tags:
- t-shirt
- round-neck
- sale2019
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
description: Tags removed successfully.
content:
application/json:
schema:
type: object
properties:
successfullyUpdatedFileIds:
type: array
items:
type: string
description: |
An array of fileIds that in which tags were successfully removed.
"207":
description: Partially successful. Some files were not updated.
content:
application/json:
schema:
type: object
properties:
successfullyUpdatedFileIds:
type: array
items:
type: string
description: |
An array of fileIds that were successfully updated.
errors:
type: array
items:
type: object
properties:
fileId:
type: string
description: Unique identifier of the file that was not updated.
error:
type: string
description: |
Error message for the file that was not updated.
description: |
An array of fileIds that were not updated and the error.
"404":
description: File not found.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested file(s) does not exist.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
missingFileIds:
type: array
items:
type: string
description: |
An array of fileIds that were not found.
"400":
description: Bad Request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- fileIds parameter is missing.
- fileIds is empty.
- A maximum of 50 files can be edited at a time.
- fileIds should be an Array.
- tags parameter is missing.
- tags array cannot be empty.
- Your request contains invalid value for tags parameter. Combined length of all tags should be less than or equal to 500.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/v1/files/removeAITags:
post:
tags:
- Digital Asset Management (DAM)
- Managing assets
operationId: remove-ai-tags-bulk
summary: Remove AI tags (bulk)
description: |
This API removes AITags from multiple files in bulk. A maximum of 50 files can be specified at a time.
requestBody:
content:
application/json:
schema:
type: object
required:
- fileIds
- AITags
properties:
fileIds:
type: array
items:
type: string
description: |
An array of fileIds from which you want to remove AITags.
AITags:
type: array
items:
type: string
description: |
An array of AITags that you want to remove from the files.
example:
fileIds:
- 598821f949c0a938d57563bd
- 598821f949c0a938d57563be
AITags:
- t-shirt
- round-neck
- sale2019
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
description: AITags removed successfully.
content:
application/json:
schema:
type: object
properties:
successfullyUpdatedFileIds:
type: array
items:
type: string
description: |
An array of fileIds that in which AITags were successfully removed.
"207":
description: Partially successful. Some files were not updated.
content:
application/json:
schema:
type: object
properties:
successfullyUpdatedFileIds:
type: array
items:
type: string
description: |
An array of fileIds that were successfully updated.
errors:
type: array
items:
type: object
properties:
fileId:
type: string
description: Unique identifier of the file that was not updated.
error:
type: string
description: |
Error message for the file that was not updated.
description: |
An array of fileIds that were not updated and the error.
"404":
description: File not found.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested file(s) does not exist.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"400":
description: Bad Request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- fileIds parameter is missing.
- fileIds is empty.
- A maximum of 50 files can be edited at a time.
- fileIds should be an Array.
- AITags parameter is missing.
- AITags array cannot be empty.
- Your request contains invalid value for AITags. Please provide an array of strings. Example - ['t-shirt','summer-sale'].
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/v1/folder:
post:
tags:
- Digital Asset Management (DAM)
- Managing folders
operationId: create-folder
summary: Create folder
description: |
This will create a new folder. You can specify the folder name and location of the parent folder where this new folder should be created.
requestBody:
content:
application/json:
schema:
type: object
required:
- folderName
- parentFolderPath
properties:
folderName:
type: string
description: |
The folder will be created with this name.
All characters except alphabets and numbers (inclusive of unicode letters, marks, and numerals in other languages) will be replaced by an underscore i.e. `_`.
parentFolderPath:
type: string
description: |
The folder where the new folder should be created, for root use `/` else the path e.g. `containing/folder/`.
Note: If any folder(s) is not present in the parentFolderPath parameter, it will be automatically created. For example, if you pass `/product/images/summer`, then `product`, `images`, and `summer` folders will be created if they don't already exist.
example:
folderName: summer
parentFolderPath: /product/images/
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"201":
description: Folder created successfully.
content:
application/json:
schema:
type: object
x-stainless-empty-object: true
"400":
description: Bad Request.
content:
application/json:
schema:
type: object
properties:
reason:
type: string
example: INVALID_FOLDER_PATH
message:
type: string
example: "'.' & '..' can not be used as folder-name"
help:
type: string
example: For support kindly contact us at support@imagekit.io.
delete:
tags:
- Digital Asset Management (DAM)
- Managing folders
operationId: delete-folder
summary: Delete folder
description: |
This will delete a folder and all its contents permanently. The API returns an empty response.
requestBody:
content:
application/json:
schema:
type: object
required:
- folderPath
properties:
folderPath:
type: string
description: |
Full path to the folder you want to delete. For example `/folder/to/delete/`.
example:
folderPath: /folder/to/delete/
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"204":
description: Folder deleted successfully.
content:
application/json:
schema:
type: object
x-stainless-empty-object: true
"404":
description: Folder not found
content:
application/json:
schema:
type: object
properties:
reason:
type: string
example: FOLDER_NOT_FOUND
message:
type: string
example: No folder found with folderPath `/folder/to/delete/`.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"400":
description: Bad Request.
content:
application/json:
schema:
type: object
properties:
reason:
type: string
example: TOO_MANY_OBJECTS
message:
type: string
example: Total nested assets (files, folders and file versions) are more than allowed limit of 100000 items.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/v1/bulkJobs/copyFolder:
post:
tags:
- Digital Asset Management (DAM)
- Managing folders
operationId: copy-folder
summary: Copy folder
description: |
This will copy one folder into another. The selected folder, its nested folders, files, and their versions (in `includeVersions` is set to true) are copied in this operation. Note: If any file at the destination has the same name as the source file, then the source file and its versions will be appended to the destination file version history.
requestBody:
content:
application/json:
schema:
type: object
required:
- sourceFolderPath
- destinationPath
properties:
sourceFolderPath:
type: string
description: |
The full path to the source folder you want to copy.
example: /path/of/source/folder
destinationPath:
type: string
description: |
Full path to the destination folder where you want to copy the source folder into.
example: /path/of/destination/folder
includeVersions:
type: boolean
description: |
Option to copy all versions of files that are nested inside the selected folder. By default, only the current version of each file will be copied. When set to true, all versions of each file will be copied. Default value - `false`.
example: true
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/JobResponse"
"404":
description: Folder not found
content:
application/json:
schema:
type: object
properties:
reason:
type: string
example: NO_FILES_FOLDER
message:
type: string
example: No files & folder found at sourceFolderPath `/folder/to/copy`.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"400":
description: Bad request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: sourceFolderPath and destinationPath is same
reason:
type: string
examples:
- MISSING_PARAMETER
- INVALID_PARAMETER
- TOO_MANY_OBJECTS
- SOURCE_IS_ROOT
- SAME_SOURCE_AND_DESTINATION
- INVALID_FOLDER_PATH
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"423":
description: Locked resource - A bulk operation is currently running on the folder.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- A bulk job is running on given folder path, please try after sometime.
- Destination folder path is already locked. Please try after sometime.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/v1/bulkJobs/moveFolder:
post:
tags:
- Digital Asset Management (DAM)
- Managing folders
operationId: move-folder
summary: Move folder
description: |
This will move one folder into another. The selected folder, its nested folders, files, and their versions are moved in this operation. Note: If any file at the destination has the same name as the source file, then the source file and its versions will be appended to the destination file version history.
requestBody:
content:
application/json:
schema:
type: object
required:
- sourceFolderPath
- destinationPath
properties:
sourceFolderPath:
type: string
description: |
The full path to the source folder you want to move.
example: /path/of/source/folder
destinationPath:
type: string
description: |
Full path to the destination folder where you want to move the source folder into.
example: /path/of/destination/folder
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/JobResponse"
"404":
description: Folder not found
content:
application/json:
schema:
type: object
properties:
reason:
type: string
example: NO_FILES_FOLDER
message:
type: string
example: No files & folder found at sourceFolderPath `/folder/to/move`.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"400":
description: Bad request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: This operation is not allowed because parent folder cannot be moved into child folder.
reason:
type: string
examples:
- MISSING_PARAMETER
- INVALID_PARAMETER
- TOO_MANY_OBJECTS
- SOURCE_IS_ROOT
- SAME_SOURCE_AND_DESTINATION
- INVALID_FOLDER_PATH
- INVALID_DESTINATION_PATH
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"423":
description: Locked resource - A bulk operation is currently running on the folder.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- A bulk job is running on given folder path, please try after sometime.
- Destination folder path is already locked. Please try after sometime.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/v1/bulkJobs/renameFolder:
post:
tags:
- Digital Asset Management (DAM)
- Managing folders
operationId: rename-folder
summary: Rename folder
description: |
This API allows you to rename an existing folder. The folder and all its nested assets and sub-folders will remain unchanged, but their paths will be updated to reflect the new folder name.
requestBody:
content:
application/json:
schema:
type: object
required:
- folderPath
- newFolderName
properties:
folderPath:
type: string
description: |
The full path to the folder you want to rename.
example: /path/of/folder
newFolderName:
type: string
description: |
The new name for the folder.
All characters except alphabets and numbers (inclusive of unicode letters, marks, and numerals in other languages) and `-` will be replaced by an underscore i.e. `_`.
example: new-folder-name
purgeCache:
type: boolean
description: |
Option to purge cache for the old nested files and their versions' URLs.
When set to true, it will internally issue a purge cache request on CDN to remove the cached content of the old nested files and their versions. There will only be one purge request for all the nested files, which will be counted against your monthly purge quota.
Note: A purge cache request will be issued against `https://ik.imagekit.io/old/folder/path*` (with a wildcard at the end). This will remove all nested files, their versions' URLs, and any transformations made using query parameters on these files or their versions. However, the cache for file transformations made using path parameters will persist. You can purge them using the purge API. For more details, refer to the purge API documentation.
Default value - `false`
example: true
responses:
"202":
content:
application/json:
schema:
$ref: "#/components/schemas/JobResponse"
"400":
description: Bad request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- folderPath cannot be root.
- folderPath parameter is missing.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"404":
description: Folder not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Source folder not found.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"409":
description: If a folder with newFileName already exist in the same location.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Folder with name newFolderName already exists at the same location.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"423":
description: Locked resource - A bulk operation is currently running on the folder.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- A bulk job is running on given folder path, please try after sometime.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"429":
$ref: "#/components/responses/RateLimitExceeded"
/v1/bulkJobs/{jobId}:
get:
tags:
- Digital Asset Management (DAM)
- Managing folders
operationId: bulk-job-status
summary: Bulk job status
description: |
This API returns the status of a bulk job like copy and move folder operations.
parameters:
- description: |
The `jobId` is returned in the response of bulk job API e.g. copy folder or move folder API.
in: path
name: jobId
required: true
schema:
type: string
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
description: |
On success, you will receive the status of the bulk job in the response body.
content:
application/json:
schema:
type: object
properties:
jobId:
type: string
description: |
Unique identifier of the bulk job.
type:
type: string
description: |
Type of the bulk job.
enum:
- COPY_FOLDER
- MOVE_FOLDER
- RENAME_FOLDER
status:
type: string
description: |
Status of the bulk job.
enum:
- Pending
- Completed
purgeRequestId:
type: string
description: |
Unique identifier of the purge request. This will be present only if `purgeCache` is set to `true` in the rename folder API request.
example:
jobId: 5d5b1a9b4c8c4c0001f3e4a2
type: COPY_FOLDER
status: Completed
"207":
description: |
Partial success – the folder was renamed, but purge cache failed for nested files. It is only returned when `purgeCache` is set `true` in the rename folder API request.
content:
application/json:
schema:
type: object
properties:
jobId:
type: string
description: |
Unique identifier of the bulk job.
type:
type: string
description: |
Type of the bulk job. It is only possible for `RENAME_FOLDER`.
status:
type: string
description: |
Status of the bulk job. It will be `Partial success`.
message:
type: string
example: Folder renamed successfully but purging cache on nested files failed.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
example:
jobId: 5d5b1a9b4c8c4c0001f3e4a2
type: RENAME_FOLDER
status: Partial success
message: Folder renamed successfully but purging cache on nested files failed.
help: For support kindly contact us at support@imagekit.io.
"404":
description: Job not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested job does not exist.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/v1/files/purge:
post:
tags:
- Caching
operationId: purge-cache
summary: Purge cache
description: |
This API will purge CDN cache and ImageKit.io's internal cache for a file. Note: Purge cache is an asynchronous process and it may take some time to reflect the changes.
requestBody:
content:
application/json:
schema:
type: object
required:
- url
properties:
url:
type: string
format: uri
description: |
The full URL of the file to be purged.
example: https://ik.imagekit.io/your_imagekit_id/default-image.jpg
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"201":
description: Purge request submitted successfully. A `requestId` will be returned.
content:
application/json:
schema:
type: object
properties:
requestId:
type: string
description: |
Unique identifier of the purge request. This can be used to check the status of the purge request.
"400":
description: Bad request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The URL is not valid for cache purging.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/v1/files/purge/{requestId}:
get:
tags:
- Caching
operationId: purge-status
summary: Get purge status
description: |
This API returns the status of a purge cache request.
parameters:
- description: |
Should be a valid requestId.
in: path
name: requestId
required: true
schema:
type: string
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
description: |
On success, you will receive the status of the purge request in the response body.
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: Completed
enum:
- Pending
- Completed
description: |
Status of the purge request.
"400":
description: Bad request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: No request found for this requestId.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/v1/files/{fileId}/metadata:
get:
tags:
- File Metadata
operationId: get-uploaded-file-metadata
summary: Get uploaded file metadata
description: |
You can programmatically get image EXIF, pHash, and other metadata for uploaded files in the ImageKit.io media library using this API.
You can also get the metadata in upload API response by passing `metadata` in `responseFields` parameter.
parameters:
- description: |
The unique `fileId` of the uploaded file. `fileId` is returned in the list and search assets API and upload API.
in: path
name: fileId
required: true
schema:
type: string
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
description: File metadata object.
content:
application/json:
schema:
$ref: "#/components/schemas/Metadata"
examples:
Image:
value:
$ref: "#/components/examples/ImageMetadata"
Video:
value:
$ref: "#/components/examples/VideoMetadata"
"404":
description: File not found.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested file does not exist or is inaccessible at this time.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"400":
description: Bad request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested file is corrupt or invalid.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/v1/metadata:
get:
tags:
- File Metadata
operationId: get-metadata-from-url
summary: Get metadata from remote URL
description: |
Get image EXIF, pHash, and other metadata from ImageKit.io powered remote URL using this API.
parameters:
- description: |
Should be a valid file URL. It should be accessible using your ImageKit.io account.
in: query
name: url
required: true
schema:
type: string
format: uri
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
description: File metadata object.
content:
application/json:
schema:
$ref: "#/components/schemas/Metadata"
examples:
Image:
value:
$ref: "#/components/examples/ImageMetadata"
Video:
value:
$ref: "#/components/examples/VideoMetadata"
"404":
description: File not found.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested file does not exist or is inaccessible at this time.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"400":
description: Bad request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The url should be accessible using your ImageKit.io account.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/v1/saved-extensions:
get:
tags:
- Digital Asset Management (DAM)
- Saved Extensions
operationId: list-extensions
summary: List all saved extensions
description: |
This API returns an array of all saved extensions for your account. Saved extensions allow you to save complex extension configurations and reuse them by referencing them by ID in upload or update file APIs.
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
description: Array of saved extension objects.
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/SavedExtension"
post:
tags:
- Digital Asset Management (DAM)
- Saved Extensions
operationId: create-extension
summary: Create saved extension
description: |
This API creates a new saved extension. Saved extensions allow you to save complex extension configurations (like AI tasks) and reuse them by referencing the ID in upload or update file APIs.
**Saved extension limit** \
You can create a maximum of 100 saved extensions per account.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateSavedExtension"
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"201":
description: Saved extension created successfully.
content:
application/json:
schema:
$ref: "#/components/schemas/SavedExtension"
"400":
description: Bad request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Invalid extension configuration.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/v1/saved-extensions/{id}:
get:
tags:
- Digital Asset Management (DAM)
- Saved Extensions
operationId: get-extension
summary: Get saved extension details
description: |
This API returns details of a specific saved extension by ID.
parameters:
- in: path
name: id
required: true
schema:
type: string
description: |
The unique ID of the saved extension.
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
description: Saved extension details.
content:
application/json:
schema:
$ref: "#/components/schemas/SavedExtension"
"404":
description: Saved extension not found.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested saved extension does not exist.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"400":
description: Bad request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Invalid saved extension ID.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
patch:
tags:
- Digital Asset Management (DAM)
- Saved Extensions
operationId: update-extension
summary: Update saved extension
description: |
This API updates an existing saved extension. You can update the name, description, or config.
parameters:
- in: path
name: id
required: true
schema:
type: string
description: |
The unique ID of the saved extension.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateSavedExtension"
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"200":
description: Saved extension updated successfully.
content:
application/json:
schema:
$ref: "#/components/schemas/SavedExtension"
"404":
description: Saved extension not found.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested saved extension does not exist.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"400":
description: Bad request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Invalid extension configuration.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
delete:
tags:
- Digital Asset Management (DAM)
- Saved Extensions
operationId: delete-extension
summary: Delete saved extension
description: |
This API deletes a saved extension permanently.
parameters:
- in: path
name: id
required: true
schema:
type: string
description: |
The unique ID of the saved extension.
responses:
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
"204":
description: Saved extension deleted successfully.
"404":
description: Saved extension not found.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: The requested saved extension does not exist.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"400":
description: Bad request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Invalid saved extension ID.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
/v1/accounts/usage:
get:
tags:
- Account Management API
operationId: get-usage
summary: Get account usage information
description: >
Get the account usage information between two dates. Note that the API response includes data from the start date while excluding data from the end date. In other words, the data covers the period starting from the specified start date up to, but not including, the end date.
parameters:
- in: query
name: startDate
description: Specify a `startDate` in `YYYY-MM-DD` format. It should be before the `endDate`. The difference between `startDate` and `endDate` should be less than 90 days.
schema:
type: string
format: date
required: true
- in: query
name: endDate
description: Specify a `endDate` in `YYYY-MM-DD` format. It should be after the `startDate`. The difference between `startDate` and `endDate` should be less than 90 days.
schema:
type: string
format: date
required: true
responses:
"200":
description: In the response, you will get different usage metrics.
content:
application/json:
schema:
type: object
properties:
bandwidthBytes:
type: integer
description: Amount of bandwidth used in bytes.
mediaLibraryStorageBytes:
type: integer
description: Storage used by media library in bytes.
videoProcessingUnitsCount:
type: integer
description: Number of video processing units used.
extensionUnitsCount:
type: integer
description: Number of extension units used.
originalCacheStorageBytes:
type: integer
description: Storage used by the original cache in bytes.
examples:
default:
value:
bandwidthBytes: 21991583578
mediaLibraryStorageBytes: 1878758298
videoProcessingUnitsCount: 0
extensionUnitsCount: 0
originalCacheStorageBytes: 0
"400":
description: Bad request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- startDate and endDate should be within 90 days.
- startDate and endDate are required in query parameters.
- startDate and endDate should be in format YYYY-MM-DD.
- startDate should be before endDate.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"429":
$ref: "#/components/responses/RateLimitExceeded"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/Forbidden"
/v1/accounts/origins:
get:
summary: List origins
tags:
- Account Management API
- Origins
operationId: list-origins
description: >
**Note:** This API is currently in beta.
Returns an array of all configured origins for the current account.
responses:
"200":
description: Successful response.
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/OriginResponse"
"401": &a1
$ref: "#/components/responses/Unauthorized"
"403": &a2
$ref: "#/components/responses/Forbidden"
"429": &a3
$ref: "#/components/responses/RateLimitExceeded"
post:
summary: Create origin
tags:
- Account Management API
- Origins
operationId: create-origin
description: >
**Note:** This API is currently in beta.
Creates a new origin and returns the origin object.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/OriginRequest"
responses:
"201":
description: Origin created successfully.
content:
application/json:
schema:
$ref: "#/components/schemas/OriginResponse"
"400":
description: Bad request. The request body is invalid.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- Invalid origin type. Must be one of S3, S3_COMPATIBLE,
CLOUDINARY_BACKUP, WEB_FOLDER, WEB_PROXY, GCS,
AZURE_BLOB, AKENEO_PIM.
- name is required and must be a string
- bucket is required and must be a string
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"401": *a1
"403": *a2
"429": *a3
"/v1/accounts/origins/{id}":
get:
summary: Get origin
tags:
- Account Management API
- Origins
operationId: get-origin
description: >
**Note:** This API is currently in beta.
Retrieves the origin identified by `id`.
parameters:
- &a4
in: path
name: id
schema:
description:
Unique identifier for the origin. This is generated by ImageKit
when you create a new origin.
type: string
required: true
description:
Unique identifier for the origin. This is generated by ImageKit
when you create a new origin.
responses:
"200":
description: Successful response.
content:
application/json:
schema:
$ref: "#/components/schemas/OriginResponse"
"401": *a1
"403": *a2
"404":
description: Resource not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- Origin not found.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"429": *a3
put:
summary: Update origin
tags:
- Account Management API
- Origins
operationId: update-origin
description: >
**Note:** This API is currently in beta.
Updates the origin identified by `id` and returns the updated
origin object.
parameters:
- *a4
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/OriginRequest"
responses:
"200":
description: Origin updated successfully.
content:
application/json:
schema:
$ref: "#/components/schemas/OriginResponse"
"400":
description: Bad request. The request body is invalid.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- Invalid origin type. Must be one of S3, S3_COMPATIBLE,
CLOUDINARY_BACKUP, WEB_FOLDER, WEB_PROXY, GCS,
AZURE_BLOB, AKENEO_PIM.
- name is required and must be a string
- bucket is required and must be a string
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"401": *a1
"403": *a2
"404":
description: Resource not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- Origin not found.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"429": *a3
delete:
summary: Delete origin
tags:
- Account Management API
- Origins
operationId: delete-origin
description: >
**Note:** This API is currently in beta.
Permanently removes the origin identified by `id`. If the origin is
in use by any URL‑endpoints, the API will return an error.
parameters:
- *a4
responses:
"204":
description: Origin deleted successfully.
"401": *a1
"403": *a2
"404":
description: Resource not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- Origin not found.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"429": *a3
/v1/accounts/url-endpoints:
get:
summary: List URL‑endpoints
tags:
- Account Management API
- URL endpoints
operationId: list-url-endpoints
description: >
**Note:** This API is currently in beta.
Returns an array of all URL‑endpoints configured including the
default URL-endpoint generated by ImageKit during account creation.
responses:
"200":
description: Successful response.
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/UrlEndpointResponse"
"401": *a1
"403": *a2
"404":
description: Resource not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- URL-endpoint not found.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"429": *a3
post:
summary: Create URL‑endpoint
tags:
- Account Management API
- URL endpoints
operationId: create-url-endpoint
description: >
**Note:** This API is currently in beta.
Creates a new URL‑endpoint and returns the resulting object.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UrlEndpointRequest"
responses:
"201":
description: URL‑endpoint created successfully.
content:
application/json:
schema:
$ref: "#/components/schemas/UrlEndpointResponse"
"400":
description: Bad request. The request body is invalid.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- description is required
- urlPrefix must be a string
- urlPrefix cannot be empty string. This is reserved for
the default URL-endpoint created by ImageKit.
- Origin does not exists. Please create origin before
using it in URL-endpoint.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"401": *a1
"403": *a2
"429": *a3
"/v1/accounts/url-endpoints/{id}":
get:
summary: Get URL‑endpoint
tags:
- Account Management API
- URL endpoints
operationId: get-url-endpoint
description: >
**Note:** This API is currently in beta.
Retrieves the URL‑endpoint identified by `id`.
parameters:
- &a5
in: path
name: id
schema:
description:
Unique identifier for the URL-endpoint. This is generated by
ImageKit when you create a new URL-endpoint. For the default
URL-endpoint, this is always `default`.
type: string
required: true
description:
Unique identifier for the URL-endpoint. This is generated by
ImageKit when you create a new URL-endpoint. For the default
URL-endpoint, this is always `default`.
responses:
"200":
description: Successful response.
content:
application/json:
schema:
$ref: "#/components/schemas/UrlEndpointResponse"
"401": *a1
"403": *a2
"404":
description: Resource not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- URL-endpoint not found.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"429": *a3
put:
summary: Update URL‑endpoint
tags:
- Account Management API
- URL endpoints
operationId: update-url-endpoint
description: >
**Note:** This API is currently in beta.
Updates the URL‑endpoint identified by `id` and returns the updated
object.
parameters:
- *a5
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UrlEndpointRequest"
responses:
"200":
description: URL‑endpoint updated successfully.
content:
application/json:
schema:
$ref: "#/components/schemas/UrlEndpointResponse"
"400":
description: Bad request. The request body is invalid.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- description is required
- urlPrefix must be a string
- urlPrefix cannot be empty string. This is reserved for
the default URL-endpoint created by ImageKit.
- Origin does not exists. Please create origin before
using it in URL-endpoint.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"401": *a1
"403": *a2
"404":
description: Resource not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- URL-endpoint not found.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"429": *a3
delete:
summary: Delete URL‑endpoint
tags:
- Account Management API
- URL endpoints
operationId: delete-url-endpoint
description: >
**Note:** This API is currently in beta.
Deletes the URL‑endpoint identified by `id`. You cannot delete the
default URL‑endpoint created by ImageKit during account creation.
parameters:
- *a5
responses:
"204":
description: URL‑endpoint deleted successfully.
"400":
description: Bad request. The request body is invalid.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- Default URL-endpoint cannot be deleted.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"401": *a1
"403": *a2
"404":
description: Resource not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- URL-endpoint not found.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
"429": *a3
components:
schemas:
BaseWebhookEvent:
type: object
properties:
id:
type: string
description: Unique identifier for the event.
type:
type: string
description: The type of webhook event.
required: [id, type]
UpdateFileRequest:
title: Update file request
description: Schema for update file update request.
type: object
example:
removeAITags: ["car", "vehicle", "motorsports"]
webhookUrl: https://webhook.site/0d6b6c7a-8e5a-4b3a-8b7c-0d6b6c7a8e5a
extensions:
[
{ "name": "remove-bg", "options": { "add_shadow": true } },
{
"name": "google-auto-tagging",
"minConfidence": 80,
"maxTags": 10,
},
{
"name": "aws-auto-tagging",
"minConfidence": 80,
"maxTags": 10,
},
{ "name": "ai-auto-description" },
{
"name": "ai-tasks",
"tasks": [
{
"type": "select_tags",
"instruction": "What types of clothing items are visible?",
"vocabulary": ["shirt", "dress", "jacket"]
}
]
},
{ "name": "saved-extension", "id": "ext_abc123" }
]
tags: ["tag1", "tag2"]
customCoordinates: "10,10,100,100"
customMetadata: { "brand": "Nike", "color": "red" }
oneOf:
- title: Update file details
type: object
properties:
removeAITags:
oneOf:
- type: array
items:
type: string
- type: string
const: "all"
description: |
An array of AITags associated with the file that you want to remove, e.g. `["car", "vehicle", "motorsports"]`.
If you want to remove all AITags associated with the file, send a string - "all".
Note: The remove operation for `AITags` executes before any of the `extensions` are processed.
webhookUrl:
type: string
format: uri
description: |
The final status of extensions after they have completed execution will be delivered to this endpoint as a POST request. [Learn more](/docs/api-reference/digital-asset-management-dam/managing-assets/update-file-details#webhook-payload-structure) about the webhook payload structure.
extensions:
$ref: "#/components/schemas/Extensions"
tags:
type: [array, null]
items:
type: string
description: >
An array of tags associated with the file, such as `["tag1", "tag2"]`. Send `null` to unset all tags associated with the file.
example: ["tag1", "tag2"]
customCoordinates:
type: [string, null]
description: |
Define an important area in the image in the format `x,y,width,height` e.g. `10,10,100,100`. Send `null` to unset this value.
customMetadata:
type: object
description: |
A key-value data to be associated with the asset. To unset a key, send `null` value for that key. Before setting any custom metadata on an asset you have to create the field using custom metadata fields API.
additionalProperties: true
description:
type: string
description: |
Optional text to describe the contents of the file.
- title: Change publication status
type: object
properties:
publish:
type: object
required: ["isPublished"]
description: |
Configure the publication status of a file and its versions.
properties:
isPublished:
type: boolean
description: |
Set to `true` to publish the file. Set to `false` to unpublish the file.
includeFileVersions:
type: boolean
description: |
Set to `true` to publish/unpublish all versions of the file. Set to `false` to publish/unpublish only the current version of the file.
OriginRequest:
title: Origin request
description: Schema for origin request resources.
example:
name: My S3 Origin
type: S3
bucket: test-bucket
prefix: images
accessKey: AKIATEST123
secretKey: secrettest123
discriminator:
propertyName: type
oneOf:
- title: S3
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
const: "S3"
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
bucket:
description: S3 bucket name.
example: product-images
type: string
minLength: 1
maxLength: 100
prefix:
description: Path prefix inside the bucket.
example: raw-assets
default: ""
type: string
maxLength: 100
accessKey:
description: Access key for the bucket.
example: AKIAIOSFODNN7EXAMPLE
type: string
minLength: 1
maxLength: 100
secretKey:
description: Secret key for the bucket.
example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
type: string
minLength: 1
maxLength: 100
required:
- name
- type
- bucket
- accessKey
- secretKey
additionalProperties: false
- title: S3 Compatible
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
const: "S3_COMPATIBLE"
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
bucket:
description: S3 bucket name.
example: product-images
type: string
minLength: 1
maxLength: 100
prefix:
description: Path prefix inside the bucket.
example: raw-assets
default: ""
type: string
maxLength: 100
accessKey:
description: Access key for the bucket.
example: AKIAIOSFODNN7EXAMPLE
type: string
minLength: 1
maxLength: 100
secretKey:
description: Secret key for the bucket.
example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
type: string
minLength: 1
maxLength: 100
endpoint:
description: Custom S3-compatible endpoint.
example: https://s3.eu-central-1.wasabisys.com
type: string
format: uri
s3ForcePathStyle:
default: false
description: Use path-style S3 URLs?
example: true
type: boolean
required:
- name
- type
- bucket
- accessKey
- secretKey
- endpoint
additionalProperties: false
- title: Cloudinary Backup
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
const: "CLOUDINARY_BACKUP"
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
bucket:
description: S3 bucket name.
example: product-images
type: string
minLength: 1
maxLength: 100
prefix:
description: Path prefix inside the bucket.
example: raw-assets
default: ""
type: string
maxLength: 100
accessKey:
description: Access key for the bucket.
example: AKIAIOSFODNN7EXAMPLE
type: string
minLength: 1
maxLength: 100
secretKey:
description: Secret key for the bucket.
example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
type: string
minLength: 1
maxLength: 100
required:
- name
- type
- bucket
- accessKey
- secretKey
additionalProperties: false
- title: Web Folder
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
const: "WEB_FOLDER"
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
baseUrl:
description: Root URL for the web folder origin.
example: https://images.example.com/assets
type: string
format: uri
forwardHostHeaderToOrigin:
description: Forward the Host header to origin?
example: false
default: false
type: boolean
required:
- name
- type
- baseUrl
additionalProperties: false
- title: Web Proxy
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
const: "WEB_PROXY"
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
required:
- name
- type
additionalProperties: false
- title: Google Cloud Storage (GCS)
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
const: "GCS"
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
bucket:
example: gcs-media
type: string
minLength: 1
maxLength: 100
prefix:
example: products
default: ""
type: string
maxLength: 100
clientEmail:
example: service-account@project.iam.gserviceaccount.com
type: string
format: email
pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
privateKey:
example: -----BEGIN PRIVATE KEY-----\nMIIEv...
type: string
minLength: 1
required:
- name
- type
- bucket
- clientEmail
- privateKey
additionalProperties: false
- title: Azure Blob Storage
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
const: "AZURE_BLOB"
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
container:
example: images
type: string
minLength: 1
maxLength: 100
prefix:
example: uploads
default: ""
type: string
maxLength: 100
accountName:
example: account123
type: string
minLength: 1
maxLength: 100
sasToken:
example: ?sv=2023-01-03&sr=c&sig=abc123
type: string
minLength: 1
required:
- name
- type
- container
- accountName
- sasToken
additionalProperties: false
- title: Akeneo PIM
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
const: "AKENEO_PIM"
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
baseUrl:
description: Akeneo instance base URL.
example: https://akeneo.company.com
type: string
format: uri
clientId:
description: Akeneo API client ID.
example: akeneo-client-id
type: string
minLength: 1
maxLength: 100
clientSecret:
description: Akeneo API client secret.
example: akeneo-client-secret
type: string
minLength: 1
maxLength: 100
username:
description: Akeneo API username.
example: integration-user
type: string
minLength: 1
maxLength: 100
password:
description: Akeneo API password.
example: strongpassword123
type: string
minLength: 1
maxLength: 100
required:
- name
- type
- baseUrl
- clientId
- clientSecret
- username
- password
additionalProperties: false
type: object
OriginResponse:
title: Origin Response
description: Origin object as returned by the API (sensitive fields removed).
discriminator:
propertyName: type
oneOf:
- title: S3
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
const: "S3"
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
bucket:
description: S3 bucket name.
example: product-images
type: string
minLength: 1
maxLength: 100
prefix:
type: string
description: Path prefix inside the bucket.
example: raw-assets
id:
readOnly: true
description:
Unique identifier for the origin. This is generated by ImageKit
when you create a new origin.
type: string
required:
- name
- type
- includeCanonicalHeader
- bucket
- prefix
- id
additionalProperties: false
- title: S3 Compatible
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
const: "S3_COMPATIBLE"
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
bucket:
description: S3 bucket name.
example: product-images
type: string
minLength: 1
maxLength: 100
prefix:
type: string
description: Path prefix inside the bucket.
example: raw-assets
endpoint:
description: Custom S3-compatible endpoint.
example: https://s3.eu-central-1.wasabisys.com
type: string
format: uri
s3ForcePathStyle:
default: false
description: Use path-style S3 URLs?
example: true
type: boolean
id:
readOnly: true
description:
Unique identifier for the origin. This is generated by ImageKit
when you create a new origin.
type: string
required:
- name
- type
- includeCanonicalHeader
- bucket
- prefix
- endpoint
- s3ForcePathStyle
- id
additionalProperties: false
- title: Cloudinary Backup
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
const: "CLOUDINARY_BACKUP"
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
bucket:
description: S3 bucket name.
example: product-images
type: string
minLength: 1
maxLength: 100
prefix:
type: string
description: Path prefix inside the bucket.
example: raw-assets
id:
readOnly: true
description:
Unique identifier for the origin. This is generated by ImageKit
when you create a new origin.
type: string
required:
- name
- type
- includeCanonicalHeader
- bucket
- prefix
- id
additionalProperties: false
- title: Web Folder
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
const: "WEB_FOLDER"
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
baseUrl:
type: string
format: uri
description: Root URL for the web folder origin.
example: https://images.example.com/assets
forwardHostHeaderToOrigin:
description: Forward the Host header to origin?
example: false
default: false
type: boolean
id:
readOnly: true
description:
Unique identifier for the origin. This is generated by ImageKit
when you create a new origin.
type: string
required:
- name
- type
- includeCanonicalHeader
- baseUrl
- forwardHostHeaderToOrigin
- id
additionalProperties: false
- title: Web Proxy
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
const: "WEB_PROXY"
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
id:
readOnly: true
description:
Unique identifier for the origin. This is generated by ImageKit
when you create a new origin.
type: string
required:
- name
- type
- includeCanonicalHeader
- id
additionalProperties: false
- title: Google Cloud Storage (GCS)
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
const: "GCS"
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
bucket:
example: gcs-media
type: string
minLength: 1
maxLength: 100
prefix:
type: string
example: products
clientEmail:
example: service-account@project.iam.gserviceaccount.com
type: string
format: email
pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
id:
readOnly: true
description:
Unique identifier for the origin. This is generated by ImageKit
when you create a new origin.
type: string
required:
- name
- type
- includeCanonicalHeader
- bucket
- prefix
- clientEmail
- id
additionalProperties: false
- title: Azure Blob Storage
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
const: "AZURE_BLOB"
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
container:
example: images
type: string
minLength: 1
maxLength: 100
prefix:
type: string
example: uploads
accountName:
example: account123
type: string
minLength: 1
maxLength: 100
id:
readOnly: true
description:
Unique identifier for the origin. This is generated by ImageKit
when you create a new origin.
type: string
required:
- name
- type
- includeCanonicalHeader
- container
- prefix
- accountName
- id
additionalProperties: false
- title: Akeneo PIM
type: object
properties:
name:
description: Display name of the origin.
example: US S3 Storage
type: string
minLength: 1
maxLength: 100
pattern: ^[a-zA-Z0-9 ]+$
type:
type: string
const: "AKENEO_PIM"
includeCanonicalHeader:
description: Whether to send a Canonical header.
example: false
default: false
type: boolean
baseUrlForCanonicalHeader:
description: URL used in the Canonical header (if enabled).
example: https://cdn.example.com
type: string
format: uri
baseUrl:
type: string
format: uri
description: Akeneo instance base URL.
example: https://akeneo.company.com
id:
readOnly: true
description:
Unique identifier for the origin. This is generated by ImageKit
when you create a new origin.
type: string
required:
- name
- type
- includeCanonicalHeader
- baseUrl
- id
additionalProperties: false
type: object
UrlEndpointRequest:
title: URL Endpoint Schema
description: Schema for URL endpoint resource.
example:
description: My custom URL endpoint
urlPrefix: product-images
origins:
- origin-id-1
type: object
properties:
description:
description: Description of the URL endpoint.
example: My custom URL endpoint
type: string
minLength: 1
maxLength: 1000
urlPrefix:
description:
Path segment appended to your base URL to form the endpoint
(letters, digits, and hyphens only — or empty for the default
endpoint).
example: product-images
default: ""
type: string
maxLength: 100
origins:
description:
Ordered list of origin IDs to try when the file isn’t in the Media
Library; ImageKit checks them in the sequence provided. Origin must
be created before it can be used in a URL endpoint.
example:
- origin-id-1
- origin-id-2
default: []
maxItems: 10
type: array
items:
description:
Unique identifier for the origin. This is generated by ImageKit
when you create a new origin.
type: string
urlRewriter:
description: Configuration for third-party URL rewriting.
discriminator:
propertyName: type
oneOf:
- title: Cloudinary URL Rewriter
type: object
properties:
type:
type: string
const: "CLOUDINARY"
preserveAssetDeliveryTypes:
description:
Whether to preserve `<asset_type>/<delivery_type>` in the rewritten
URL.
example: true
default: false
type: boolean
required:
- type
additionalProperties: false
- title: Imgix URL Rewriter
type: object
properties:
type:
type: string
const: "IMGIX"
required:
- type
additionalProperties: false
- title: Akamai URL Rewriter
type: object
properties:
type:
type: string
const: "AKAMAI"
required:
- type
additionalProperties: false
type: object
required:
- description
additionalProperties: false
UrlEndpointResponse:
title: URL‑endpoint Response
description: URL‑endpoint object as returned by the API.
type: object
properties:
description:
description: Description of the URL endpoint.
example: My custom URL endpoint
type: string
minLength: 1
maxLength: 1000
urlPrefix:
description:
Path segment appended to your base URL to form the endpoint
(letters, digits, and hyphens only — or empty for the default
endpoint).
example: product-images
default: ""
type: string
maxLength: 100
origins:
description:
Ordered list of origin IDs to try when the file isn’t in the Media
Library; ImageKit checks them in the sequence provided. Origin must
be created before it can be used in a URL endpoint.
example:
- origin-id-1
- origin-id-2
default: []
maxItems: 10
type: array
items:
description:
Unique identifier for the origin. This is generated by ImageKit
when you create a new origin.
type: string
urlRewriter:
description: Configuration for third-party URL rewriting.
discriminator:
propertyName: type
oneOf:
- title: Cloudinary URL Rewriter
type: object
properties:
type:
type: string
const: "CLOUDINARY"
preserveAssetDeliveryTypes:
description:
Whether to preserve `<asset_type>/<delivery_type>` in the rewritten
URL.
example: true
default: false
type: boolean
required:
- type
- preserveAssetDeliveryTypes
additionalProperties: false
- title: Imgix URL Rewriter
type: object
properties:
type:
type: string
const: "IMGIX"
required:
- type
additionalProperties: false
- title: Akamai URL Rewriter
type: object
properties:
type:
type: string
const: "AKAMAI"
required:
- type
additionalProperties: false
type: object
id:
readOnly: true
description:
Unique identifier for the URL-endpoint. This is generated by
ImageKit when you create a new URL-endpoint. For the default
URL-endpoint, this is always `default`.
type: string
required:
- description
- urlPrefix
- origins
- id
additionalProperties: false
FileUploadV1:
type: object
required:
- file
- fileName
properties:
file:
type: string
format: binary # multipart/form-data file upload
contentEncoding: binary # For our docs try it
description: |
The API accepts any of the following:
- **Binary data** – send the raw bytes as `multipart/form-data`.
- **HTTP / HTTPS URL** – a publicly reachable URL that ImageKit’s servers can fetch.
- **Base64 string** – the file encoded as a Base64 data URI or plain Base64.
When supplying a URL, the server must receive the response headers within 8 seconds; otherwise the request fails with 400 Bad Request.
example: https://www.example.com/path/to-image.jpg
fileName:
type: string
description: >
The name with which the file has to be uploaded.
The file name can contain:
- Alphanumeric Characters: `a-z`, `A-Z`, `0-9`.
- Special Characters: `.`, `-`
Any other character including space will be replaced by `_`
publicKey:
type: string
description: >
Your ImageKit.io public key. This field is only required for authentication when uploading a file from the client side.
signature:
type: string
description: >
HMAC-SHA1 digest of the token+expire using your ImageKit.io private API key as a key. Learn how to create a signature on the page below. This should be in lowercase.
Signature must be calculated on the server-side. This field is only required for authentication when uploading a file from the client side.
expire:
type: integer
description: >
The time until your signature is valid. It must be a [Unix time](https://en.wikipedia.org/wiki/Unix_time) in less than 1 hour into the future. It should be in seconds. This field is only required for authentication when uploading a file from the client side.
token:
type: string
description: >
A unique value that the ImageKit.io server will use to recognize and prevent subsequent retries for the same request. We suggest using V4 UUIDs, or another random string with enough entropy to avoid collisions. This field is only required for authentication when uploading a file from the client side.
**Note**: Sending a value that has been used in the past will result in a validation error. Even if your previous request resulted in an error, you should always send a new value for this field.
useUniqueFileName:
type: boolean
default: true
description: >
Whether to use a unique filename for this file or not.
If `true`, ImageKit.io will add a unique suffix to the filename parameter to get a unique filename.
If `false`, then the image is uploaded with the provided filename parameter, and any existing file with the same name is replaced.
tags:
type: array
items:
type: string
description: >
Set the tags while uploading the file.
Provide an array of tag strings (e.g. `["tag1", "tag2", "tag3"]`).
The combined length of all tag characters must not exceed 500, and the `%` character
is not allowed.
If this field is not specified and the file is overwritten, the existing tags will be removed.
example:
- t-shirt
- round-neck
- men
folder:
type: string
description: >
The folder path in which the image has to be uploaded.
If the folder(s) didn't exist before, a new folder(s) is created.
The folder name can contain:
- Alphanumeric Characters: `a-z` , `A-Z` , `0-9`
- Special Characters: `/` , `_` , `-`
Using multiple `/` creates a nested folder.
default: "/"
isPrivateFile:
type: boolean
default: false
description: >
Whether to mark the file as private or not.
If `true`, the file is marked as private and is accessible only using named transformation or signed URL.
isPublished:
type: boolean
default: true
description: >
Whether to upload file as published or not.
If `false`, the file is marked as unpublished, which restricts access to the file only via the media library. Files in draft or unpublished state can only be publicly accessed after being published.
The option to upload in draft state is only available in custom enterprise pricing plans.
customCoordinates:
type: string
description: >
Define an important area in the image. This is only relevant for image type files.
- To be passed as a string with the x and y coordinates of the top-left corner, and width and height of the area of interest in the format `x,y,width,height`. For example - `10,10,100,100`
- Can be used with fo-customtransformation.
- If this field is not specified and the file is overwritten, then customCoordinates will be removed.
responseFields:
type: array
items:
type: string
enum:
- tags
- customCoordinates
- isPrivateFile
- embeddedMetadata
- isPublished
- customMetadata
- metadata
- selectedFieldsSchema
description: |
Array of response field keys to include in the API response body.
example:
- tags
- customCoordinates
- isPrivateFile
extensions:
$ref: "#/components/schemas/Extensions"
webhookUrl:
type: string
format: uri
description: >
The final status of extensions after they have completed execution will be delivered to this endpoint as a POST request. [Learn more](/docs/api-reference/digital-asset-management-dam/managing-assets/update-file-details#webhook-payload-structure) about the webhook payload structure.
overwriteFile:
type: boolean
default: true
description: >
If `false` and `useUniqueFileName` is also `false`, and a file already exists at the exact location, upload API will return an error immediately.
overwriteAITags:
type: boolean
default: true
description: >
If set to `true` and a file already exists at the exact location, its AITags will be removed. Set `overwriteAITags` to `false` to preserve AITags.
overwriteTags:
type: boolean
default: true
description: >
If the request does not have `tags`, and a file already exists at the exact location, existing tags will be removed.
overwriteCustomMetadata:
type: boolean
default: true
description: >
If the request does not have `customMetadata`, and a file already exists at the exact location, existing customMetadata will be removed.
customMetadata:
type: object
additionalProperties: true
description: >
JSON key-value pairs to associate with the asset. Create the custom metadata fields before setting these values.
example:
brand: "Nike"
color: "red"
transformation:
type: object
$ref: "#/components/schemas/TransformationObject"
checks:
type: string
description: >
Server-side checks to run on the asset.
Read more about [Upload API checks](/docs/api-reference/upload-file/upload-file#upload-api-checks).
example: >
"request.folder" : "marketing/"
description:
type: string
description: |
Optional text to describe the contents of the file.
example: "Running shoes"
FileUploadV2:
type: object
required:
- file
- fileName
properties:
file:
type: string
format: binary # multipart/form-data file upload
contentEncoding: binary # For our docs try it
description: |
The API accepts any of the following:
- **Binary data** – send the raw bytes as `multipart/form-data`.
- **HTTP / HTTPS URL** – a publicly reachable URL that ImageKit’s servers can fetch.
- **Base64 string** – the file encoded as a Base64 data URI or plain Base64.
When supplying a URL, the server must receive the response headers within 8 seconds; otherwise the request fails with 400 Bad Request.
fileName:
type: string
description: >
The name with which the file has to be uploaded.
token:
type: string
description: >
This is the client-generated JSON Web Token (JWT). The ImageKit.io server uses it to authenticate and check that the upload request parameters have not been tampered with after the token has been generated. Learn how to create the token on the page below. This field is only required for authentication when uploading a file from the client side.
**Note**: Sending a JWT that has been used in the past will result in a validation error. Even if your previous request resulted in an error, you should always send a new token.
**⚠️Warning**: JWT must be generated on the server-side because it is generated using your account's private API key. This field is required for authentication when uploading a file from the client-side.
useUniqueFileName:
type: boolean
default: true
description: >
Whether to use a unique filename for this file or not.
If `true`, ImageKit.io will add a unique suffix to the filename parameter to get a unique filename.
If `false`, then the image is uploaded with the provided filename parameter, and any existing file with the same name is replaced.
tags:
type: array
items:
type: string
description: >
Set the tags while uploading the file.
Provide an array of tag strings (e.g. `["tag1", "tag2", "tag3"]`).
The combined length of all tag characters must not exceed 500, and the `%` character
is not allowed.
If this field is not specified and the file is overwritten, the existing tags will be removed.
example:
- t-shirt
- round-neck
- men
folder:
type: string
description: >
The folder path in which the image has to be uploaded. If the folder(s) didn't exist before, a new folder(s) is created. Using multiple `/` creates a nested folder.
default: "/"
isPrivateFile:
type: boolean
default: false
description: >
Whether to mark the file as private or not.
If `true`, the file is marked as private and is accessible only using named transformation or signed URL.
isPublished:
type: boolean
default: true
description: >
Whether to upload file as published or not.
If `false`, the file is marked as unpublished, which restricts access to the file only via the media library. Files in draft or unpublished state can only be publicly accessed after being published.
The option to upload in draft state is only available in custom enterprise pricing plans.
customCoordinates:
type: string
description: >
Define an important area in the image. This is only relevant for image type files.
- To be passed as a string with the x and y coordinates of the top-left corner, and width and height of the area of interest in the format `x,y,width,height`. For example - `10,10,100,100`
- Can be used with fo-customtransformation.
- If this field is not specified and the file is overwritten, then customCoordinates will be removed.
responseFields:
type: array
items:
type: string
enum:
- tags
- customCoordinates
- isPrivateFile
- embeddedMetadata
- isPublished
- customMetadata
- metadata
- selectedFieldsSchema
description: |
Array of response field keys to include in the API response body.
example:
- tags
- customCoordinates
- isPrivateFile
extensions:
$ref: "#/components/schemas/Extensions"
webhookUrl:
type: string
format: uri
description: >
The final status of extensions after they have completed execution will be delivered to this endpoint as a POST request. [Learn more](/docs/api-reference/digital-asset-management-dam/managing-assets/update-file-details#webhook-payload-structure) about the webhook payload structure.
overwriteFile:
type: boolean
default: true
description: >
If `false` and `useUniqueFileName` is also `false`, and a file already exists at the exact location, upload API will return an error immediately.
overwriteAITags:
type: boolean
default: true
description: >
If set to `true` and a file already exists at the exact location, its AITags will be removed. Set `overwriteAITags` to `false` to preserve AITags.
overwriteTags:
type: boolean
default: true
description: >
If the request does not have `tags`, and a file already exists at the exact location, existing tags will be removed.
overwriteCustomMetadata:
type: boolean
default: true
description: >
If the request does not have `customMetadata`, and a file already exists at the exact location, existing customMetadata will be removed.
customMetadata:
type: object
additionalProperties: true
description: >
JSON key-value pairs to associate with the asset. Create the custom metadata fields before setting these values.
example:
brand: "Nike"
color: "red"
transformation:
type: object
$ref: "#/components/schemas/TransformationObject"
checks:
type: string
description: >
Server-side checks to run on the asset.
Read more about [Upload API checks](/docs/api-reference/upload-file/upload-file-v2#upload-api-checks).
example: >
"request.folder" : "marketing/"
description:
type: string
description: |
Optional text to describe the contents of the file.
example: "Running shoes"
TransformationObject:
type: object
additionalProperties: false
description: |
Configure pre-processing (`pre`) and post-processing (`post`) transformations.
- `pre` — applied before the file is uploaded to the Media Library.
Useful for reducing file size or applying basic optimizations upfront (e.g., resize, compress).
- `post` — applied immediately after upload.
Ideal for generating transformed versions (like video encodes or thumbnails) in advance, so they're ready for delivery without delay.
You can mix and match any combination of post-processing types.
properties:
pre:
type: string
description: |
Transformation string to apply before uploading the file to the Media Library. Useful for optimizing files at ingestion.
example: "w-300,h-300,q-80"
post:
type: array
description: |
List of transformations to apply *after* the file is uploaded.
Each item must match one of the following types:
`transformation`, `gif-to-video`, `thumbnail`, `abs`.
items:
discriminator:
propertyName: type
oneOf:
# ───────────── simple transformation ─────────────
- type: object
title: Simple post-transformation
required: [type, value]
additionalProperties: false
properties:
type:
type: string
const: "transformation"
description: Transformation type.
value:
type: string
description: |
Transformation string (e.g. `w-200,h-200`).
Same syntax as ImageKit URL-based transformations.
example:
type: "transformation"
value: "w-400,h-400,q-70"
# ───────────── GIF → video ─────────────
- type: object
title: Convert GIF to video
required: [type]
additionalProperties: false
properties:
type:
type: string
const: "gif-to-video"
description: Converts an animated GIF into an MP4.
value:
type: string
description: |
Optional transformation string to apply to the output video.
**Example**: `q-80`
example:
type: "gif-to-video"
value: "q-90"
# ───────────── thumbnail ─────────────
- type: object
title: Generate a thumbnail
required: [type]
additionalProperties: false
properties:
type:
type: string
const: "thumbnail"
description: Generates a thumbnail image.
value:
type: string
description: |
Optional transformation string.
**Example**: `w-150,h-150`
example:
type: "thumbnail"
value: "w-150,h-150"
# ───────────── ABS ─────────────
- type: object
title: Adaptive Bitrate Streaming
required: [type, value, protocol]
additionalProperties: false
properties:
type:
type: string
const: "abs"
description: Adaptive Bitrate Streaming (ABS) setup.
value:
type: string
description: |
List of different representations you want to create separated by an underscore.
protocol:
type: string
enum: ["hls", "dash"]
description: Streaming protocol to use (`hls` or `dash`).
example:
type: "abs"
value: "sr-240_360_480_720_1080"
protocol: "hls"
example:
post:
- type: "thumbnail"
value: "w-150,h-150"
- type: "abs"
value: "sr-240_360_480_720_1080"
protocol: "dash"
RemovedotBGExtension:
title: Remove background
type: object
required:
- name
properties:
name:
type: string
const: "remove-bg"
description: Specifies the background removal extension.
options:
type: object
properties:
add_shadow:
type: boolean
description: >
Whether to add an artificial shadow to the result. Default is false.
Note: Adding shadows is currently only supported for car photos.
default: false
semitransparency:
type: boolean
description: >
Allows semi-transparent regions in the result. Default is true.
Note: Semitransparency is currently only supported for car windows.
default: true
bg_color:
type: string
description: >
Specifies a solid color background using hex code (e.g., "81d4fa", "fff") or color name (e.g., "green").
If this parameter is set, `bg_image_url` must be empty.
bg_image_url:
type: string
description: >
Sets a background image from a URL. If this parameter is set, `bg_color` must be empty.
AutoTaggingExtension:
title: Auto tagging
type: object
required:
- name
- minConfidence
- maxTags
properties:
name:
type: string
enum: ["google-auto-tagging", "aws-auto-tagging"]
description: Specifies the auto-tagging extension used.
minConfidence:
type: integer
description: Minimum confidence level for tags to be considered valid.
maxTags:
type: integer
description: Maximum number of tags to attach to the asset.
AutoDescriptionExtension:
title: Auto description
type: object
required:
- name
properties:
name:
type: string
const: "ai-auto-description"
description: Specifies the auto description extension.
AITasksExtension:
title: AI Tasks
type: object
required:
- name
- tasks
properties:
name:
type: string
const: "ai-tasks"
description: Specifies the AI tasks extension for automated image analysis using AI models.
tasks:
type: array
minItems: 1
maxItems: 10
description: Array of task objects defining AI operations to perform on the asset.
items:
discriminator:
propertyName: type
oneOf:
- $ref: "#/components/schemas/AITaskSelectTags"
- $ref: "#/components/schemas/AITaskSelectMetadata"
- $ref: "#/components/schemas/AITaskYesNo"
AITaskSelectTags:
title: AI Task - Select Tags
type: object
required:
- type
- instruction
properties:
type:
type: string
const: "select_tags"
description: Task type that analyzes the image and adds matching tags from a vocabulary.
instruction:
type: string
minLength: 1
maxLength: 2000
description: The question or instruction for the AI to analyze the image.
example: "What types of clothing items are visible in this image?"
vocabulary:
type: array
minItems: 1
maxItems: 30
description: Array of possible tag values. Combined length of all strings must not exceed 500 characters. Cannot contain the `%` character.
items:
type: string
example: ["shirt", "tshirt", "dress", "trousers", "jacket"]
min_selections:
type: integer
minimum: 0
description: Minimum number of tags to select from the vocabulary.
max_selections:
type: integer
minimum: 1
description: Maximum number of tags to select from the vocabulary.
AITaskSelectMetadata:
title: AI Task - Select Metadata
type: object
required:
- type
- instruction
- field
properties:
type:
type: string
const: "select_metadata"
description: Task type that analyzes the image and sets a custom metadata field value from a vocabulary.
instruction:
type: string
minLength: 1
maxLength: 2000
description: The question or instruction for the AI to analyze the image.
example: "What is the primary color of the clothing?"
field:
type: string
description: Name of the custom metadata field to set. The field must exist in your account.
example: "primary_color"
vocabulary:
type: array
minItems: 1
maxItems: 30
description: Array of possible values matching the custom metadata field type.
items:
oneOf:
- type: string
- type: number
- type: boolean
example: ["red", "blue", "green", "black", "white"]
min_selections:
type: integer
minimum: 0
description: Minimum number of values to select from the vocabulary.
max_selections:
type: integer
minimum: 1
description: Maximum number of values to select from the vocabulary.
AITaskYesNo:
title: AI Task - Yes/No
type: object
required:
- type
- instruction
properties:
type:
type: string
const: "yes_no"
description: Task type that asks a yes/no question and executes actions based on the answer.
instruction:
type: string
minLength: 1
maxLength: 2000
description: The yes/no question for the AI to answer about the image.
example: "Is this a luxury or high-end fashion item?"
on_yes:
$ref: "#/components/schemas/AITaskAction"
description: Actions to execute if the AI answers yes.
on_no:
$ref: "#/components/schemas/AITaskAction"
description: Actions to execute if the AI answers no.
on_unknown:
$ref: "#/components/schemas/AITaskAction"
description: Actions to execute if the AI cannot determine the answer.
AITaskAction:
title: AI Task Action
type: object
description: Defines actions to perform based on AI task results.
properties:
add_tags:
type: array
description: Array of tag strings to add to the asset.
items:
type: string
example: ["luxury", "premium"]
remove_tags:
type: array
description: Array of tag strings to remove from the asset.
items:
type: string
example: ["budget", "affordable"]
set_metadata:
type: array
description: Array of custom metadata field updates.
items:
type: object
required:
- field
- value
properties:
field:
type: string
description: Name of the custom metadata field to set.
value:
description: Value to set for the custom metadata field. The value type should match the custom metadata field type.
oneOf:
- type: string
- type: number
- type: boolean
- type: array
x-stainless-variantName: Mixed
title: Mixed
items:
oneOf:
- type: string
- type: number
- type: boolean
example:
- field: "price_range"
value: "premium"
unset_metadata:
type: array
description: Array of custom metadata fields to remove.
items:
type: object
required:
- field
properties:
field:
type: string
description: Name of the custom metadata field to remove.
example:
- field: "price_range"
ExtensionConfig:
title: Extension Configuration
description: Configuration object for an extension (base extensions only, not saved extension references).
type: object
discriminator:
propertyName: name
oneOf:
- $ref: "#/components/schemas/RemovedotBGExtension"
- $ref: "#/components/schemas/AutoTaggingExtension"
- $ref: "#/components/schemas/AutoDescriptionExtension"
- $ref: "#/components/schemas/AITasksExtension"
SavedExtensionReference:
title: Saved Extension Reference
type: object
required:
- name
- id
properties:
name:
type: string
const: "saved-extension"
description: Indicates this is a reference to a saved extension.
id:
type: string
description: The unique ID of the saved extension to apply.
example: "ext_abc123"
CreateSavedExtension:
title: Create Saved Extension
type: object
required:
- name
- description
- config
properties:
name:
type: string
minLength: 1
description: Name of the saved extension.
example: "Car Quality Analysis"
description:
type: string
minLength: 1
description: Description of what the saved extension does.
example: "Analyzes vehicle images for type, condition, and quality assessment"
config:
$ref: "#/components/schemas/ExtensionConfig"
UpdateSavedExtension:
title: Update Saved Extension
type: object
properties:
name:
type: string
minLength: 1
description: Updated name of the saved extension.
description:
type: string
minLength: 1
description: Updated description of the saved extension.
config:
$ref: "#/components/schemas/ExtensionConfig"
SavedExtension:
title: Saved Extension
description: Saved extension object containing extension configuration.
type: object
properties:
id:
type: string
description: Unique identifier of the saved extension.
example: "ext_abc123"
name:
type: string
description: Name of the saved extension.
example: "Car Quality Analysis"
description:
type: string
description: Description of the saved extension.
example: "Analyzes vehicle images for type, condition, and quality assessment"
config:
$ref: "#/components/schemas/ExtensionConfig"
createdAt:
type: string
format: date-time
description: Timestamp when the saved extension was created.
updatedAt:
type: string
format: date-time
description: Timestamp when the saved extension was last updated.
Extensions:
title: Extensions Array
type: array
items:
discriminator:
propertyName: name
anyOf:
- $ref: "#/components/schemas/RemovedotBGExtension"
- $ref: "#/components/schemas/AutoTaggingExtension"
- $ref: "#/components/schemas/AutoDescriptionExtension"
- $ref: "#/components/schemas/AITasksExtension"
- $ref: "#/components/schemas/SavedExtensionReference"
description: >
Array of extensions to be applied to the asset. Each extension can be configured with specific parameters based on the extension type.
example:
- name: "remove-bg"
options:
add_shadow: true
bg_colour: "green"
- name: "google-auto-tagging"
maxTags: 5
minConfidence: 95
- name: "ai-auto-description"
- name: "ai-tasks"
tasks:
- type: "select_tags"
instruction: "What types of clothing items are visible in this image?"
vocabulary: ["shirt", "tshirt", "dress", "trousers", "jacket"]
- type: "yes_no"
instruction: "Is this a luxury or high-end fashion item?"
on_yes:
add_tags: ["luxury", "premium"]
- name: "saved-extension"
id: "ext_abc123"
FileDetails:
title: File & File Version
description: Object containing details of a file or file version.
type: object
properties:
fileId:
type: string
description: Unique identifier of the asset.
type:
type: string
description: Type of the asset.
enum:
- file
- file-version
name:
type: string
description: Name of the asset.
filePath:
type: string
description: |
Path of the file. This is the path you would use in the URL to access the file. For example, if the file is at the root of the media library, the path will be `/file.jpg`. If the file is inside a folder named `images`, the path will be `/images/file.jpg`.
tags:
type: [array, null]
items:
type: string
description: |
An array of tags assigned to the file. Tags are used to search files in the media library.
AITags:
type: [array, null]
items:
type: object
properties:
name:
type: string
description: Name of the tag.
confidence:
type: number
description: Confidence score of the tag.
source:
type: string
description: Source of the tag. Possible values are `google-auto-tagging` and `aws-auto-tagging`.
description: |
An array of tags assigned to the file by auto tagging.
versionInfo:
type: object
properties:
id:
type: string
description: Unique identifier of the file version.
name:
type: string
description: Name of the file version.
description: |
An object with details of the file version.
isPrivateFile:
type: boolean
description: |
Specifies if the file is private or not.
isPublished:
type: boolean
description: |
Specifies if the file is published or not.
customCoordinates:
type: [string, null]
description: |
An string with custom coordinates of the file.
url:
type: string
format: uri
description: |
URL of the file.
thumbnail:
type: string
format: uri
description: |
URL of the thumbnail image. This URL is used to access the thumbnail image of the file in the media library.
fileType:
type: string
description: |
Type of the file. Possible values are `image`, `non-image`.
mime:
type: string
description: |
MIME type of the file.
width:
type: number
description: |
Width of the file.
height:
type: number
description: |
Height of the file.
size:
type: number
description: |
Size of the file in bytes.
bitRate:
type: integer
description: The bit rate of the video in kbps (only for video).
duration:
type: integer
description: The duration of the video in seconds (only for video).
audioCodec:
type: string
description: The audio codec used in the video (only for video/audio).
videoCodec:
type: string
description: The video codec used in the video (only for video).
hasAlpha:
type: boolean
description: |
Specifies if the image has an alpha channel.
customMetadata:
type: object
description: |
An object with custom metadata for the file.
additionalProperties: true
selectedFieldsSchema:
$ref: "#/components/schemas/SelectedFieldsSchema"
embeddedMetadata:
type: object
additionalProperties: true
description: Consolidated embedded metadata associated with the file. It includes exif, iptc, and xmp data.
description:
type: string
description: |
Optional text to describe the contents of the file. Can be set by the user or the ai-auto-description extension.
createdAt:
type: string
format: date-time
description: |
Date and time when the file was uploaded. The date and time is in ISO8601 format.
updatedAt:
type: string
format: date-time
description: |
Date and time when the file was last updated. The date and time is in ISO8601 format.
FolderDetails:
title: Folder
type: object
properties:
type:
type: string
description: Type of the asset.
const: "folder"
folderId:
type: string
description: Unique identifier of the asset.
name:
type: string
description: Name of the asset.
customMetadata:
type: object
description: An object with custom metadata for the folder. Returns empty object if no custom metadata is set.
additionalProperties: true
folderPath:
type: string
description: |
Path of the folder. This is the path you would use in the URL to access the folder. For example, if the folder is at the root of the media library, the path will be /folder. If the folder is inside another folder named images, the path will be /images/folder.
createdAt:
type: string
format: date-time
description: |
Date and time when the folder was created. The date and time is in ISO8601 format.
updatedAt:
type: string
format: date-time
description: |
Date and time when the folder was last updated. The date and time is in ISO8601 format.
SelectedFieldsSchema:
type: object
description: |
This field is included in the response only if the Path policy feature is available in the plan.
It contains schema definitions for the custom metadata fields selected for the specified file path.
Field selection can only be done when the Path policy feature is enabled.
Keys are the names of the custom metadata fields; the value object has details about the custom metadata schema.
additionalProperties:
type: object
required:
- type
properties:
type:
description: Type of the custom metadata field.
type: string
enum:
- Text
- Textarea
- Number
- Date
- Boolean
- SingleSelect
- MultiSelect
selectOptions:
type: array
items:
oneOf:
- type: string
- type: number
- type: boolean
description: |
An array of allowed values when field type is `SingleSelect` or `MultiSelect`.
example:
- small
- medium
- large
- 30
- 40
- true
selectOptionsTruncated:
type: boolean
description: |
Specifies if the selectOptions array is truncated. It is truncated when number of options are > 100.
defaultValue:
description: |
The default value for this custom metadata field. The value should match the `type` of custom metadata field.
oneOf:
- type: string
- type: number
- type: boolean
- type: array
x-stainless-variantName: Mixed
title: Mixed
items:
oneOf:
- type: string
- type: number
- type: boolean
description: |
Default value should be of type array when custom metadata field type is set to `MultiSelect`.
example:
- true
- 10
- Hello
isValueRequired:
type: boolean
description: |
Specifies if the custom metadata field is required or not.
readOnly:
type: boolean
description: |
Indicates whether the custom metadata field is read only. A read only field cannot be modified after being set. This field is configurable only via the **Path policy** feature.
minValue:
description: |
Minimum value of the field. Only set if field type is `Date` or `Number`. For `Date` type field, the value will be in ISO8601 string format. For `Number` type field, it will be a numeric value.
oneOf:
- type: string
- type: number
maxValue:
description: |
Maximum value of the field. Only set if field type is `Date` or `Number`. For `Date` type field, the value will be in ISO8601 string format. For `Number` type field, it will be a numeric value.
oneOf:
- type: string
- type: number
minLength:
description: |
Minimum length of string. Only set if `type` is set to `Text` or `Textarea`.
type: number
maxLength:
description: |
Maximum length of string. Only set if `type` is set to `Text` or `Textarea`.
type: number
Upload:
description: Object containing details of a successful upload.
type: object
properties:
fileId:
type: string
description: Unique fileId. Store this fileld in your database, as this will be used to perform update action on this file.
name:
type: string
description: Name of the asset.
filePath:
type: string
description: The relative path of the file in the media library e.g. `/marketing-assets/new-banner.jpg`.
url:
type: string
description: A publicly accessible URL of the file.
thumbnailUrl:
type: string
description: In the case of an image, a small thumbnail URL.
height:
type: number
description: Height of the image in pixels (Only for images)
width:
type: number
description: Width of the image in pixels (Only for Images)
size:
type: number
description: Size of the image file in Bytes.
bitRate:
type: integer
description: The bit rate of the video in kbps (only for video).
duration:
type: integer
description: The duration of the video in seconds (only for video).
audioCodec:
type: string
description: The audio codec used in the video (only for video).
videoCodec:
type: string
description: The video codec used in the video (only for video).
tags:
type: [array, null]
items:
type: string
description: The array of tags associated with the asset. If no tags are set, it will be `null`. Send `tags` in `responseFields` in API request to get the value of this field.
AITags:
type: [array, null]
items:
type: object
properties:
name:
type: string
description: Name of the tag.
confidence:
type: number
description: Confidence score of the tag.
source:
type: string
description: Array of `AITags` associated with the image. If no `AITags` are set, it will be null. These tags can be added using the `google-auto-tagging` or `aws-auto-tagging` extensions.
description: |
An array of tags assigned to the uploaded file by auto tagging.
versionInfo:
type: object
properties:
id:
type: string
description: Unique identifier of the file version.
name:
type: string
description: Name of the file version.
description: |
An object containing the file or file version's `id` (versionId) and `name`.
isPrivateFile:
type: boolean
description: |
Is the file marked as private. It can be either `true` or `false`. Send `isPrivateFile` in `responseFields` in API request to get the value of this field.
isPublished:
type: boolean
description: |
Is the file published or in draft state. It can be either `true` or `false`. Send `isPublished` in `responseFields` in API request to get the value of this field.
customCoordinates:
type: [string, null]
description: |
Value of custom coordinates associated with the image in the format `x,y,width,height`. If `customCoordinates` are not defined, then it is `null`. Send `customCoordinates` in `responseFields` in API request to get the value of this field.
fileType:
type: string
description: |
Type of the uploaded file. Possible values are `image`, `non-image`.
customMetadata:
type: object
description: |
A key-value data associated with the asset. Use `responseField` in API request to get `customMetadata` in the upload API response. Before setting any custom metadata on an asset, you have to create the field using custom metadata fields API. Send `customMetadata` in `responseFields` in API request to get the value of this field.
additionalProperties: true
selectedFieldsSchema:
$ref: "#/components/schemas/SelectedFieldsSchema"
extensionStatus:
type: object
description: |
Extension names with their processing status at the time of completion of the request. It could have one of the following status values:
`success`: The extension has been successfully applied.
`failed`: The extension has failed and will not be retried.
`pending`: The extension will finish processing in some time. On completion, the final status (success / failed) will be sent to the `webhookUrl` provided.
If no extension was requested, then this parameter is not returned.
properties:
google-auto-tagging:
type: string
enum: ["success", "pending", "failed"]
aws-auto-tagging:
type: string
enum: ["success", "pending", "failed"]
remove-bg:
type: string
enum: ["success", "pending", "failed"]
ai-auto-description:
type: string
enum: ["success", "pending", "failed"]
ai-tasks:
type: string
enum: ["success", "pending", "failed"]
metadata:
type: object
$ref: "#/components/schemas/Metadata"
description: |
Legacy metadata. Send `metadata` in `responseFields` in API request to get metadata in the upload API response.
embeddedMetadata:
type: object
additionalProperties: true
description: Consolidated embedded metadata associated with the file. It includes exif, iptc, and xmp data. Send `embeddedMetadata` in `responseFields` in API request to get embeddedMetadata in the upload API response.
description:
type: string
description: |
Optional text to describe the contents of the file. Can be set by the user or the ai-auto-description extension.
ExifImage:
description: Object containing EXIF image information.
type: object
properties:
Make:
type: string
Model:
type: string
Orientation:
type: integer
XResolution:
type: integer
YResolution:
type: integer
ResolutionUnit:
type: integer
Software:
type: string
ModifyDate:
type: string
YCbCrPositioning:
type: integer
ExifOffset:
type: integer
GPSInfo:
type: integer
Thumbnail:
description: Object containing Thumbnail information.
type: object
properties:
Compression:
type: integer
XResolution:
type: integer
YResolution:
type: integer
ResolutionUnit:
type: integer
ThumbnailOffset:
type: integer
ThumbnailLength:
type: integer
ExifDetails:
description: Object containing Exif details.
type: object
properties:
ExposureTime:
type: number
FNumber:
type: number
ExposureProgram:
type: integer
ISO:
type: integer
ExifVersion:
type: string
DateTimeOriginal:
type: string
CreateDate:
type: string
ShutterSpeedValue:
type: number
ApertureValue:
type: number
ExposureCompensation:
type: number
MeteringMode:
type: integer
Flash:
type: integer
FocalLength:
type: integer
SubSecTime:
type: string
FlashpixVersion:
type: string
ColorSpace:
type: integer
ExifImageWidth:
type: integer
ExifImageHeight:
type: integer
InteropOffset:
type: integer
FocalPlaneXResolution:
type: number
FocalPlaneYResolution:
type: number
FocalPlaneResolutionUnit:
type: integer
CustomRendered:
type: integer
ExposureMode:
type: integer
WhiteBalance:
type: integer
SceneCaptureType:
type: integer
Gps:
description: Object containing GPS information.
type: object
properties:
GPSVersionID:
type: array
items:
type: integer
Interoperability:
description: JSON object.
type: object
properties:
InteropIndex:
type: string
InteropVersion:
type: string
Metadata:
description: JSON object containing metadata.
type: object
properties:
height:
type: integer
description: The height of the image or video in pixels.
width:
type: integer
description: The width of the image or video in pixels.
size:
type: integer
description: The file size in bytes.
format:
type: string
description: The format of the file (e.g., 'jpg', 'mp4').
hasColorProfile:
type: boolean
description: Indicates if the image has a color profile.
quality:
type: integer
description: The quality indicator of the image.
density:
type: integer
description: The density of the image in DPI.
hasTransparency:
type: boolean
description: Indicates if the image contains transparent areas.
pHash:
type: string
description: Perceptual hash of the image.
bitRate:
type: integer
description: The bit rate of the video in kbps (only for video).
duration:
type: integer
description: The duration of the video in seconds (only for video).
audioCodec:
type: string
description: The audio codec used in the video (only for video).
videoCodec:
type: string
description: The video codec used in the video (only for video).
exif:
type: object
properties:
image:
$ref: "#/components/schemas/ExifImage"
thumbnail:
$ref: "#/components/schemas/Thumbnail"
exif:
$ref: "#/components/schemas/ExifDetails"
gps:
$ref: "#/components/schemas/Gps"
interoperability:
$ref: "#/components/schemas/Interoperability"
makernote:
type: object
additionalProperties: true
CustomMetadataField:
description: Object containing details of a custom metadata field.
type: object
required:
- id
- name
- label
- schema
properties:
id:
type: string
description: Unique identifier for the custom metadata field. Use this to update the field.
name:
type: string
description: |
API name of the custom metadata field. This becomes the key while setting `customMetadata` (key-value object) for an asset using upload or update API.
label:
type: string
description: |
Human readable name of the custom metadata field. This name is displayed as form field label to the users while setting field value on the asset in the media library UI.
schema:
type: object
description: An object that describes the rules for the custom metadata field value.
required:
- type
properties:
type:
description: Type of the custom metadata field.
type: string
enum:
- Text
- Textarea
- Number
- Date
- Boolean
- SingleSelect
- MultiSelect
selectOptions:
type: array
items:
oneOf:
- type: string
- type: number
- type: boolean
description: |
An array of allowed values when field type is `SingleSelect` or `MultiSelect`.
example:
- small
- medium
- large
- 30
- 40
- true
defaultValue:
description: |
The default value for this custom metadata field. Data type of default value depends on the field type.
oneOf:
- type: string
- type: number
- type: boolean
- type: array
x-stainless-variantName: Mixed
title: Mixed
items:
oneOf:
- type: string
- type: number
- type: boolean
description: |
Default value should be of type array when custom metadata field type is set to `MultiSelect`.
example:
- true
- 10
- Hello
isValueRequired:
type: boolean
description: |
Specifies if the this custom metadata field is required or not.
minValue:
description: |
Minimum value of the field. Only set if field type is `Date` or `Number`. For `Date` type field, the value will be in ISO8601 string format. For `Number` type field, it will be a numeric value.
oneOf:
- type: string
- type: number
maxValue:
description: |
Maximum value of the field. Only set if field type is `Date` or `Number`. For `Date` type field, the value will be in ISO8601 string format. For `Number` type field, it will be a numeric value.
oneOf:
- type: string
- type: number
minLength:
description: |
Minimum length of string. Only set if `type` is set to `Text` or `Textarea`.
type: number
maxLength:
description: |
Maximum length of string. Only set if `type` is set to `Text` or `Textarea`.
type: number
VideoWebhookRequestInfo:
type: object
description: Information about the original request that triggered the video transformation.
properties:
x_request_id:
type: string
description: Unique identifier for the originating transformation request.
url:
type: string
format: uri
description: Full URL of the transformation request that was submitted.
user_agent:
type: string
description: User-Agent header from the original request that triggered the transformation.
required: [x_request_id, url]
JobResponse:
type: object
title: Async Bulk Job Response
description: Job submitted successfully. A `jobId` will be returned.
required: [jobId]
properties:
jobId:
type: string
description: |
Unique identifier of the bulk job. This can be used to check the status of the bulk job.
VideoAsset:
type: object
description: Information about the source video asset being transformed.
properties:
url:
type: string
format: uri
description: URL to download or access the source video file.
required: [url]
VideoTransformationOptions:
type: object
description: Configuration options for video transformations.
properties:
video_codec:
type: string
enum: ["h264", "vp9", "av1"]
description: Video codec used for encoding (h264, vp9, or av1).
audio_codec:
type: string
enum: ["aac", "opus"]
description: Audio codec used for encoding (aac or opus).
auto_rotate:
type: boolean
description: Whether to automatically rotate the video based on metadata.
quality:
type: integer
description: Quality setting for the output video.
format:
type: string
enum: ["mp4", "webm", "jpg", "png", "webp"]
description: Output format for the transformed video or thumbnail.
stream_protocol:
type: string
enum: ["HLS", "DASH"]
description: Streaming protocol for adaptive bitrate streaming.
variants:
type: array
description: Array of quality representations for adaptive bitrate streaming.
items:
type: string
description: Representation label indicating resolution or quality (e.g., "360", "480", "720", "1080").
VideoTransformationBase:
type: object
description: Base information about a video transformation request.
properties:
type:
type: string
enum: [video-transformation, gif-to-video, video-thumbnail]
description: |
Type of video transformation:
- `video-transformation`: Standard video processing (resize, format conversion, etc.)
- `gif-to-video`: Convert animated GIF to video format
- `video-thumbnail`: Generate thumbnail image from video
options:
$ref: "#/components/schemas/VideoTransformationOptions"
required: [type]
# ---- Event: accepted ----
VideoTransformationAcceptedEvent:
allOf:
- $ref: "#/components/schemas/BaseWebhookEvent"
- type: object
description: |
Triggered when a new video transformation request is accepted for processing. This event confirms that ImageKit has received and queued your transformation request. Use this for debugging and tracking transformation lifecycle.
properties:
type:
type: string
const: "video.transformation.accepted"
created_at:
type: string
format: date-time
description: Timestamp when the event was created in ISO8601 format.
request:
$ref: "#/components/schemas/VideoWebhookRequestInfo"
data:
type: object
properties:
asset:
$ref: "#/components/schemas/VideoAsset"
transformation:
$ref: "#/components/schemas/VideoTransformationBase"
required: [asset, transformation]
required: [type, created_at, request, data]
# ---- Event: ready ----
VideoTransformationReadyEvent:
allOf:
- $ref: "#/components/schemas/BaseWebhookEvent"
- type: object
description: |
Triggered when video encoding is finished and the transformed resource is ready to be served. This is the key event to listen for - update your database or CMS flags when you receive this so your application can start showing the transformed video to users.
properties:
type:
type: string
const: "video.transformation.ready"
created_at:
type: string
format: date-time
description: Timestamp when the event was created in ISO8601 format.
request:
$ref: "#/components/schemas/VideoWebhookRequestInfo"
timings:
type: object
description: Performance metrics for the transformation process.
properties:
download_duration:
type: integer
description: Time spent downloading the source video from your origin or media library, in milliseconds.
encoding_duration:
type: integer
description: Time spent encoding the video, in milliseconds.
data:
type: object
properties:
asset:
$ref: "#/components/schemas/VideoAsset"
transformation:
allOf:
- $ref: "#/components/schemas/VideoTransformationBase"
- type: object
properties:
output:
type: object
description: Information about the transformed output video.
properties:
url:
type: string
format: uri
description: URL to access the transformed video.
video_metadata:
type: object
description: Metadata of the output video file.
properties:
duration:
type: number
description: Duration of the output video in seconds.
width:
type: integer
description: Width of the output video in pixels.
height:
type: integer
description: Height of the output video in pixels.
bitrate:
type: integer
description: Bitrate of the output video in bits per second.
required: [duration, width, height, bitrate]
required: [url]
required: [asset, transformation]
required: [type, created_at, request, data]
# ---- Event: error ----
VideoTransformationErrorEvent:
allOf:
- $ref: "#/components/schemas/BaseWebhookEvent"
- type: object
description: |
Triggered when an error occurs during video encoding. Listen to this webhook to log error reasons and debug issues. Check your origin and URL endpoint settings if the reason is related to download failure. For other errors, contact ImageKit support.
properties:
type:
type: string
const: "video.transformation.error"
created_at:
type: string
format: date-time
description: Timestamp when the event was created in ISO8601 format.
request:
$ref: "#/components/schemas/VideoWebhookRequestInfo"
data:
type: object
properties:
asset:
$ref: "#/components/schemas/VideoAsset"
transformation:
allOf:
- $ref: "#/components/schemas/VideoTransformationBase"
- type: object
properties:
error:
type: object
description: Details about the transformation error.
properties:
reason:
type: string
description: |
Specific reason for the transformation failure:
- `encoding_failed`: Error during video encoding process
- `download_failed`: Could not download source video
- `internal_server_error`: Unexpected server error
enum:
[
encoding_failed,
download_failed,
internal_server_error,
]
required: [reason]
required: [asset, transformation]
required: [type, created_at, request, data]
# ──── Pre-transformation Event Schemas ────
PreTransformWebhookRequestInfo:
type: object
properties:
x_request_id:
type: string
description: Unique identifier for the originating request.
transformation:
type: string
description: The requested pre-transformation string.
required: [x_request_id, transformation]
UploadPreTransformSuccessEvent:
allOf:
- $ref: "#/components/schemas/BaseWebhookEvent"
- type: object
description: |
Triggered when a pre-transformation completes successfully. The file has been processed with the requested transformation and is now available in the Media Library.
properties:
type:
type: string
const: "upload.pre-transform.success"
created_at:
type: string
format: date-time
description: Timestamp of when the event occurred in ISO8601 format.
request:
$ref: "#/components/schemas/PreTransformWebhookRequestInfo"
data:
$ref: "#/components/schemas/Upload"
required: [type, created_at, request, data]
UploadPreTransformErrorEvent:
allOf:
- $ref: "#/components/schemas/BaseWebhookEvent"
- type: object
description: |
Triggered when a pre-transformation fails. The file upload may have been accepted, but the requested transformation could not be applied.
properties:
type:
type: string
const: "upload.pre-transform.error"
created_at:
type: string
format: date-time
description: Timestamp of when the event occurred in ISO8601 format.
request:
$ref: "#/components/schemas/PreTransformWebhookRequestInfo"
data:
type: object
properties:
name:
type: string
description: Name of the file.
path:
type: string
description: Path of the file.
transformation:
type: object
properties:
error:
type: object
properties:
reason:
type: string
description: Reason for the pre-transformation failure.
example: "encoding_failed"
required: [reason]
required: [error]
required: [name, path, transformation]
required: [type, created_at, request, data]
# ──── Post-transformation Event Schemas ────
PostTransformWebhookRequestInfo:
type: object
properties:
x_request_id:
type: string
description: Unique identifier for the originating request.
transformation:
type: object
properties:
type:
type: string
enum: [transformation, abs, gif-to-video, thumbnail]
description: Type of the requested post-transformation.
value:
type: string
description: Value for the requested transformation type.
protocol:
type: string
enum: [hls, dash]
description: Only applicable if transformation type is 'abs'. Streaming protocol used.
required: [type]
required: [x_request_id, transformation]
UploadPostTransformSuccessEvent:
allOf:
- $ref: "#/components/schemas/BaseWebhookEvent"
- type: object
description: |
Triggered when a post-transformation completes successfully. The transformed version of the file is now ready and can be accessed via the provided URL. Note that each post-transformation generates a separate webhook event.
properties:
type:
type: string
const: "upload.post-transform.success"
created_at:
type: string
format: date-time
description: Timestamp of when the event occurred in ISO8601 format.
request:
$ref: "#/components/schemas/PostTransformWebhookRequestInfo"
data:
type: object
properties:
fileId:
type: string
description: Unique identifier of the originally uploaded file.
url:
type: string
format: uri
description: URL of the generated post-transformation.
name:
type: string
description: Name of the file.
required: [fileId, url, name]
required: [type, created_at, request, data]
UploadPostTransformErrorEvent:
allOf:
- $ref: "#/components/schemas/BaseWebhookEvent"
- type: object
description: |
Triggered when a post-transformation fails. The original file remains available, but the requested transformation could not be generated.
properties:
type:
type: string
const: "upload.post-transform.error"
created_at:
type: string
format: date-time
description: Timestamp of when the event occurred in ISO8601 format.
request:
$ref: "#/components/schemas/PostTransformWebhookRequestInfo"
data:
type: object
properties:
fileId:
type: string
description: Unique identifier of the originally uploaded file.
url:
type: string
format: uri
description: URL of the attempted post-transformation.
name:
type: string
description: Name of the file.
path:
type: string
description: Path of the file.
transformation:
type: object
properties:
error:
type: object
properties:
reason:
type: string
description: Reason for the post-transformation failure.
example: "encoding_failed"
required: [reason]
required: [error]
required: [fileId, url, name, path, transformation]
required: [type, created_at, request, data]
SrcOptions:
title: Source Options
description: Options for generating ImageKit URLs with transformations. See the [Transformations guide](https://imagekit.io/docs/transformations).
type: object
required:
- src
- urlEndpoint
properties:
src:
type: string
description: |
Accepts a relative or absolute path of the resource. If a relative path is provided, it is appended to the `urlEndpoint`.
If an absolute path is provided, `urlEndpoint` is ignored.
example: "/my-image.jpg"
urlEndpoint:
type: string
format: uri
description: |
Get your urlEndpoint from the [ImageKit dashboard](https://imagekit.io/dashboard/url-endpoints).
example: "https://ik.imagekit.io/demo"
transformation:
type: array
items:
$ref: "#/components/schemas/Transformation"
description: |
An array of objects specifying the transformations to be applied in the URL. If more than one transformation is specified, they are applied in the order they are specified as chained transformations.
See [Chained transformations](https://imagekit.io/docs/transformations#chained-transformations).
queryParameters:
type: object
additionalProperties:
type: string
description: |
These are additional query parameters that you want to add to the final URL.
They can be any query parameters and not necessarily related to ImageKit.
This is especially useful if you want to add a versioning parameter to your URLs.
transformationPosition:
$ref: "#/components/schemas/TransformationPosition"
signed:
type: boolean
default: false
description: |
Whether to sign the URL or not. Set this to `true` if you want to generate a signed URL.
If `signed` is `true` and `expiresIn` is not specified, the signed URL will not expire (valid indefinitely).
Note: If `expiresIn` is set to any value above 0, the URL will always be signed regardless of this setting.
[Learn more](https://imagekit.io/docs/media-delivery-basic-security#how-to-generate-signed-urls).
expiresIn:
type: number
description: |
When you want the signed URL to expire, specified in seconds. If `expiresIn` is anything above 0,
the URL will always be signed even if `signed` is set to false. If not specified and `signed` is `true`,
the signed URL will not expire (valid indefinitely).
Example: Setting `expiresIn: 3600` will make the URL expire 1 hour from generation time. After the expiry time, the signed URL will no longer be valid and ImageKit will return
a 401 Unauthorized status code.
[Learn more](https://imagekit.io/docs/media-delivery-basic-security#how-to-generate-signed-urls).
additionalProperties: false
GetImageAttributesOptions:
title: Get Image Attributes Options
description: |
Options for generating responsive image attributes including `src`, `srcSet`, and `sizes` for HTML `<img>` elements.
This schema extends `SrcOptions` to add support for responsive image generation with breakpoints.
type: object
allOf:
- $ref: "#/components/schemas/SrcOptions"
- type: object
properties:
width:
type: number
description: |
The intended display width of the image in pixels,
used **only when the `sizes` attribute is not provided**.
Triggers a DPR-based strategy (1x and 2x variants) and generates `x` descriptors in `srcSet`.
Ignored if `sizes` is present.
example: 400
sizes:
type: string
description: |
The value for the HTML `sizes` attribute
(e.g., `"100vw"` or `"(min-width:768px) 50vw, 100vw"`).
- If it includes one or more `vw` units, breakpoints smaller than the corresponding percentage of the smallest device width are excluded.
- If it contains no `vw` units, the full breakpoint list is used.
Enables a width-based strategy and generates `w` descriptors in `srcSet`.
example: "(min-width: 768px) 50vw, 100vw"
deviceBreakpoints:
type: array
items:
type: number
description: |
Custom list of **device-width breakpoints** in pixels.
These define common screen widths for responsive image generation.
Defaults to `[640, 750, 828, 1080, 1200, 1920, 2048, 3840]`.
Sorted automatically.
example: [640, 750, 828, 1080, 1200, 1920, 2048, 3840]
imageBreakpoints:
type: array
items:
type: number
description: |
Custom list of **image-specific breakpoints** in pixels.
Useful for generating small variants (e.g., placeholders or thumbnails).
Merged with `deviceBreakpoints` before calculating `srcSet`.
Defaults to `[16, 32, 48, 64, 96, 128, 256, 384]`.
Sorted automatically.
example: [16, 32, 48, 64, 96, 128, 256, 384]
ResponsiveImageAttributes:
title: Responsive Image Attributes
description: |
Resulting set of attributes suitable for an HTML `<img>` element.
Useful for enabling responsive image loading with `srcSet` and `sizes`.
type: object
required:
- src
properties:
src:
type: string
format: uri
description: URL for the *largest* candidate (assigned to plain `src`).
example: "https://ik.imagekit.io/demo/image.jpg?tr=w-3840"
srcSet:
type: string
description: |
Candidate set with `w` or `x` descriptors.
Multiple image URLs separated by commas, each with a descriptor.
example: "https://ik.imagekit.io/demo/image.jpg?tr=w-640 640w, https://ik.imagekit.io/demo/image.jpg?tr=w-1080 1080w, https://ik.imagekit.io/demo/image.jpg?tr=w-1920 1920w"
sizes:
type: string
description: |
`sizes` returned (or synthesised as `100vw`).
The value for the HTML `sizes` attribute.
example: "100vw"
width:
type: number
description: Width as a number (if `width` was provided in the input options).
example: 400
TransformationPosition:
type: string
enum: ["path", "query"]
description: |
By default, the transformation string is added as a query parameter in the URL, e.g., `?tr=w-100,h-100`.
If you want to add the transformation string in the path of the URL, set this to `path`.
Learn more in the [Transformations guide](https://imagekit.io/docs/transformations).
StreamingResolution:
type: string
enum: ["240", "360", "480", "720", "1080", "1440", "2160"]
description: Available streaming resolutions for [adaptive bitrate streaming](https://imagekit.io/docs/adaptive-bitrate-streaming)
Transformation:
title: Transformation
description: |
The SDK provides easy-to-use names for transformations. These names are converted to the corresponding transformation string before being added to the URL.
SDKs are updated regularly to support new transformations. If you want to use a transformation that is not supported by the SDK,
You can use the `raw` parameter to pass the transformation string directly.
See the [Transformations documentation](https://imagekit.io/docs/transformations).
type: object
properties:
width:
oneOf:
- type: number
- type: string
description: |
Specifies the width of the output. If a value between 0 and 1 is provided, it is treated as a percentage (e.g., `0.4` represents 40% of the original width).
You can also supply arithmetic expressions (e.g., `iw_div_2`).
Width transformation – [Images](https://imagekit.io/docs/image-resize-and-crop#width---w) · [Videos](https://imagekit.io/docs/video-resize-and-crop#width---w)
example: 300
height:
oneOf:
- type: number
- type: string
description: |
Specifies the height of the output. If a value between 0 and 1 is provided, it is treated as a percentage (e.g., `0.5` represents 50% of the original height).
You can also supply arithmetic expressions (e.g., `ih_mul_0.5`).
Height transformation – [Images](https://imagekit.io/docs/image-resize-and-crop#height---h) · [Videos](https://imagekit.io/docs/video-resize-and-crop#height---h)
example: 200
aspectRatio:
oneOf:
- type: number
- type: string
description: |
Specifies the aspect ratio for the output, e.g., "ar-4-3". Typically used with either width or height (but not both).
For example: aspectRatio = `4:3`, `4_3`, or an expression like `iar_div_2`.
See [Image resize and crop – Aspect ratio](https://imagekit.io/docs/image-resize-and-crop#aspect-ratio---ar).
example: "4:3"
background:
type: string
description: |
Specifies the background to be used in conjunction with certain cropping strategies when resizing an image.
- A solid color: e.g., `red`, `F3F3F3`, `AAFF0010`. See [Solid color background](https://imagekit.io/docs/effects-and-enhancements#solid-color-background).
- Dominant color: `dominant` extracts the dominant color from the image. See [Dominant color background](https://imagekit.io/docs/effects-and-enhancements#dominant-color-background).
- Gradient: `gradient_dominant` or `gradient_dominant_2` creates a gradient using the dominant colors. Optionally specify palette size (2 or 4), e.g., `gradient_dominant_4`. See [Gradient background](https://imagekit.io/docs/effects-and-enhancements#gradient-background).
- A blurred background: e.g., `blurred`, `blurred_25_N15`, etc. See [Blurred background](https://imagekit.io/docs/effects-and-enhancements#blurred-background).
- Expand the image boundaries using generative fill: `genfill`. Not supported inside overlay. Optionally, control the background scene by passing a text prompt:
`genfill[:-prompt-${text}]` or `genfill[:-prompte-${urlencoded_base64_encoded_text}]`. See [Generative fill background](https://imagekit.io/docs/ai-transformations#generative-fill-bg-genfill).
example: "red"
border:
type: string
description: |
Adds a border to the output media. Accepts a string in the format `<border-width>_<hex-code>`
(e.g., `5_FFF000` for a 5px yellow border), or an expression like `ih_div_20_FF00FF`.
See [Border](https://imagekit.io/docs/effects-and-enhancements#border---b).
example: "5_FF0000"
crop:
type: string
enum: ["force", "at_max", "at_max_enlarge", "at_least", "maintain_ratio"]
description: Crop modes for image resizing. See [Crop modes & focus](https://imagekit.io/docs/image-resize-and-crop#crop-crop-modes--focus).
cropMode:
type: string
enum: ["pad_resize", "extract", "pad_extract"]
description: Additional crop modes for image resizing. See [Crop modes & focus](https://imagekit.io/docs/image-resize-and-crop#crop-crop-modes--focus).
dpr:
type: number
minimum: 0.1
maximum: 5
description: |
Accepts values between 0.1 and 5, or `auto` for automatic device pixel ratio (DPR) calculation. Also accepts arithmetic expressions.
- Learn about [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
- See [DPR](https://imagekit.io/docs/image-resize-and-crop#dpr---dpr).
example: 2
focus:
type: string
description: |
Refines padding and cropping behavior for pad resize, maintain ratio, and extract crop modes.
Supports manual positions and coordinate-based focus. With AI-based cropping, you can automatically
keep key subjects in frame—such as faces or detected objects (e.g., `fo-face`, `fo-person`, `fo-car`)—
while resizing.
- See [Focus](https://imagekit.io/docs/image-resize-and-crop#focus---fo).
- [Object aware cropping](https://imagekit.io/docs/image-resize-and-crop#object-aware-cropping---fo-object-name)
example: "center"
quality:
type: number
minimum: 1
maximum: 100
description: |
Specifies the quality of the output image for lossy formats such as JPEG, WebP, and AVIF.
A higher quality value results in a larger file size with better quality, while a lower value produces a smaller file size with reduced quality.
See [Quality](https://imagekit.io/docs/image-optimization#quality---q).
example: 80
x:
oneOf:
- type: number
- type: string
description: Focus using cropped image coordinates - X coordinate. See [Focus using cropped coordinates](https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates).
xCenter:
oneOf:
- type: number
- type: string
description: Focus using cropped image coordinates - X center coordinate. See [Focus using cropped coordinates](https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates).
y:
oneOf:
- type: number
- type: string
description: Focus using cropped image coordinates - Y coordinate. See [Focus using cropped coordinates](https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates).
yCenter:
oneOf:
- type: number
- type: string
description: Focus using cropped image coordinates - Y center coordinate. See [Focus using cropped coordinates](https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates).
format:
type: string
enum: ["auto", "webp", "jpg", "jpeg", "png", "gif", "svg", "mp4", "webm", "avif", "orig"]
description: |
Specifies the output format for images or videos, e.g., `jpg`, `png`, `webp`, `mp4`, or `auto`.
You can also pass `orig` for images to return the original format.
ImageKit automatically delivers images and videos in the optimal format based on device support unless overridden by the dashboard settings or the format parameter.
See [Image format](https://imagekit.io/docs/image-optimization#format---f) and [Video format](https://imagekit.io/docs/video-optimization#format---f).
videoCodec:
type: string
enum: ["h264", "vp9", "av1", "none"]
description: Specifies the video codec, e.g., `h264`, `vp9`, `av1`, or `none`. See [Video codec](https://imagekit.io/docs/video-optimization#video-codec---vc).
audioCodec:
type: string
enum: ["aac", "opus", "none"]
description: Specifies the audio codec, e.g., `aac`, `opus`, or `none`. See [Audio codec](https://imagekit.io/docs/video-optimization#audio-codec---ac).
radius:
anyOf:
- type: number
- const: "max"
- type: string
description: |
Specifies the corner radius for rounded corners.
- Single value (positive integer): Applied to all corners (e.g., `20`).
- `max`: Creates a circular or oval shape.
- Per-corner array: Provide four underscore-separated values representing top-left, top-right, bottom-right, and bottom-left corners respectively (e.g., `10_20_30_40`).
See [Radius](https://imagekit.io/docs/effects-and-enhancements#radius---r).
example: 20
rotation:
oneOf:
- type: number
- type: string
description: |
Specifies the rotation angle in degrees. Positive values rotate the image clockwise; you can also use, for example, `N40` for counterclockwise rotation
or `auto` to use the orientation specified in the image's EXIF data.
For videos, only the following values are supported: 0, 90, 180, 270, or 360.
See [Rotate](https://imagekit.io/docs/effects-and-enhancements#rotate---rt).
example: 90
blur:
type: number
minimum: 1
maximum: 100
description: |
Specifies the Gaussian blur level. Accepts an integer value between 1 and 100, or an expression like `bl-10`.
See [Blur](https://imagekit.io/docs/effects-and-enhancements#blur---bl).
example: 10
named:
type: string
description: Named transformation reference. See [Named transformations](https://imagekit.io/docs/transformations#named-transformations).
defaultImage:
type: string
description: |
Specifies a fallback image if the resource is not found, e.g., a URL or file path.
See [Default image](https://imagekit.io/docs/image-transformation#default-image---di).
flip:
type: string
enum: ["h", "v", "h_v", "v_h"]
description: |
Flips or mirrors an image either horizontally, vertically, or both.
Acceptable values: `h` (horizontal), `v` (vertical), `h_v` (horizontal and vertical), or `v_h`.
See [Flip](https://imagekit.io/docs/effects-and-enhancements#flip---fl).
original:
type: boolean
description: |
If set to true, serves the original file without applying any transformations.
See [Deliver original file as-is](https://imagekit.io/docs/core-delivery-features#deliver-original-file-as-is---orig-true).
startOffset:
oneOf:
- type: number
- type: string
description: |
Specifies the start offset (in seconds) for trimming videos, e.g., `5` or `10.5`.
Arithmetic expressions are also supported.
See [Trim videos – Start offset](https://imagekit.io/docs/trim-videos#start-offset---so).
endOffset:
oneOf:
- type: number
- type: string
description: |
Specifies the end offset (in seconds) for trimming videos, e.g., `5` or `10.5`.
Typically used with startOffset to define a time window. Arithmetic expressions are supported.
See [Trim videos – End offset](https://imagekit.io/docs/trim-videos#end-offset---eo).
duration:
oneOf:
- type: number
- type: string
description: |
Specifies the duration (in seconds) for trimming videos, e.g., `5` or `10.5`.
Typically used with startOffset to indicate the length from the start offset. Arithmetic expressions are supported.
See [Trim videos – Duration](https://imagekit.io/docs/trim-videos#duration---du).
streamingResolutions:
type: array
items:
$ref: "#/components/schemas/StreamingResolution"
description: |
An array of resolutions for adaptive bitrate streaming, e.g., [`240`, `360`, `480`, `720`, `1080`].
See [Adaptive Bitrate Streaming](https://imagekit.io/docs/adaptive-bitrate-streaming).
grayscale:
const: true
description: Enables a grayscale effect for images. See [Grayscale](https://imagekit.io/docs/effects-and-enhancements#grayscale---e-grayscale).
aiUpscale:
const: true
description: |
Upscales images beyond their original dimensions using AI. Not supported inside overlay.
See [AI Upscale](https://imagekit.io/docs/ai-transformations#upscale-e-upscale).
aiRetouch:
const: true
description: |
Performs AI-based retouching to improve faces or product shots. Not supported inside overlay.
See [AI Retouch](https://imagekit.io/docs/ai-transformations#retouch-e-retouch).
aiVariation:
const: true
description: |
Generates a variation of an image using AI. This produces a new image with slight variations from the original,
such as changes in color, texture, and other visual elements, while preserving the structure and essence of the original image. Not supported inside overlay.
See [AI Generate Variations](https://imagekit.io/docs/ai-transformations#generate-variations-of-an-image-e-genvar).
aiDropShadow:
oneOf:
- const: true
- type: string
description: |
Adds an AI-based drop shadow around a foreground object on a transparent or removed background.
Optionally, control the direction, elevation, and saturation of the light source (e.g., `az-45` to change light direction).
Pass `true` for the default drop shadow, or provide a string for a custom drop shadow.
Supported inside overlay.
See [AI Drop Shadow](https://imagekit.io/docs/ai-transformations#ai-drop-shadow-e-dropshadow).
aiChangeBackground:
type: string
description: |
Uses AI to change the background. Provide a text prompt or a base64-encoded prompt,
e.g., `prompt-snow road` or `prompte-[urlencoded_base64_encoded_text]`.
Not supported inside overlay.
See [AI Change Background](https://imagekit.io/docs/ai-transformations#change-background-e-changebg).
aiRemoveBackground:
const: true
description: |
Applies ImageKit's in-house background removal.
Supported inside overlay.
See [AI Background Removal](https://imagekit.io/docs/ai-transformations#imagekit-background-removal-e-bgremove).
aiRemoveBackgroundExternal:
const: true
description: |
Uses third-party background removal.
Note: It is recommended to use aiRemoveBackground, ImageKit's in-house solution, which is more cost-effective.
Supported inside overlay.
See [External Background Removal](https://imagekit.io/docs/ai-transformations#background-removal-e-removedotbg).
aiEdit:
type: string
description: |
Uses AI to edit images based on a text prompt. Provide a text prompt or a base64-encoded prompt,
e.g., `prompt-snow road` or `prompte-[urlencoded_base64_encoded_text]`.
Not supported inside overlay.
See [AI Edit](https://imagekit.io/docs/ai-transformations#edit-image-e-edit).
contrastStretch:
const: true
description: |
Automatically enhances the contrast of an image (contrast stretch).
See [Contrast Stretch](https://imagekit.io/docs/effects-and-enhancements#contrast-stretch---e-contrast).
shadow:
oneOf:
- const: true
- type: string
description: |
Adds a shadow beneath solid objects in an image with a transparent background.
For AI-based drop shadows, refer to aiDropShadow.
Pass `true` for a default shadow, or provide a string for a custom shadow.
See [Shadow](https://imagekit.io/docs/effects-and-enhancements#shadow---e-shadow).
sharpen:
oneOf:
- const: true
- type: number
description: |
Sharpens the input image, highlighting edges and finer details.
Pass `true` for default sharpening, or provide a numeric value for custom sharpening.
See [Sharpen](https://imagekit.io/docs/effects-and-enhancements#sharpen---e-sharpen).
unsharpMask:
oneOf:
- const: true
- type: string
description: |
Applies Unsharp Masking (USM), an image sharpening technique.
Pass `true` for a default unsharp mask, or provide a string for a custom unsharp mask.
See [Unsharp Mask](https://imagekit.io/docs/effects-and-enhancements#unsharp-mask---e-usm).
gradient:
oneOf:
- const: true
- type: string
description: |
Creates a linear gradient with two colors. Pass `true` for a default gradient, or provide a string for a custom gradient.
See [Gradient](https://imagekit.io/docs/effects-and-enhancements#gradient---e-gradient).
progressive:
type: boolean
description: |
Specifies whether the output JPEG image should be rendered progressively. Progressive loading begins with a low-quality,
pixelated version of the full image, which gradually improves to provide a faster perceived load time.
See [Progressive images](https://imagekit.io/docs/image-optimization#progressive-image---pr).
lossless:
type: boolean
description: |
Specifies whether the output image (in JPEG or PNG) should be compressed losslessly.
See [Lossless compression](https://imagekit.io/docs/image-optimization#lossless-webp-and-png---lo).
colorProfile:
type: boolean
description: |
Indicates whether the output image should retain the original color profile.
See [Color profile](https://imagekit.io/docs/image-optimization#color-profile---cp).
metadata:
type: boolean
description: |
By default, ImageKit removes all metadata during automatic image compression.
Set this to true to preserve metadata.
See [Image metadata](https://imagekit.io/docs/image-optimization#image-metadata---md).
opacity:
type: number
minimum: 0
maximum: 100
description: Specifies the opacity level of the output image. See [Opacity](https://imagekit.io/docs/effects-and-enhancements#opacity---o).
trim:
oneOf:
- const: true
- type: number
description: |
Useful for images with a solid or nearly solid background and a central object. This parameter trims the background,
leaving only the central object in the output image.
See [Trim edges](https://imagekit.io/docs/effects-and-enhancements#trim-edges---t).
zoom:
type: number
description: |
Accepts a numeric value that determines how much to zoom in or out of the cropped area.
It should be used in conjunction with fo-face or fo-<object_name>.
See [Zoom](https://imagekit.io/docs/image-resize-and-crop#zoom---z).
page:
oneOf:
- type: number
- type: string
description: |
Extracts a specific page or frame from multi-page or layered files (PDF, PSD, AI).
For example, specify by number (e.g., `2`), a range (e.g., `3-4` for the 2nd and 3rd layers),
or by name (e.g., `name-layer-4` for a PSD layer).
See [Thumbnail extraction](https://imagekit.io/docs/vector-and-animated-images#get-thumbnail-from-psd-pdf-ai-eps-and-animated-files).
colorReplace:
type: string
description: |
Replaces colors in the image. Supports three formats:
- `toColor` - Replace dominant color with the specified color.
- `toColor_tolerance` - Replace dominant color with specified tolerance (0-100).
- `toColor_tolerance_fromColor` - Replace a specific color with another within tolerance range.
Colors can be hex codes (e.g., `FF0022`) or names (e.g., `red`, `blue`).
See [Color replacement](https://imagekit.io/docs/effects-and-enhancements#color-replace---cr).
distort:
type: string
description: |
Distorts the shape of an image. Supports two modes:
- Perspective distortion: `p-x1_y1_x2_y2_x3_y3_x4_y4` changes the position of the four corners starting clockwise from top-left.
- Arc distortion: `a-degrees` curves the image upwards (positive values) or downwards (negative values).
See [Distort effect](https://imagekit.io/docs/effects-and-enhancements#distort---e-distort).
raw:
type: string
description: |
Pass any transformation not directly supported by the SDK.
This transformation string is appended to the URL as provided.
overlay:
$ref: "#/components/schemas/Overlay"
additionalProperties: false
Overlay:
title: Overlay
description: |
Specifies an overlay to be applied on the parent image or video.
ImageKit supports overlays including images, text, videos, subtitles, and solid colors.
See [Overlay using layers](https://imagekit.io/docs/transformations#overlay-using-layers).
discriminator:
propertyName: type
oneOf:
- $ref: "#/components/schemas/TextOverlay"
- $ref: "#/components/schemas/ImageOverlay"
- $ref: "#/components/schemas/VideoOverlay"
- $ref: "#/components/schemas/SubtitleOverlay"
- $ref: "#/components/schemas/SolidColorOverlay"
BaseOverlay:
type: object
properties:
position:
$ref: "#/components/schemas/OverlayPosition"
description: |
Specifies the overlay's position relative to the parent asset.
See [Position of Layer](https://imagekit.io/docs/transformations#position-of-layer).
timing:
$ref: "#/components/schemas/OverlayTiming"
description: |
Specifies timing information for the overlay (only applicable if the base asset is a video).
See [Position of Layer](https://imagekit.io/docs/transformations#position-of-layer).
layerMode:
type: string
enum: ["multiply", "cutter", "cutout", "displace"]
description: |
Controls how the layer blends with the base image or underlying content. Maps to `lm` in the URL.
By default, layers completely cover the base image beneath them. Layer modes change this behavior:
- `multiply`: Multiplies the pixel values of the layer with the base image. The result is always darker than the original images. This is ideal for applying shadows or color tints.
- `displace`: Uses the layer as a displacement map to distort pixels in the base image. The red channel controls horizontal displacement, and the green channel controls vertical displacement. Requires `x` or `y` parameter to control displacement magnitude.
- `cutout`: Acts as an inverse mask where opaque areas of the layer turn the base image transparent, while transparent areas leave the base image unchanged. This mode functions like a hole-punch, effectively cutting the shape of the layer out of the underlying image.
- `cutter`: Acts as a shape mask where only the parts of the base image that fall inside the opaque area of the layer are preserved. This mode functions like a cookie-cutter, trimming the base image to match the specific dimensions and shape of the layer.
See [Layer modes](https://imagekit.io/docs/add-overlays-on-images#layer-modes).
additionalProperties: false
OverlayPosition:
type: object
properties:
x:
oneOf:
- type: number
- type: string
description: |
Specifies the x-coordinate of the top-left corner of the base asset where the overlay's top-left corner will be positioned.
It also accepts arithmetic expressions such as `bw_mul_0.4` or `bw_sub_cw`.
Maps to `lx` in the URL.
Learn about [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
y:
oneOf:
- type: number
- type: string
description: |
Specifies the y-coordinate of the top-left corner of the base asset where the overlay's top-left corner will be positioned.
It also accepts arithmetic expressions such as `bh_mul_0.4` or `bh_sub_ch`.
Maps to `ly` in the URL.
Learn about [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
focus:
type: string
enum: ["center", "top", "left", "bottom", "right", "top_left", "top_right", "bottom_left", "bottom_right"]
description: |
Specifies the position of the overlay relative to the parent image or video.
Maps to `lfo` in the URL.
additionalProperties: false
OverlayTiming:
type: object
properties:
start:
oneOf:
- type: number
- type: string
description: |
Specifies the start time (in seconds) for when the overlay should appear on the base video.
Accepts a positive number up to two decimal places (e.g., `20` or `20.50`) and arithmetic expressions such as `bdu_mul_0.4` or `bdu_sub_idu`.
Applies only if the base asset is a video.
Maps to `lso` in the URL.
duration:
oneOf:
- type: number
- type: string
description: |
Specifies the duration (in seconds) during which the overlay should appear on the base video.
Accepts a positive number up to two decimal places (e.g., `20` or `20.50`) and arithmetic expressions such as `bdu_mul_0.4` or `bdu_sub_idu`.
Applies only if the base asset is a video.
Maps to `ldu` in the URL.
end:
oneOf:
- type: number
- type: string
description: |
Specifies the end time (in seconds) for when the overlay should disappear from the base video.
If both end and duration are provided, duration is ignored.
Accepts a positive number up to two decimal places (e.g., `20` or `20.50`) and arithmetic expressions such as `bdu_mul_0.4` or `bdu_sub_idu`.
Applies only if the base asset is a video.
Maps to `leo` in the URL.
additionalProperties: false
TextOverlay:
allOf:
- $ref: "#/components/schemas/BaseOverlay"
- type: object
required:
- type
- text
properties:
type:
type: string
const: "text"
text:
type: string
description: Specifies the text to be displayed in the overlay. The SDK automatically handles special characters and encoding.
encoding:
type: string
enum: ["auto", "plain", "base64"]
default: "auto"
description: |
Text can be included in the layer as either `i-{input}` (plain text) or `ie-{base64_encoded_input}` (base64).
By default, the SDK selects the appropriate format based on the input text.
To always use base64 (`ie-{base64}`), set this parameter to `base64`.
To always use plain text (`i-{input}`), set it to `plain`.
Regardless of the encoding method, the input text is always percent-encoded to ensure it is URL-safe.
transformation:
type: array
items:
$ref: "#/components/schemas/TextOverlayTransformation"
description: Control styling of the text overlay. See [Text overlays](https://imagekit.io/docs/add-overlays-on-images#text-overlay).
additionalProperties: false
ImageOverlay:
allOf:
- $ref: "#/components/schemas/BaseOverlay"
- type: object
required:
- type
- input
properties:
type:
type: string
const: "image"
input:
type: string
description: Specifies the relative path to the image used as an overlay.
encoding:
type: string
enum: ["auto", "plain", "base64"]
default: "auto"
description: |
The input path can be included in the layer as either `i-{input}` or `ie-{base64_encoded_input}`.
By default, the SDK determines the appropriate format automatically.
To always use base64 encoding (`ie-{base64}`), set this parameter to `base64`.
To always use plain text (`i-{input}`), set it to `plain`.
Regardless of the encoding method:
- Leading and trailing slashes are removed.
- Remaining slashes within the path are replaced with `@@` when using plain text.
transformation:
type: array
items:
$ref: "#/components/schemas/Transformation"
description: |
Array of transformations to be applied to the overlay image. Supported transformations depends on the base/parent asset.
See overlays on [Images](https://imagekit.io/docs/add-overlays-on-images#list-of-supported-image-transformations-in-image-layers) and [Videos](https://imagekit.io/docs/add-overlays-on-videos#list-of-transformations-supported-on-image-overlay).
additionalProperties: false
VideoOverlay:
allOf:
- $ref: "#/components/schemas/BaseOverlay"
- type: object
required:
- type
- input
properties:
type:
type: string
const: "video"
input:
type: string
description: Specifies the relative path to the video used as an overlay.
encoding:
type: string
enum: ["auto", "plain", "base64"]
default: "auto"
description: |
The input path can be included in the layer as either `i-{input}` or `ie-{base64_encoded_input}`.
By default, the SDK determines the appropriate format automatically.
To always use base64 encoding (`ie-{base64}`), set this parameter to `base64`.
To always use plain text (`i-{input}`), set it to `plain`.
Regardless of the encoding method:
- Leading and trailing slashes are removed.
- Remaining slashes within the path are replaced with `@@` when using plain text.
transformation:
type: array
items:
$ref: "#/components/schemas/Transformation"
description: |
Array of transformation to be applied to the overlay video. Except `streamingResolutions`, all other video transformations are supported.
See [Video transformations](https://imagekit.io/docs/video-transformation).
additionalProperties: false
SubtitleOverlay:
allOf:
- $ref: "#/components/schemas/BaseOverlay"
- type: object
required:
- type
- input
properties:
type:
type: string
const: "subtitle"
input:
type: string
description: Specifies the relative path to the subtitle file used as an overlay.
encoding:
type: string
enum: ["auto", "plain", "base64"]
default: "auto"
description: |
The input path can be included in the layer as either `i-{input}` or `ie-{base64_encoded_input}`.
By default, the SDK determines the appropriate format automatically.
To always use base64 encoding (`ie-{base64}`), set this parameter to `base64`.
To always use plain text (`i-{input}`), set it to `plain`.
Regardless of the encoding method:
- Leading and trailing slashes are removed.
- Remaining slashes within the path are replaced with `@@` when using plain text.
transformation:
type: array
items:
$ref: "#/components/schemas/SubtitleOverlayTransformation"
description: Control styling of the subtitle. See [Styling subtitles](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer).
additionalProperties: false
SolidColorOverlay:
allOf:
- $ref: "#/components/schemas/BaseOverlay"
- type: object
required:
- type
- color
properties:
type:
type: string
const: "solidColor"
color:
type: string
description: |
Specifies the color of the block using an RGB hex code (e.g., `FF0000`), an RGBA code (e.g., `FFAABB50`), or a color name (e.g., `red`).
If an 8-character value is provided, the last two characters represent the opacity level (from `00` for 0.00 to `99` for 0.99).
transformation:
type: array
items:
$ref: "#/components/schemas/SolidColorOverlayTransformation"
description: |
Control width and height of the solid color overlay. Supported transformations depend on the base/parent asset.
See overlays on [Images](https://imagekit.io/docs/add-overlays-on-images#apply-transformation-on-solid-color-overlay) and [Videos](https://imagekit.io/docs/add-overlays-on-videos#apply-transformations-on-solid-color-block-overlay).
additionalProperties: false
TextOverlayTransformation:
type: object
properties:
width:
oneOf:
- type: number
- type: string
description: |
Specifies the maximum width (in pixels) of the overlaid text. The text wraps automatically, and arithmetic expressions (e.g., `bw_mul_0.2` or `bh_div_2`) are supported. Useful when used in conjunction with the `background`.
Learn about [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
fontSize:
oneOf:
- type: number
- type: string
description: Specifies the font size of the overlaid text. Accepts a numeric value or an arithmetic expression.
fontFamily:
type: string
description: |
Specifies the font family of the overlaid text. Choose from the supported fonts list or use a custom font.
See [Supported fonts](https://imagekit.io/docs/add-overlays-on-images#supported-text-font-list) and [Custom font](https://imagekit.io/docs/add-overlays-on-images#change-font-family-in-text-overlay).
fontColor:
type: string
description: |
Specifies the font color of the overlaid text. Accepts an RGB hex code (e.g., `FF0000`), an RGBA code (e.g., `FFAABB50`), or a color name.
innerAlignment:
type: string
enum: ["left", "right", "center"]
default: "center"
description: |
Specifies the inner alignment of the text when width is more than the text length.
padding:
oneOf:
- type: number
- type: string
description: |
Specifies the padding around the overlaid text.
Can be provided as a single positive integer or multiple values separated by underscores (following CSS shorthand order).
Arithmetic expressions are also accepted.
alpha:
type: number
minimum: 1
maximum: 9
description: Specifies the transparency level of the text overlay. Accepts integers from `1` to `9`.
typography:
type: string
description: |
Specifies the typography style of the text.
Supported values:
- Single styles: `b` (bold), `i` (italic), `strikethrough`.
- Combinations: Any combination separated by underscores, e.g., `b_i`, `b_i_strikethrough`.
background:
type: string
description: |
Specifies the background color of the text overlay.
Accepts an RGB hex code, an RGBA code, or a color name.
radius:
anyOf:
- type: number
- const: "max"
- type: string
description: |
Specifies the corner radius:
- Single value (positive integer): Applied to all corners (e.g., `20`).
- `max`: Creates a circular or oval shape.
- Per-corner array: Provide four underscore-separated values representing top-left, top-right, bottom-right, and bottom-left corners respectively (e.g., `10_20_30_40`).
See [Radius](https://imagekit.io/docs/effects-and-enhancements#radius---r).
rotation:
oneOf:
- type: number
- type: string
description: |
Specifies the rotation angle of the text overlay.
Accepts a numeric value for clockwise rotation or a string prefixed with "N" for counter-clockwise rotation.
flip:
type: string
enum: ["h", "v", "h_v", "v_h"]
description: |
Flip/mirror the text horizontally, vertically, or in both directions.
Acceptable values: `h` (horizontal), `v` (vertical), `h_v` (horizontal and vertical), or `v_h`.
lineHeight:
oneOf:
- type: number
- type: string
description: |
Specifies the line height for multi-line text overlays. It will come into effect only if the text wraps over multiple lines.
Accepts either an integer value or an arithmetic expression.
additionalProperties: false
SubtitleOverlayTransformation:
type: object
description: Subtitle styling options. [Learn more](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer) from the docs.
properties:
background:
type: string
description: |
Specifies the subtitle background color using a standard color name, an RGB color code (e.g., FF0000), or an RGBA color code (e.g., FFAABB50).
[Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
fontSize:
type: number
description: |
Sets the font size of subtitle text.
[Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
fontFamily:
type: string
description: |
Sets the font family of subtitle text.
Refer to the [supported fonts documented](https://imagekit.io/docs/add-overlays-on-images#supported-text-font-list) in the ImageKit transformations guide.
color:
type: string
description: |
Sets the font color of the subtitle text using a standard color name, an RGB color code (e.g., FF0000), or an RGBA color code (e.g., FFAABB50).
[Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
typography:
type: string
enum: ["b", "i", "b_i"]
description: |
Sets the typography style of the subtitle text. Supports values are `b` for bold, `i` for italics, and `b_i` for bold with italics.
[Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
fontOutline:
type: string
description: |
Sets the font outline of the subtitle text.
Requires the outline width (an integer) and the outline color (as an RGB color code, RGBA color code, or standard web color name) separated by an underscore.
Example: `fol-2_blue` (outline width of 2px and outline color blue), `fol-2_A1CCDD` (outline width of 2px and outline color `#A1CCDD`) and `fol-2_A1CCDD50` (outline width of 2px and outline color `#A1CCDD` at 50% opacity).
[Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
fontShadow:
type: string
description: |
Sets the font shadow for the subtitle text.
Requires the shadow color (as an RGB color code, RGBA color code, or standard web color name) and shadow indent (an integer) separated by an underscore.
Example: `fsh-blue_2` (shadow color blue, indent of 2px), `fsh-A1CCDD_3` (shadow color `#A1CCDD`, indent of 3px), `fsh-A1CCDD50_3` (shadow color `#A1CCDD` at 50% opacity, indent of 3px).
[Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
additionalProperties: false
SolidColorOverlayTransformation:
type: object
properties:
width:
oneOf:
- type: number
- type: string
description: |
Controls the width of the solid color overlay. Accepts a numeric value or an arithmetic expression (e.g., `bw_mul_0.2` or `bh_div_2`).
Learn about [arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
height:
oneOf:
- type: number
- type: string
description: |
Controls the height of the solid color overlay. Accepts a numeric value or an arithmetic expression.
Learn about [arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
radius:
anyOf:
- type: number
- const: "max"
- type: string
description: |
Specifies the corner radius of the solid color overlay.
- Single value (positive integer): Applied to all corners (e.g., `20`).
- `max`: Creates a circular or oval shape.
- Per-corner array: Provide four underscore-separated values representing top-left, top-right, bottom-right, and bottom-left corners respectively (e.g., `10_20_30_40`).
See [Radius](https://imagekit.io/docs/effects-and-enhancements#radius---r).
alpha:
type: number
minimum: 1
maximum: 9
description: Specifies the transparency level of the overlaid solid color layer. Supports integers from `1` to `9`.
background:
type: string
description: |
Specifies the background color of the solid color overlay. Accepts an RGB hex code (e.g., `FF0000`), an RGBA code (e.g., `FFAABB50`), or a color name.
gradient:
oneOf:
- const: true
- type: string
description: |
Creates a linear gradient with two colors. Pass `true` for a default gradient, or provide a string for a custom gradient.
Only works if the base asset is an image. See [gradient](https://imagekit.io/docs/effects-and-enhancements#gradient---e-gradient).
additionalProperties: false
examples:
UploadResponseWithEmbeddedMetadata:
fileId: 6673f88237b244ef54d60180
name: test-image.jpg
size: 117079
versionInfo:
id: 6673f88237b244ef54d60180
name: Version 1
filePath: "/test-image.jpg"
url: https://ik.imagekit.io/demo/test-image.jpg
fileType: image
height: 500
width: 1000
orientation: 1
thumbnailUrl: https://ik.imagekit.io/demo/tr:n-ik_ml_thumbnail/test-image.jpg
AITags: null
metadata:
height: 500
width: 1000
size: 117079
format: jpg
hasColorProfile: false
quality: 0
density: 72
hasTransparency: false
exif:
image:
ImageDescription: The description aka caption (ref2019.1)
Orientation: 1
XResolution: 72
YResolution: 72
ResolutionUnit: 2
Artist: Creator1 (ref2019.1)
YCbCrPositioning: 1
Copyright: Copyright (Notice) 2019.1 IPTC - www.iptc.org (ref2019.1)
ExifOffset: 260
thumbnail: {}
exif:
ExifVersion: "0232"
DateTimeOriginal: 2019:10:16 19:01:03
ComponentsConfiguration: "\x01\x02\x03\0"
FlashpixVersion: "0100"
ColorSpace: 65535
ExifImageWidth: 1000
ExifImageHeight: 500
gps: {}
interoperability: {}
makernote: {}
pHash: 17949d3d3573ebca
embeddedMetadata:
Orientation: Horizontal (normal)
ExifVersion: "0232"
ImageDescription: The description aka caption (ref2019.1)
XResolution: 72
YResolution: 72
ResolutionUnit: inches
Artist: Creator1 (ref2019.1)
Copyright: Copyright (Notice) 2019.1 IPTC - www.iptc.org (ref2019.1)
DateTimeOriginal: "2019-10-16T19:01:03.000Z"
OffsetTimeOriginal: "+00:00"
ComponentsConfiguration: Y,Cb,Cr,-
FlashpixVersion: "0100"
ColorSpace: Uncalibrated
ObjectAttributeReference: A Genre (ref2019.1)
ObjectName: The Title (ref2019.1)
SubjectReference:
- IPTC:1ref2019.1
- IPTC:2ref2019.1
- IPTC:3ref2019.1
Keywords:
- Keyword1ref2019.1
- Keyword2ref2019.1
- Keyword3ref2019.1
SpecialInstructions: An Instruction (ref2019.1)
TimeCreated: 19:01:03+00:00
Byline: Creator1 (ref2019.1)
BylineTitle: Creator's Job Title (ref2019.1)
Sublocation: Sublocation (Core) (ref2019.1)
ProvinceState: Province/State(Core)(ref2019.1)
CountryPrimaryLocationCode: R19
CountryPrimaryLocationName: Country (Core) (ref2019.1)
OriginalTransmissionReference: Job Id (ref2019.1)
CopyrightNotice: Copyright (Notice) 2019.1 IPTC - www.iptc.org (ref2019.1)
CaptionAbstract: The description aka caption (ref2019.1)
WriterEditor: Description Writer (ref2019.1)
ApplicationRecordVersion: 4
CountryCode: R19
CreatorCity: "Creator's CI: City (ref2019.1)"
CreatorCountry: "Creator's CI: Country (ref2019.1)"
CreatorAddress: "Creator's CI: Address, line 1 (ref2019.1)"
CreatorPostalCode: "Creator's CI: Postcode (ref2019.1)"
CreatorRegion: "Creator's CI: State/Province (ref2019.1)"
CreatorWorkEmail: "Creator's CI: Email@1, Email@2 (ref2019.1)"
CreatorWorkTelephone: "Creator's CI: Phone # 1, Phone # 2 (ref2019.1)"
CreatorWorkURL: http://www.Creators.CI/WebAddress/ref2019.1
IntellectualGenre: A Genre (ref2019.1)
Location: Sublocation (Core) (ref2019.1)
Scene:
- IPTC-Scene-Code1 (ref2019.1)
- IPTC-Scene-Code2 (ref2019.1)
SubjectCode:
- IPTC:1ref2019.1
- IPTC:2ref2019.1
- IPTC:3ref2019.1
AboutCvTermCvId: http://example.com/cv/about/ref2019.1
AboutCvTermId: http://example.com/cv/about/ref2019.1/code987
AboutCvTermName: CV-Term Name 1 (ref2019.1)
AboutCvTermRefinedAbout: http://example.com/cv/refinements2/ref2019.1/codeX145
AdditionalModelInformation: Additional Model Info (ref2019.1)
ArtworkCircaDateCreated: "AO Circa Date: between 1550 and 1600 (ref2019.1)"
ArtworkContentDescription: AO Content Description 1 (ref2019.1)
ArtworkContributionDescription: AO Contribution Description 1 (ref2019.1)
ArtworkCopyrightNotice: AO Copyright Notice 1 (ref2019.1)
ArtworkCreator:
- AO Creator Name 1a (ref2019.1)
- AO Creator Name 1b (ref2019.1)
ArtworkCreatorID:
- AO Creator Id 1a (ref2019.1)
- AO Creator Id 1b (ref2019.1)
ArtworkCopyrightOwnerID: AO Current Copyright Owner ID 1 (ref2019.1)
ArtworkCopyrightOwnerName: AO Current Copyright Owner Name 1 (ref2019.1)
ArtworkLicensorID: AO Current Licensor ID 1 (ref2019.1)
ArtworkLicensorName: AO Current Licensor Name 1 (ref2019.1)
ArtworkDateCreated: "1919-10-16T19:01:00.000Z"
ArtworkPhysicalDescription: AO Physical Description 1 (ref2019.1)
ArtworkSource: AO Source 1 (ref2019.1)
ArtworkSourceInventoryNo: AO Source Inventory No 1 (ref2019.1)
ArtworkSourceInvURL: AO Source Inventory URL (ref2019.1)
ArtworkStylePeriod:
- AO Style Baroque (ref2019.1)
- AO Style Italian Baroque (ref2019.1)
ArtworkTitle: AO Title 1 (ref2019.1)
DigitalImageGUID: http://example.com/imageGUIDs/TestGUID12345/ref2019.1
DigitalSourceType: http://cv.iptc.org/newscodes/digitalsourcetype/softwareImage
EmbeddedEncodedRightsExpr: The Encoded Rights Expression (ref2019.1)
EmbeddedEncodedRightsExprType: IANA Media Type of ERE (ref2019.1)
EmbeddedEncodedRightsExprLangID: http://example.org/RELids/id4711/ref2019.1
Event: An Event (ref2019.1)
GenreCvId: http://example.com/cv/genre/ref2019.1
GenreCvTermId: http://example.com/cv/genre/ref2019.1/code1369
GenreCvTermName: Genre CV-Term Name 1 (ref2019.1)
GenreCvTermRefinedAbout: http://example.com/cv/genrerefinements2/ref2019.1/codeY864
ImageRegionName:
- Listener 1
- Listener 2
- Speaker 1
ImageRegionOrganisationInImageName:
- Organisation name no 1 in region persltr2 (ref2019.1)
- Organisation name no 1 in region persltr2 (ref2019.1)
- Organisation name no 1 in region persltr3 (ref2019.1)
ImageRegionPersonInImage:
- Person name no 1 in region persltr2 (ref2019.1)
- Person name no 1 in region persltr3 (ref2019.1)
- Person name no 1 in region persltr1 (ref2019.1)
ImageRegionBoundaryH:
- 0.385
ImageRegionBoundaryShape:
- rectangle
- circle
- polygon
ImageRegionBoundaryUnit:
- relative
- relative
- relative
ImageRegionBoundaryW:
- 0.127
ImageRegionBoundaryX:
- 0.31
- 0.59
ImageRegionBoundaryY:
- 0.18
- 0.426
ImageRegionCtypeName:
- Region Boundary Content Type Name (ref2019.1)
- Region Boundary Content Type Name (ref2019.1)
- Region Boundary Content Type Name (ref2019.1)
ImageRegionCtypeIdentifier:
- https://example.org/rctype/type2019.1a
- https://example.org/rctype/type2019.1b
- https://example.org/rctype/type2019.1a
- https://example.org/rctype/type2019.1b
- https://example.org/rctype/type2019.1a
- https://example.org/rctype/type2019.1b
ImageRegionID:
- persltr2
- persltr3
- persltr1
ImageRegionRoleName:
- Region Boundary Content Role Name (ref2019.1)
- Region Boundary Content Role Name (ref2019.1)
- Region Boundary Content Role Name (ref2019.1)
ImageRegionRoleIdentifier:
- https://example.org/rrole/role2019.1a
- https://example.org/rrole/role2019.1b
- https://example.org/rrole/role2019.1a
- https://example.org/rrole/role2019.1b
- https://example.org/rrole/role2019.1a
- https://example.org/rrole/role2019.1b
ImageRegionBoundaryRx:
- 0.068
ImageRegionBoundaryVerticesX:
- 0.05
- 0.148
- 0.375
ImageRegionBoundaryVerticesY:
- 0.713
- 0.041
- 0.863
LinkedEncodedRightsExpr: http://example.org/linkedrightsexpression/id986/ref2019.1
LinkedEncodedRightsExprType: IANA Media Type of ERE (ref2019.1)
LinkedEncodedRightsExprLangID: http://example.org/RELids/id4712/ref2019.1
LocationCreatedCity: City (Location created1) (ref2019.1)
LocationCreatedCountryCode: R17
LocationCreatedCountryName: CountryName (Location created1) (ref2019.1)
LocationCreatedLocationId: Location Id (Location created1) (ref2019.1)
LocationCreatedLocationName: Location Name (Location created1) (ref2019.1)
LocationCreatedProvinceState: Province/State (Location created1) (ref2019.1)
LocationCreatedSublocation: Sublocation (Location created1) (ref2019.1)
LocationCreatedWorldRegion: Worldregion (Location created1) (ref2019.1)
LocationCreatedGPSAltitude: 480 m
LocationCreatedGPSLatitude: 48,16.5N
LocationCreatedGPSLongitude: 16,20.28E
LocationShownCity:
- City (Location shown1) (ref2019.1)
- City (Location shown2) (ref2019.1)
LocationShownCountryCode:
- R17
- R17
LocationShownCountryName:
- CountryName (Location shown1) (ref2019.1)
- CountryName (Location shown2) (ref2019.1)
LocationShownLocationId:
- Location Id 1a(Location shown1) (ref2019.1)
- Location Id 1b(Location shown1) (ref2019.1)
- Location Id 2a(Location shown2) (ref2019.1)
- Location Id 2b(Location shown2) (ref2019.1)
LocationShownLocationName:
- Location Name (Location shown1) (ref2019.1)
- Location Name (Location shown2) (ref2019.1)
LocationShownProvinceState:
- Province/State (Location shown1) (ref2019.1)
- Province/State (Location shown2) (ref2019.1)
LocationShownSublocation:
- Sublocation (Location shown1) (ref2019.1)
- Sublocation (Location shown2) (ref2019.1)
LocationShownWorldRegion:
- Worldregion (Location shown1) (ref2019.1)
- Worldregion (Location shown2) (ref2019.1)
LocationShownGPSAltitude:
- 140 m
- 120 m
LocationShownGPSLatitude:
- 48,8.82N
- 47,57.12N
LocationShownGPSLongitude:
- 17,5.88E
- 16,49.8E
MaxAvailHeight: 20
MaxAvailWidth: 19
ModelAge:
- 25
- 27
- 30
OrganisationInImageCode:
- Organisation Code 1 (ref2019.1)
- Organisation Code 2 (ref2019.1)
- Organisation Code 3 (ref2019.1)
OrganisationInImageName:
- Organisation Name 1 (ref2019.1)
- Organisation Name 2 (ref2019.1)
- Organisation Name 3 (ref2019.1)
PersonInImage:
- Person Shown 1 (ref2019.1)
- Person Shown 2 (ref2019.1)
PersonInImageCvTermCvId:
- http://example.com/cv/test99/ref2019.1
PersonInImageCvTermId:
- http://example.com/cv/test99/code987/ref2019.1
PersonInImageCvTermName:
- Person Characteristic Name 1 (ref2019.1)
PersonInImageCvTermRefinedAbout:
- http://example.com/cv/refinements987/codeY765/ref2019.1
PersonInImageDescription:
- Person Description 1 (ref2019.1)
PersonInImageId:
- http://wikidata.org/item/Q123456789/ref2019.1
- http://freebase.com/m/987654321/ref2019.1
PersonInImageName:
- Person Name 1 (ref2019.1)
ProductInImageDescription:
- Product Description 1 (ref2019.1)
ProductInImageGTIN:
- 123456782019.1
ProductInImageName:
- Product Name 1 (ref2019.1)
RegistryEntryRole:
- Registry Entry Role ID 1 (ref2019.1)
- Registry Entry Role ID 2 (ref2019.1)
RegistryItemID:
- Registry Image ID 1 (ref2019.1)
- Registry Image ID 2 (ref2019.1)
RegistryOrganisationID:
- Registry Organisation ID 1 (ref2019.1)
- Registry Organisation ID 2 (ref2019.1)
Creator: Creator1 (ref2019.1)
Description: The description aka caption (ref2019.1)
Rights: Copyright (Notice) 2019.1 IPTC - www.iptc.org (ref2019.1)
Subject:
- Keyword1ref2019.1
- Keyword2ref2019.1
- Keyword3ref2019.1
Title: The Title (ref2019.1)
AuthorsPosition: Creator's Job Title (ref2019.1)
CaptionWriter: Description Writer (ref2019.1)
City: City (Core) (ref2019.1)
Country: Country (Core) (ref2019.1)
Credit: Credit Line (ref2019.1)
DateCreated: "2019-10-16T00:00:00.000Z"
Headline: The Headline (ref2019.1)
Instructions: An Instruction (ref2019.1)
Source: Source (ref2019.1)
State: Province/State(Core)(ref2019.1)
TransmissionReference: Job Id (ref2019.1)
CopyrightOwnerID:
- Copyright Owner Id 1 (ref2019.1)
- Copyright Owner Id 2 (ref2019.1)
CopyrightOwnerName:
- Copyright Owner Name 1 (ref2019.1)
- Copyright Owner Name 2 (ref2019.1)
ImageCreatorID: Image Creator Id 1 (ref2019.1)
ImageCreatorName: Image Creator Name 1 (ref2019.1)
ImageCreatorImageID: Image Creator Image ID (ref2019.1)
ImageSupplierID: Image Supplier Id (ref2019.1)
ImageSupplierName: Image Supplier Name (ref2019.1)
ImageSupplierImageID: Image Supplier Image ID (ref2019.1)
LicensorCity:
- Licensor City 1 (ref2019.1)
- Licensor City 2 (ref2019.1)
LicensorCountry:
- Licensor Country 1 (ref2019.1)
- Licensor Country 2 (ref2019.1)
LicensorEmail:
- Licensor Email 1 (ref2019.1)
- Licensor Email 2 (ref2019.1)
LicensorExtendedAddress:
- Licensor Ext Addr 1 (ref2019.1)
- Licensor Ext Addr 2 (ref2019.1)
LicensorID:
- Licensor ID 1 (ref2019.1)
- Licensor ID 2 (ref2019.1)
LicensorName:
- Licensor Name 1 (ref2019.1)
- Licensor Name 2 (ref2019.1)
LicensorPostalCode:
- Licensor Postcode 1 (ref2019.1)
- Licensor Postcode 2 (ref2019.1)
LicensorRegion:
- Licensor Region 1 (ref2019.1)
- Licensor Region 2 (ref2019.1)
LicensorStreetAddress:
- Licensor Street Addr 1 (ref2019.1)
- Licensor Street Addr 2 (ref2019.1)
LicensorTelephone1:
- Licensor Phone1 1 (ref2019.1)
- Licensor Phone1 2 (ref2019.1)
LicensorTelephone2:
- Licensor Phone2 1 (ref2019.1)
- Licensor Phone2 2 (ref2019.1)
LicensorURL:
- Licensor URL 1 (ref2019.1)
- Licensor URL 2 (ref2019.1)
ModelReleaseID:
- Model Release ID 1 (ref2019.1)
- Model Release ID 2 (ref2019.1)
PropertyReleaseID:
- Property Release ID 1 (ref2019.1)
- Property Release ID 2 (ref2019.1)
Rating: 1
UsageTerms: Rights Usage Terms (ref2019.1)
WebStatement: http://www.WebStatementOfRights.org/2019.1
DateTimeCreated: "2019-10-16T00:00:00.000Z"
Caption: The description aka caption (ref2019.1)
Writer: Description Writer (ref2019.1)
UploadResponseImage:
fileId: 6673f88237b244ef54d60180
name: test-image.jpg
size: 117079
versionInfo:
id: 6673f88237b244ef54d60180
name: Version 1
filePath: "/test-image.jpg"
url: https://ik.imagekit.io/demo/test-image.jpg
fileType: image
height: 500
width: 1000
orientation: 1
thumbnailUrl: https://ik.imagekit.io/demo/tr:n-ik_ml_thumbnail/test-image.jpg
UploadResonseVideo:
fileId: 6673f99b37b244ef54d98f11
name: test-video.mp4
size: 1378305
versionInfo:
id: 6673f99b37b244ef54d98f11
name: Version 1
filePath: "/test-video.mp4"
url: https://ik.imagekit.io/demo/test-video.mp4
height: 720
width: 720
bitRate: 1453966
duration: 7
audioCodec: aac
videoCodec: h264
fileType: non-image
metadata:
height: 720
width: 720
bitRate: 1453966
duration: 7
audioCodec: aac
videoCodec: h264
size: 1378305
ImageMetadata:
height: 68
width: 100
size: 7749
format: jpg
hasColorProfile: true
quality: 0
density: 72
hasTransparency: false
pHash: f06830ca9f1e3e90
exif:
image:
Make: Canon
Model: Canon EOS 40D
Orientation: 1
XResolution: 72
YResolution: 72
ResolutionUnit: 2
Software: GIMP 2.4.5
ModifyDate: 2008:07:31 10:38:11
YCbCrPositioning: 2
ExifOffset: 214
GPSInfo: 978
thumbnail:
Compression: 6
XResolution: 72
YResolution: 72
ResolutionUnit: 2
ThumbnailOffset: 1090
ThumbnailLength: 1378
exif:
ExposureTime: 0.00625
FNumber: 7.1
ExposureProgram: 1
ISO: 100
ExifVersion: "0221"
DateTimeOriginal: 2008:05:30 15:56:01
CreateDate: 2008:05:30 15:56:01
ShutterSpeedValue: 7.375
ApertureValue: 5.625
ExposureCompensation: 0
MeteringMode: 5
Flash: 9
FocalLength: 135
SubSecTime: "00"
SubSecTimeOriginal: "00"
SubSecTimeDigitized: "00"
FlashpixVersion: "0100"
ColorSpace: 1
ExifImageWidth: 100
ExifImageHeight: 68
InteropOffset: 948
FocalPlaneXResolution: 4438.356164383562
FocalPlaneYResolution: 4445.969125214408
FocalPlaneResolutionUnit: 2
CustomRendered: 0
ExposureMode: 1
WhiteBalance: 0
SceneCaptureType: 0
gps:
GPSVersionID:
- 2
- 2
- 0
- 0
interoperability:
InteropIndex: R98
InteropVersion: "0100"
makernote: {}
VideoMetadata:
height: 720
width: 1280
bitRate: 546524
duration: 70
audioCodec: aac
videoCodec: h264
size: 23490
securitySchemes:
basicAuth:
description: >-
Basic HTTP authentication. Allowed headers-- Authorization: Basic
<private_api_key> | Authorization: Basic <base64 hash of `private_api_key:`>
ImageKit API uses API keys to authenticate requests. You can view and manage your API keys in [the dashboard](https://imagekit.io/dashboard/developer/api-keys).
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
scheme: basic
type: http
responses:
Forbidden:
description: Forbidden.
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
- Your account cannot be authenticated.
- Your request contains expired private API key.
- Your account is disabled.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
Unauthorized:
description: Unauthorized request.
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Your request does not contain private API key.
help:
type: string
example: For support kindly contact us at support@imagekit.io.
RateLimitExceeded:
description: The request exceeded the rate limit. Contains headers indicating the limits and a message detailing the error.
headers:
X-RateLimit-Limit:
schema:
type: integer
description: The maximum number of requests that can be made to this endpoint in the interval specified by `X-RateLimit-Interval` response header.
X-RateLimit-Reset:
schema:
type: integer
description: The amount of time in milliseconds before you can make another request to this endpoint. Pause/sleep your workflow for this duration.
X-RateLimit-Interval:
schema:
type: integer
description: The duration of the interval in milliseconds for which this rate limit was exceeded.
content:
application/json:
schema:
type: object
properties:
message:
type: string
description: A description of the error, providing details about why the rate limit has been exceeded.
webhooks:
video.transformation.accepted:
post:
operationId: video-transformation-accepted
summary: Video transformation accepted
description: |
Triggered when a new video transformation request is accepted for processing. This event is primarily useful for debugging purposes and tracking the start of video transformations.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/VideoTransformationAcceptedEvent"
responses:
"200":
description: Acknowledge
video.transformation.ready:
post:
operationId: video-transformation-ready
summary: Video transformation ready
description: |
Triggered when video encoding is finished and the transformed resource is ready to be served. Listen to this webhook and update any flags in your database or CMS so your application can start displaying the transformed video to users.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/VideoTransformationReadyEvent"
responses:
"200":
description: Acknowledge
video.transformation.error:
post:
operationId: video-transformation-error
summary: Video transformation error
description: |
Triggered when a video transformation fails during processing. Listen to this webhook to log the error reason and take appropriate action. Check your origin and URL endpoint settings if the reason is related to download failure.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/VideoTransformationErrorEvent"
responses:
"200":
description: Acknowledge
upload.pre-transform.success:
post:
operationId: upload-pre-transform-success
summary: Pre-transformation success
description: |
Triggered when a pre-transformation completes successfully. Pre-transformations are applied before the file is uploaded to the Media Library, allowing you to optimize files at ingestion time.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UploadPreTransformSuccessEvent"
responses:
"200":
description: Acknowledge
upload.pre-transform.error:
post:
operationId: upload-pre-transform-error
summary: Pre-transformation error
description: |
Triggered when a pre-transformation fails. The original file upload may have been accepted, but the requested transformation could not be applied. Review the error reason to understand what went wrong.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UploadPreTransformErrorEvent"
responses:
"200":
description: Acknowledge
upload.post-transform.success:
post:
operationId: upload-post-transform-success
summary: Post-transformation success
description: |
Triggered when a post-transformation completes successfully. Post-transformations are applied after the file has been uploaded to the Media Library, generating transformed versions that are ready for immediate delivery. Each post-transformation generates a separate webhook event.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UploadPostTransformSuccessEvent"
responses:
"200":
description: Acknowledge
upload.post-transform.error:
post:
operationId: upload-post-transform-error
summary: Post-transformation error
description: |
Triggered when a post-transformation fails. The original file remains available in the Media Library, but the requested transformation could not be generated. Review the error reason to determine the cause of failure.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UploadPostTransformErrorEvent"
responses:
"200":
description: Acknowledge
security:
- basicAuth: []