Links
Comment on page

Remove AITags (bulk)

post
https://api.imagekit.io
/v1/files/removeAITags
Remove AITags in bulk API

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
Node.js
Python
PHP
Java
Ruby
Go
.Net
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"
]
}
'
var ImageKit = require("imagekit");
var imagekit = new ImageKit({
publicKey : "your_public_api_key",
privateKey : "your_private_api_key",
urlEndpoint : "https://ik.imagekit.io/your_imagekit_id/"
});
var fileIds = ["file_id_1", "file_id_2"];
var tags = ["ai_tag_to_remove_1", "ai_tag_to_remove_2"];
imagekit.bulkRemoveAITags(fileIds, tags, function(error, result) {
if(error) console.log(error);
else console.log(result);
});
from imagekitio import ImageKit
imagekit = ImageKit(
public_key='your_public_api_key',
private_key='your_private_api_key',
url_endpoint = 'https://ik.imagekit.io/your_imagekit_id/'
)
remove_ai_tags = imagekit.remove_ai_tags(file_ids=['file-id-1', 'file-id-2'], ai_tags=['remove-ai-tag-1', 'remove-ai-tag-2'])
print("Remove AI tags-", remove_ai_tags, end="\n\n")
# Raw Response
print(remove_ai_tags.response_metadata.raw)
# list successfully updated file ids
print(remove_ai_tags.successfully_updated_file_ids)
# print the first file's id
print(remove_ai_tags.successfully_updated_file_ids[0])
use ImageKit\ImageKit;
$public_key = "your_public_api_key";
$your_private_key = "your_private_api_key";
$url_end_point = "https://ik.imagekit.io/your_imagekit_id";
$imageKit = new ImageKit(
$public_key,
$your_private_key,
$url_end_point
);
$fileIds = [
"file_id_1",
"file_id_2"
];
$AITags = [
"ai_tag_to_remove_1",
"ai_tag_to_remove_2"
];
$bulkRemoveAITags = $imageKit->bulkRemoveAITags($fileIds, $AITags);
echo("Remove AI Tags (Bulk) : " . json_encode($bulkRemoveAITags));
List<String> fileIds = new ArrayList<>();
fileIds.add("file_id_1");
fileIds.add("file_id_2");
List<String> aiTags = new ArrayList<>();
aiTags.add("ai_tag_to_remove_1");
aiTags.add("ai_tag_to_remove_2");
AITagsRequest aiTagsRequest = new AITagsRequest();
aiTagsRequest.setFileIds(fileIds);
aiTagsRequest.setAITags(aiTags);
ResultTags resultTags = ImageKit.getInstance().removeAITags(aiTagsRequest);
imagekitio = ImageKitIo::Client.new("your_private_key", "your_public_key", "your_url_endpoint")
imagekitio.delete_bulk_ai_tags(
file_ids: [
"file_id_1",
"file_id_2"
],
ai_tags: [
"ai_tag_to_remove_1",
"ai_tag_to_remove_2"
]
)
resp, err := ik.Media.RemoveAITags(ctx, media.AITagsParam{
FileIds: []string{
"file_id_1",
"file_id_2",
},
AITags: []string{"ai_tag_to-remove_1", "ai_tag_to-remove_2"},
})
var imagekit = new ImageKit({
publicKey : "your_public_api_key",
privateKey : "your_private_api_key",
urlEndpoint : "https://ik.imagekit.io/your_imagekit_id/"
});
AITagsRequest removeAITagsRequest = new AITagsRequest
{
AITags = new List<string>
{
"tag_1",
"tag_2"
},
fileIds = new List<string>
{
"fileId_1",
},
};
ResultTags removeAITags = imagekit.RemoveAITags(removeAITagsRequest);