Search + K

Command Palette

Search for a command to run...

Sign In

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
Copy endpoint
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;
}

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

The File object represents a document that has been uploaded to OpenAI.

interface OpenAIFile {
id: string;
bytes: number;
created_at: number;
expires_at?: number;
filename: string;
object: "file";
purpose: "assistants" | "assistants_output" | "batch" | "batch_output" | "fine-tune" | "fine-tune-results" | "vision";
status: "uploaded" | "processed" | "error";
status_details?: string;
}
& null
;
}