Delete image

March 17, 2025

Table of contents

  1. Request Headers
  2. Path parameter
  3. Responses
  4. Examples
  5. Try It

Use this endpoint to delete image generated by

This endpoint will return a response 200 if you’re trying to delete a image that does not exist or has already been deleted. It is safe to say it always succeeds.

Images are soft-deleted. While the image will no longer appear in GET images, you can still retrieve it via GET images/imageId.

https://api.useapi.net/v1/minimax/images/imageId

Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
Path parameter
  • imageId is required. Specify the imageId you want to delete.
Responses
Examples
  • curl  -X DELETE "https://api.useapi.net/v1/minimax/images/<imageId>" \
          -H "Accept: application/json" \
          -H "Authorization: Bearer …" 
    
  • const token = "API token";
    const imageId = "imageId to delete"; 
    const apiUrl = `https://api.useapi.net/v1/minimax/images/${imageId}`; 
    const response = await fetch(apiUrl, {
      method: 'DELETE',
      headers: {
        "Authorization": `Bearer ${token}`,
      },
    });
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    token = "API token"
    imageId = "imageId to delete"
    apiUrl = f"https://api.useapi.net/v1/minimax/images/{imageId}"
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {token}"
    }
    response = requests.delete(apiUrl, headers=headers)
    print(response, response.json())
    
Try It