---
title: "Complete a multipart upload"
method: POST
path: "/v1/files/{file_id}/complete-upload"
tags: ["API", "File Management"]
---

# Complete a multipart upload

`POST /v1/files/{file_id}/complete-upload`

Finalize a direct upload started via `POST /v1/files/init-upload`. The file then goes through FFprobe for media metadata; `status` changes as `UPLOADED` and becomes `STORED` when analysis completes. See the [direct upload guide](https://docs.rendi.dev/direct-upload) for the full flow.

## Path parameters

- `file_id` string, required

## Request body

- CompleteUploadRequest
  - `parts` UploadPart[], required — One entry per uploaded part, in order. Every part_number from 1 to N must be present.
    - `part_number` integer, required — 1-based part number, matching the index in `upload_urls`.
    - `etag` string, required — ETag returned by R2 in the response of the part's PUT request.

## Response `200`

Upload completed; file is being ffrpobed

- RendiStoredFile — Represents a file stored by rendi. Could either be an uploaded file or a file generated by running a command. This model contains metadata about files stored in rendi storage, including file details, media information, and storage location.
  - `file_id` string, required — Unique identifier for the stored file
  - `environment_name` string, nullable — The environment this file was stored in (e.g., 'main', 'test', 'dev').
  - `storage_url` string, nullable — URL where the file is stored
  - `status` 'QUEUED' | 'DOWNLOADING' | 'DOWNLOADED' | 'UPLOADED' | 'FAILED' | 'STORED'
  - `rendi_store_type` 'INPUT' | 'OUTPUT' | 'STORED_FILE'
  - `error_status` string, nullable — Status of any error that occurred during file processing
  - `external_error_message` string, nullable — Error details if the file failed to be processed
  - `is_deleted` boolean, nullable — Whether the file has been deleted
  - `size_mbytes` number, nullable — Size of the output file or folder in megabytes
  - `file_count` integer, nullable — Number of files in the output folder/playlist
  - `size_compressed_mbytes` number, nullable — Size of the output compressed folder in megabytes
  - `is_private` boolean, nullable — Whether the file is stored privately. Private files are accessible via their `storage_url` only if you request a presigned URL by passing `presigned_ttl_seconds` on `GET /v1/files/{file_id}` (for a single file) or `GET /v1/commands/{command_id}` (for a command's output files) to receive a time-limited downloadable URL. Not available on free plans.
  - `original_file_url` string, nullable — URL of the original file (or just name in case of uploaded file)
  - `duration` number, nullable — Duration of the media file in seconds
  - `file_type` string, nullable — Type of the media file (video, audio, image, subtitles, etc.)
  - `file_format` string, nullable — Format/container of the media file
  - `width` integer, nullable — Width of the video in pixels
  - `height` integer, nullable — Height of the video in pixels
  - `codec` string, nullable — Codec used for the media file
  - `timebase` string, nullable — How time is represented in the media file
  - `pixel_format` string, nullable — How the pixel data is stored in the media file
  - `mime_type` string, nullable — MIME type of the media file
  - `frame_rate` number, nullable — Frame rate of the video in frames per second
  - `bitrate_video_kb` number, nullable — Video bitrate in kilobits per second
  - `bitrate_audio_kb` number, nullable — Audio bitrate in kilobits per second
  - `video_profile_level` string, nullable — Video profile level
  - `is_varying_frame_rate` boolean, nullable — Whether the video has a variable frame rate

## Other responses

- `400` — File is not in an upload-in-progress state, or the upload session has expired
- `401` — Invalid API key
- `404` — File not found
- `422` — Validation Error

---

[API](https://skmtc.dev/rendi/apis/ffmpeg-command-api.md) · [All operations](https://skmtc.dev/rendi/apis/ffmpeg-command-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rendi/ffmpeg-command-api/revisions/d3136dbf90f0/schema)
