Completes the [Upload](/docs/api-reference/uploads/object). Within the returned Upload object, there is a nested [File](/docs/api-reference/files/object) 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.
POST
/uploads/{upload_id}/complete https://api.openai.com/v1
Parameters
path Path Parameters
| Name | Type |
|---|---|
upload_id
required
The ID of the Upload. | string |
Request Body
application/json
required
interface CompleteUploadRequest {
part_ids: string[];
md5?: string;
}
part_ids: string[];
md5?: string;
}
Responses
200 application/json
OK
interface Upload {
id: string;
created_at: number;
filename: string;
bytes: number;
purpose: string;
status: "pending" | "completed" | "cancelled" | "expired";
expires_at: number;
object?: "upload";
file?:OpenAIFile & null;
}
id: string;
created_at: number;
filename: string;
bytes: number;
purpose: string;
status: "pending" | "completed" | "cancelled" | "expired";
expires_at: number;
object?: "upload";
file?:
}