cli/resources/uploads/subresources/parts/index.md +0 −89 deleted
File Deleted View Diff
1# Parts
2
3## Add upload part
4
5`$ openai uploads:parts create`
6
7**post** `/uploads/{upload_id}/parts`
8
9Adds a [Part](https://platform.openai.com/docs/api-reference/uploads/part-object) to an [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload.
10
11Each Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB.
12
13It is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete).
14
15### Parameters
16
17- `--upload-id: string`
18
19 The ID of the Upload.
20
21- `--data: string`
22
23 The chunk of bytes for this Part.
24
25### Returns
26
27- `upload_part: object { id, created_at, object, upload_id }`
28
29 The upload Part represents a chunk of bytes we can add to an Upload object.
30
31 - `id: string`
32
33 The upload Part unique identifier, which can be referenced in API endpoints.
34
35 - `created_at: number`
36
37 The Unix timestamp (in seconds) for when the Part was created.
38
39 - `object: "upload.part"`
40
41 The object type, which is always `upload.part`.
42
43 - `upload_id: string`
44
45 The ID of the Upload object that this Part was added to.
46
47### Example
48
49```cli
50openai uploads:parts create \
51 --api-key 'My API Key' \
52 --upload-id upload_abc123 \
53 --data 'Example data'
54```
55
56#### Response
57
58```json
59{
60 "id": "id",
61 "created_at": 0,
62 "object": "upload.part",
63 "upload_id": "upload_id"
64}
65```
66
67## Domain Types
68
69### Upload Part
70
71- `upload_part: object { id, created_at, object, upload_id }`
72
73 The upload Part represents a chunk of bytes we can add to an Upload object.
74
75 - `id: string`
76
77 The upload Part unique identifier, which can be referenced in API endpoints.
78
79 - `created_at: number`
80
81 The Unix timestamp (in seconds) for when the Part was created.
82
83 - `object: "upload.part"`
84
85 The object type, which is always `upload.part`.
86
87 - `upload_id: string`
88
89 The ID of the Upload object that this Part was added to.