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

# 文件删除

> 使用本接口，删除 MiniMax 开放平台上的相关文件。



## OpenAPI

````yaml /api-reference/file/management/api/openapi.json POST /v1/files/delete
openapi: 3.1.0
info:
  title: MiniMax File Management API
  description: >-
    MiniMax file management API for uploading, retrieving, listing, and deleting
    files
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.minimaxi.com
security:
  - bearerAuth: []
paths:
  /v1/files/delete:
    post:
      tags:
        - Files
      summary: Delete File
      operationId: deleteFile
      parameters:
        - name: Content-Type
          in: header
          required: true
          description: '请求体的媒介类型 `multipart/form-data` '
          schema:
            type: string
            enum:
              - multipart/form-data
            default: multipart/form-datan
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteFileReq'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteFileResp'
components:
  schemas:
    DeleteFileReq:
      type: object
      required:
        - file_id
        - purpose
      properties:
        file_id:
          type: integer
          format: int64
          description: 文件的唯一标识符
        purpose:
          type: string
          description: |-
            文件使用目的。取值及支持格式如下：
            1. voice_clone
            2. prompt_audio
            3. t2a_async
            4. t2a_async_input
            5. video_generation
          enum:
            - voice_clone
            - prompt_audio
            - t2a_async
            - t2a_async_input
            - video_generation
      example:
        file_id: ${file_id}
        purpose: t2a_async_input
    DeleteFileResp:
      type: object
      properties:
        file_id:
          type: integer
          format: int64
          description: The unique identifier for the file.
        base_resp:
          $ref: '#/components/schemas/ListRetrieveDeleteFileBaseResp'
      example:
        file_id: ${file_id}
        base_resp:
          status_code: 0
          status_msg: success
    ListRetrieveDeleteFileBaseResp:
      type: object
      properties:
        status_code:
          type: integer
          description: |-
            状态码如下：
            - 1000, 未知错误
            - 1001, 超时
            - 1002, 触发RPM限流
            - 1004, 鉴权失败
            - 1008, 余额不足
            - 1013, 服务内部错误
            - 1026, 输入内容错误
            - 1027, 输出内容错误
            - 1039, 触发TPM限流
            - 2013, 输入格式信息不正常

            更多内容可查看[错误码查询列表](/api-reference/errorcode)了解详情
        status_msg:
          type: string
          description: 状态详情
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |-
        `HTTP: Bearer Auth`
         - Security Scheme Type: http
         - HTTP Authorization Scheme: Bearer API_key，用于验证账户信息，可在 [账户管理>接口密钥](https://platform.minimaxi.com/user-center/basic-information/interface-key) 中查看。

````