Sample - OpenAI API
POST/containers

Create a container

Creates a container for the authenticated user with a specified name and optional files, expiration, skills, memory limit, and network policy. Supply name and configure file_ids, expires_after, skills, memory_limit, or network_policy when the container needs those settings. The response contains the created container and its runtime configuration.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

6 body fields

Container creation settings. name is required; all other fields configure optional files, expiration, skills, memory, and network access.

namestringrequired
Name of the container to create.
file_idsarray<string>optional
IDs of files to copy to the container.
expires_afterobjectoptional
Container expiration time in seconds relative to the 'anchor' time.
skillsarray<object>optional
An optional list of skills referenced by id or inline data.
memory_limitstringoptional
Optional memory limit for the container. Defaults to "1g".
Allowed:1g4g16g64g
network_policyobjectoptional
Network access policy for the container.

2 status codes
200Returns the created container object, including its identifier, name, timestamps, status, expiration settings, memory limit, and network policy.
idstringrequired
Unique identifier for the container.
objectstringrequired
The type of this object.
namestringrequired
Name of the container.
created_atintegerrequired
Unix timestamp (in seconds) when the container was created.
statusstringrequired
Status of the container (e.g., active, deleted).
last_active_atintegeroptional
Unix timestamp (in seconds) when the container was last active.
expires_afterobjectoptional
The container will expire after this time period. The anchor is the reference point for the expiration. The minutes is the number of minutes after the anchor before the container expires.
memory_limitstringoptional
The memory limit configured for the container.
Allowed:1g4g16g64g
network_policyobjectoptional
Network access policy for the container.
429Returned when the request rate exceeds the permitted limit.
errorobjectrequired

Error handling

name is required. If supplied, expires_after.anchor must be last_active_at, memory_limit must be one of 1g, 4g, 16g, or 64g, and each skill definition must satisfy one of the supported skill shapes. A 429 is returned when the request rate exceeds the permitted limit.