> ## Documentation Index
> Fetch the complete documentation index at: https://api-tools.memories.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Videos

> Permanently delete one or more videos from your Private Video Library.

<Info>
  **Product**: Visual Search
  **Use case**: Upload videos and images, auto-index them, then search by natural language, image, or transcript phrase
  **Host**: `https://api.memories.ai/serve/api/v1`
  **Auth**: `Authorization: sk-mavi-...` (no `Bearer` prefix)
</Info>

Permanently delete one or more videos from your Private Video Library. Deleted videos cannot be recovered.

## Prerequisites

* You have [created a memories.ai API key](/visual-search/create-your-key).

## Endpoint

POST /serve/api/v1/delete\_videos

Rate limit: Maximum 100 videos per request.

## Request Example

```python theme={null}
import requests

headers = {"Authorization": "sk-mavi-..."} 
# List of video IDs to delete
data = ["VI1234567890", "VI0987654321"]

response = requests.post( 
    "https://api.memories.ai/serve/api/v1/delete_videos", 
    headers=headers, 
    json=data
)
print(response.json())
```

## Request Body

Array of video IDs (strings) — sent as a raw JSON array.

```json theme={null}
["VI1234567890", "VI0987654321"]
```

## Request Parameters

<ParamField body="[video_no]" type="string[]" required>
  Array of video identifiers to delete. Maximum **100** per request.
</ParamField>

## Response Example

Status code 200

```json theme={null}
{
    "code": "0000",
    "msg": "success",
    "data": null,
    "success": true,
    "failed": false
}
```

<Warning>
  Delete now **validates ownership** and is **all-or-nothing**. If the array contains any `video_no` that does not exist or does not belong to your account, the **entire request is rejected and nothing is deleted** — the response lists the offending video numbers. Only proceed with video numbers returned by your own [List Videos](/visual-search/list-videos).
</Warning>

## Error Responses

```json theme={null}
// Empty array
{"code":"0001","msg":"The video number list cannot be empty!","data":null,"success":false,"failed":true}

// More than 100 IDs in the array
{"code":"0001","msg":"The number of videos to delete cannot exceed 100!","data":null,"success":false,"failed":true}

// One or more video_no not owned by / unknown to the account (nothing is deleted)
{"code":"0001","msg":"The following videos do not exist or do not belong to the current account: [VI...]","data":null,"success":false,"failed":true}
```

## Response Fields

<ResponseField name="code" type="string">
  Business status code. `"0000"` indicates every supplied `video_no` was owned by your account and deleted. If any id is unknown or not owned, the request fails (non-`0000`) and nothing is deleted.
</ResponseField>

<ResponseField name="msg" type="string">
  Human-readable status message. `"success"` on success; for failures see the Error Responses section above.
</ResponseField>

<ResponseField name="data" type="null">
  Always `null` on this endpoint — there is no per-video result array.
</ResponseField>

<ResponseField name="success" type="boolean">
  `true` when all supplied videos passed the ownership check and were deleted; `false` if the request was rejected (see the ownership warning above).
</ResponseField>

<ResponseField name="failed" type="boolean">
  Inverse of `success`.
</ResponseField>


## OpenAPI

````yaml POST /serve/api/v1/delete_videos
openapi: 3.1.0
info:
  title: Memories Platform API (Docs Mapping)
  version: v1
  description: OpenAPI mapping used by Mintlify Try it for the platform docs.
servers:
  - url: https://api.memories.ai
security:
  - ApiKeyAuth: []
paths:
  /serve/api/v1/delete_videos:
    post:
      summary: Delete Videos
      operationId: delete_videos
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteVideosRequest'
            example:
              - VI1234567890
              - VI0987654321
      responses:
        '200':
          $ref: '#/components/responses/SuccessJson'
components:
  schemas:
    DeleteVideosRequest:
      type: array
      items:
        type: string
      description: Raw JSON array of video IDs to delete.
    GenericJsonResponse:
      type: object
      properties:
        code:
          type:
            - string
            - integer
          example: '0000'
        msg:
          type: string
          example: success
        data:
          oneOf:
            - type: object
              additionalProperties: true
            - type: array
              items:
                type: object
                additionalProperties: true
            - type: string
            - type: 'null'
        success:
          type: boolean
          example: true
        failed:
          type: boolean
          example: false
      additionalProperties: true
  responses:
    SuccessJson:
      description: Successful response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GenericJsonResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````