Skip to content

Commit

Permalink
Merge pull request #291 from openai/dev/willhang/add-path-params-to-u…
Browse files Browse the repository at this point in the history
…ploads

Adds path params to Uploads
  • Loading branch information
will-hang authored Jul 17, 2024
2 parents 3f58858 + 032c410 commit 3cf233a
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1729,7 +1729,7 @@ paths:
tags:
- Uploads
summary: |
Creates an intermediate [Upload](/docs/api-reference/uploads/object) object that you can add [Parts](/docs/api-reference/uploads/part-object) to. Currently, an Upload can accept at most 10 GB in total and expires after an hour after you create it.
Creates an intermediate [Upload](/docs/api-reference/uploads/object) object that you can add [Parts](/docs/api-reference/uploads/part-object) to. Currently, an Upload can accept at most 8 GB in total and expires after an hour after you create it.

Once you complete the Upload, we will create a [File](/docs/api-reference/files/object) object that contains all the parts you uploaded. This File is usable in the rest of our platform as a regular File object.

Expand Down Expand Up @@ -1785,9 +1785,18 @@ paths:
summary: |
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 10 GB.
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).
parameters:
- in: path
name: upload_id
required: true
schema:
type: string
example: upload_abc123
description: |
The ID of the Upload.
requestBody:
required: true
content:
Expand Down Expand Up @@ -1829,6 +1838,15 @@ paths:
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.
parameters:
- in: path
name: upload_id
required: true
schema:
type: string
example: upload_abc123
description: |
The ID of the Upload.
requestBody:
required: true
content:
Expand Down Expand Up @@ -1880,6 +1898,15 @@ paths:
- Uploads
summary: |
Cancels the Upload. No Parts may be added after an Upload is cancelled.
parameters:
- in: path
name: upload_id
required: true
schema:
type: string
example: upload_abc123
description: |
The ID of the Upload.
responses:
"200":
description: OK
Expand Down

0 comments on commit 3cf233a

Please sign in to comment.