POST/containers

Create a container

Creates a container with the specified name and optional configuration. Use file_ids to copy files into the container and configure expiration, memory, network access, or skills as needed. The memory limit defaults to 1g when omitted.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

6 body fields

Container name and optional file, expiration, skill, memory, and network configuration.

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.

3 status codes
200Returns the created container object, including its identifier, name, creation time, status, and configured expiration, 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.
400Returned when the container configuration or a supplied skill is invalid.
errorobjectrequired
429Returned when the request exceeds a rate limit.
errorobjectrequired

Error handling

A 400 is returned when the container configuration or a supplied skill is invalid; a 429 is returned when the request exceeds a rate limit. name is required, expires_after.anchor must be last_active_at, and memory_limit must be one of 1g, 4g, 16g, or 64g.