Remove AITags (bulk)

Remove AITags in bulk API

POST https://api.imagekit.io/v1/files/removeAITags

Remove AITags from multiple files in a single request.

Headers

NameTypeDescription

Authorization

string

base64 encoding of your_private_api_key:

Note the colon in the end.

Request Body

NameTypeDescription

fileIds

array

Each value should be a unique fileId of the uploaded file. fileId is returned in the list files API and upload API. AITags can only be removed from the current version of the file.

AITags

array

An array of AITags to remove from these files.

{
    "successfullyUpdatedFileIds": [
        "5e21880d5efe355febd4bccd",
        "5e1c13c1c55ec3437c451403",
        "5f4abf6fae77ae7f0acda3d1", 
        "5f207bd1bd2741182ceadd55"
    ]
}

Response structure and status code

In case of an error, you will get an error code along with the error message. On success, you will receive a 200 status code with an array of successfully updated fileIds.

Examples

Here is an example request to understand the API usage.

curl -X POST "https://api.imagekit.io/v1/files/removeAITags" \
-H 'Content-Type: application/json' \
-u your_private_key: -d '
{
	"fileIds" : [
		"file_id_1",
		"file_id_2"
	],
	"AITags" : [
		"ai_tag_to_remove_1", 
		"ai_tag_to_remove_2"
	]
}
'

Last updated