Skip to Content
Delete Images

Delete Images

Send a DELETE request to this endpoint to delete up to 50 generated images and their files at once.

You will need to authenticate to use this API. See authentication.

This action is irreversible. Once an image is deleted, it cannot be recovered.

Request

DELETE https://api.ojo.so/v1/image

Request Body

ParameterTypeDescription
imageIdsarrayThe ids of the images to delete, 1 to 50

To delete one image, see Delete Image.

curl --request DELETE \ --url https://api.ojo.so/v1/image \ --header 'Authorization: Bearer <your API key>' \ --header 'Content-Type: application/json' \ --data '{"imageIds": ["<Image ID>", "<Image ID>"]}'

Response

At least one image was deleted. failed names the rest, each with its reason.

{ "successful": ["image-id-1"], "failed": [ { "imageId": "image-id-2", "reason": "Image not found or already deleted" } ], "totalProcessed": 2, "successCount": 1, "failureCount": 1 }