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

# Abort a Multipart Upload

> Cancel a direct upload started via `POST /v1/files/init-upload`. Discards any parts already uploaded to storage and marks the file as failed. See the [direct upload guide](https://docs.rendi.dev/direct-upload) for the full flow.

<Note>
  Cancels an in-progress upload started via [`init-upload`](/api-reference/endpoint/init-upload). Any parts already uploaded are discarded. See the [direct upload guide](/direct-upload) for the full flow.

  Abandoned uploads that are never completed or aborted are cleaned up automatically after 7 days.
</Note>


## OpenAPI

````yaml POST /v1/files/{file_id}/abort-upload
openapi: 3.1.0
info:
  title: FFmpeg Command API
  description: API for running FFmpeg in a cloud environment
  version: 1.0.0
servers:
  - url: https://api.rendi.dev
    description: Rendi - FFmpeg API
security: []
paths:
  /v1/files/{file_id}/abort-upload:
    post:
      tags:
        - API
        - File Management
      summary: Abort a multipart upload
      description: >-
        Cancel a direct upload started via `POST /v1/files/init-upload`.
        Discards any parts already uploaded to storage and marks the file as
        failed. See the [direct upload
        guide](https://docs.rendi.dev/direct-upload) for the full flow.
      operationId: abort_upload_v1_files__file_id__abort_upload_post
      parameters:
        - name: file_id
          in: path
          required: true
          schema:
            type: string
            title: File Id
      responses:
        '200':
          description: Upload aborted
          content:
            application/json:
              schema:
                type: object
                title: Response Abort Upload V1 Files  File Id  Abort Upload Post
        '400':
          description: File is not in an upload-in-progress state
        '401':
          description: Invalid API key
          content:
            application/json:
              example:
                detail: Invalid authorization key
        '404':
          description: File not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-KEY

````