cli/resources/containers/methods/create/index.md +0 −137 deleted
File Deleted View Diff
1## Create container
2
3`$ openai containers create`
4
5**post** `/containers`
6
7Create Container
8
9### Parameters
10
11- `--name: string`
12
13 Name of the container to create.
14
15- `--expires-after: optional object { anchor, minutes }`
16
17 Container expiration time in seconds relative to the 'anchor' time.
18
19- `--file-id: optional array of string`
20
21 IDs of files to copy to the container.
22
23- `--memory-limit: optional "1g" or "4g" or "16g" or "64g"`
24
25 Optional memory limit for the container. Defaults to "1g".
26
27- `--network-policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`
28
29 Network access policy for the container.
30
31- `--skill: optional array of SkillReference or InlineSkill`
32
33 An optional list of skills referenced by id or inline data.
34
35### Returns
36
37- `ContainerNewResponse: object { id, created_at, name, 6 more }`
38
39 - `id: string`
40
41 Unique identifier for the container.
42
43 - `created_at: number`
44
45 Unix timestamp (in seconds) when the container was created.
46
47 - `name: string`
48
49 Name of the container.
50
51 - `object: string`
52
53 The type of this object.
54
55 - `status: string`
56
57 Status of the container (e.g., active, deleted).
58
59 - `expires_after: optional object { anchor, minutes }`
60
61 The container will expire after this time period.
62 The anchor is the reference point for the expiration.
63 The minutes is the number of minutes after the anchor before the container expires.
64
65 - `anchor: optional "last_active_at"`
66
67 The reference point for the expiration.
68
69 - `"last_active_at"`
70
71 - `minutes: optional number`
72
73 The number of minutes after the anchor before the container expires.
74
75 - `last_active_at: optional number`
76
77 Unix timestamp (in seconds) when the container was last active.
78
79 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`
80
81 The memory limit configured for the container.
82
83 - `"1g"`
84
85 - `"4g"`
86
87 - `"16g"`
88
89 - `"64g"`
90
91 - `network_policy: optional object { type, allowed_domains }`
92
93 Network access policy for the container.
94
95 - `type: "allowlist" or "disabled"`
96
97 The network policy mode.
98
99 - `"allowlist"`
100
101 - `"disabled"`
102
103 - `allowed_domains: optional array of string`
104
105 Allowed outbound domains when `type` is `allowlist`.
106
107### Example
108
109```cli
110openai containers create \
111 --api-key 'My API Key' \
112 --name name
113```
114
115#### Response
116
117```json
118{
119 "id": "id",
120 "created_at": 0,
121 "name": "name",
122 "object": "object",
123 "status": "status",
124 "expires_after": {
125 "anchor": "last_active_at",
126 "minutes": 0
127 },
128 "last_active_at": 0,
129 "memory_limit": "1g",
130 "network_policy": {
131 "type": "allowlist",
132 "allowed_domains": [
133 "string"
134 ]
135 }
136}
137```