> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modelslab.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Image

> This endpoint is used to delete an image using the image name.

## Request

Send a `POST` request to below endpoint and pass the name of the image you want to delete to the **image** parameter of the request body.

```curl curl theme={null}
--request POST 'https://modelslab.com/api/v3/delete_image' \
```

## Body

```json json theme={null}
{  
    "key": "your_api_key",  
    "request_id": 2398,  
    "type": "image"
}
```


## OpenAPI

````yaml POST /delete_image
openapi: 3.1.0
info:
  title: ModelsLab General API
  description: >-
    General utility endpoints for ModelsLab API including subscription
    management, content moderation, and file handling
  license:
    name: MIT
  version: 6.0.0
servers:
  - url: https://modelslab.com/api
    description: Main API server (for endpoints without version prefix)
  - url: https://modelslab.com/api/v3
    description: API v3 server
  - url: https://modelslab.com/api/v5
    description: API v5 server
  - url: https://modelslab.com/api/v6
    description: API v6 server
security: []
paths:
  /delete_image:
    post:
      summary: Delete image
      description: This endpoint is used to delete an image using the image name
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteImageRequest'
      responses:
        '200':
          description: Image deletion response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteImageResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      servers:
        - url: https://modelslab.com/api/v3
components:
  schemas:
    DeleteImageRequest:
      type: object
      required:
        - key
        - request_id
      properties:
        key:
          type: string
          description: Your API Key used for request authorization
        request_id:
          type: integer
          description: The request id gotten while uploading image
        type:
          type: string
          default: image
          enum:
            - image
            - video
            - voice
            - 3d
          description: The type of asset you want to delete. Default is image
    DeleteImageResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
        messege:
          type: string
          example: image deleted
    Error:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
          description: Error message

````