---
title: "Complete upload"
method: POST
path: "/uploads/{upload_id}/complete"
tags: ["Uploads"]
---

# Complete upload

`POST /uploads/{upload_id}/complete`

Completes the [Upload](https://developers.openai.com/api/reference/resources/uploads).

Within the returned Upload object, there is a nested [File](https://developers.openai.com/api/reference/resources/files) object that is ready to use in the rest of the platform.

You can specify the order of the Parts by passing in an ordered list of the Part IDs.

The number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed.
Returns the Upload object with status `completed`, including an additional `file` property containing the created usable File object.

## Path parameters

- `upload_id` string, required

## Request body

- CompleteUploadRequest
  - `part_ids` string[], required — The ordered list of Part IDs.
  - `md5` string — The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect.

## Response `200`

OK

- Upload — The Upload object can accept byte chunks in the form of Parts.
  - `id` string, required — The Upload unique identifier, which can be referenced in API endpoints.
  - `created_at` integer, required — The Unix timestamp (in seconds) for when the Upload was created.
  - `filename` string, required — The name of the file to be uploaded.
  - `bytes` integer, required — The intended number of bytes to be uploaded.
  - `purpose` string, required — The intended purpose of the file. [Please refer here](https://developers.openai.com/api/reference/resources/files#%28resource%29%20files%20%3E%20%28model%29%20file_object%20%3E%20%28schema%29%20%3E%20%28property%29%20purpose) for acceptable values.
  - `status` 'pending' | 'completed' | 'cancelled' | 'expired', required — The status of the Upload.
  - `expires_at` integer, required — The Unix timestamp (in seconds) for when the Upload will expire.
  - `object` 'upload' — The object type, which is always "upload".
  - `file` object, nullable — The ready File object after the Upload is completed.
    - `id` string, required — The file identifier, which can be referenced in the API endpoints.
    - `bytes` integer, required — The size of the file, in bytes.
    - `created_at` integer, required — The Unix timestamp (in seconds) for when the file was created.
    - `expires_at` integer — The Unix timestamp (in seconds) for when the file will expire.
    - `filename` string, required — The name of the file.
    - `object` 'file', required — The object type, which is always `file`.
    - `purpose` 'assistants' | 'assistants_output' | 'batch' | 'batch_output' | 'fine-tune' | 'fine-tune-results' | 'vision' | 'user_data', required — The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results`, `vision`, and `user_data`.
    - `status` 'uploaded' | 'processed' | 'error', required — Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.
    - `status_details` string — Deprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`.

## Other responses

- `400` — The upload cannot be completed in its current state, the parts are invalid, or the uploaded size does not match the specified size.
- `404` — The upload was not found.
- `410` — The upload has expired. Create a new upload before adding parts or completing it.
- `429` — Too many upload requests. Reduce the request rate and try again later.
- `500` — The upload could not be completed. Retry the same request, preserving the part order and MD5 value.

## Changes

- **2026-09-25** `cda988e2e364` — 5 info
  - added the non-success response with the status `400`
  - added the non-success response with the status `404`
  - added the non-success response with the status `410`
  - added the non-success response with the status `429`
  - …1 more
- **2026-05-13** `74cbcf73838f` — 1 warning
  - added the new `user_data` enum value to the `file/allOf[subschema #1: OpenAIFile]/purpose` response property for the response status `200`
- **2025-03-11** `6ab43fe7798e` — 1 info
  - added the optional property `file/allOf[subschema #1: OpenAIFile]/expires_at` to the response with the `200` status
- **2025-01-31** `fc164a27fdb9` — 7 breaking, 1 warning, 1 info
  - removed the required property `file/bytes` from the response with the `200` status
  - removed the required property `file/created_at` from the response with the `200` status
  - removed the required property `file/filename` from the response with the `200` status
  - removed the required property `file/id` from the response with the `200` status
  - …5 more
- …earlier changes not shown

[Full history](https://skmtc.dev/openai/apis/openapi/changes/uploads/:upload_id/complete/post.md)

---

[API](https://skmtc.dev/openai/apis/openapi.md) · [All operations](https://skmtc.dev/openai/apis/openapi/llms.txt) · [OpenAPI document](https://skmtc.dev/openai/apis/openapi/revisions/4b75527da17b?raw)
