Create container
POST/containers
Create Container
Body ParametersJSON
name: string
Name of the container to create.
file_ids: optional array of string
IDs of files to copy to the container.
Returns
id: string
Unique identifier for the container.
created_at: number
Unix timestamp (in seconds) when the container was created.
name: string
Name of the container.
object: string
The type of this object.
status: string
Status of the container (e.g., active, deleted).
last_active_at: optional number
Unix timestamp (in seconds) when the container was last active.
Create container
curl https://api.openai.com/v1/containers \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "My Container",
"memory_limit": "4g",
"skills": [
{
"type": "skill_reference",
"skill_id": "skill_4db6f1a2c9e73508b41f9da06e2c7b5f"
},
{
"type": "skill_reference",
"skill_id": "openai-spreadsheets",
"version": "latest"
}
],
"network_policy": {
"type": "allowlist",
"allowed_domains": ["api.buildkite.com"]
}
}'
{
"id": "cntr_682e30645a488191b6363a0cbefc0f0a025ec61b66250591",
"object": "container",
"created_at": 1747857508,
"status": "running",
"expires_after": {
"anchor": "last_active_at",
"minutes": 20
},
"last_active_at": 1747857508,
"network_policy": {
"type": "allowlist",
"allowed_domains": ["api.buildkite.com"]
},
"memory_limit": "4g",
"name": "My Container"
}
Returns Examples
{
"id": "cntr_682e30645a488191b6363a0cbefc0f0a025ec61b66250591",
"object": "container",
"created_at": 1747857508,
"status": "running",
"expires_after": {
"anchor": "last_active_at",
"minutes": 20
},
"last_active_at": 1747857508,
"network_policy": {
"type": "allowlist",
"allowed_domains": ["api.buildkite.com"]
},
"memory_limit": "4g",
"name": "My Container"
}