Adds a [Part](/docs/api-reference/uploads/part-object) to an [Upload](/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload. Each Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB. It is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](/docs/api-reference/uploads/complete).

POST /uploads/{upload_id}/parts

Path parameters

  • upload_id string Required

    The ID of the Upload.

multipart/form-data

Body Required

  • data string(binary) Required

    The chunk of bytes for this Part.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • id string Required

      The upload Part unique identifier, which can be referenced in API endpoints.

    • created_at integer Required

      The Unix timestamp (in seconds) for when the Part was created.

    • upload_id string Required

      The ID of the Upload object that this Part was added to.

    • object string Required

      The object type, which is always upload.part.

      Value is upload.part.

POST /uploads/{upload_id}/parts
curl \
 --request POST 'https://api.openai.com/v1/uploads/upload_abc123/parts' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: multipart/form-data" \
 --form "data=@file"
Response examples (200)
{
  "id": "string",
  "created_at": 42,
  "upload_id": "string",
  "object": "upload.part"
}