Skip to content
Primary navigation

Containers

List containers
containers.list(**kwargs) -> CursorPage<ContainerListResponse { id, created_at, name, 6 more } >
GET/containers
Create container
containers.create(**kwargs) -> ContainerCreateResponse { id, created_at, name, 6 more }
POST/containers
Retrieve container
containers.retrieve(container_id) -> ContainerRetrieveResponse { id, created_at, name, 6 more }
GET/containers/{container_id}
Delete a container
containers.delete(container_id) -> void
DELETE/containers/{container_id}
ModelsExpand Collapse
class ContainerListResponse { id, created_at, name, 6 more }
id: String

Unique identifier for the container.

created_at: Integer

Unix timestamp (in seconds) when the container was created.

formatunixtime
name: String

Name of the container.

object: String

The type of this object.

status: String

Status of the container (e.g., active, deleted).

expires_after: ExpiresAfter{ anchor, minutes}

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.

anchor: :last_active_at

The reference point for the expiration.

minutes: Integer

The number of minutes after the anchor before the container expires.

last_active_at: Integer

Unix timestamp (in seconds) when the container was last active.

formatunixtime
memory_limit: :"1g" | :"4g" | :"16g" | :"64g"

The memory limit configured for the container.

One of the following:
:"1g"
:"4g"
:"16g"
:"64g"
network_policy: NetworkPolicy{ type, allowed_domains}

Network access policy for the container.

type: :allowlist | :disabled

The network policy mode.

One of the following:
:allowlist
:disabled
allowed_domains: Array[String]

Allowed outbound domains when type is allowlist.

class ContainerCreateResponse { id, created_at, name, 6 more }
id: String

Unique identifier for the container.

created_at: Integer

Unix timestamp (in seconds) when the container was created.

formatunixtime
name: String

Name of the container.

object: String

The type of this object.

status: String

Status of the container (e.g., active, deleted).

expires_after: ExpiresAfter{ anchor, minutes}

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.

anchor: :last_active_at

The reference point for the expiration.

minutes: Integer

The number of minutes after the anchor before the container expires.

last_active_at: Integer

Unix timestamp (in seconds) when the container was last active.

formatunixtime
memory_limit: :"1g" | :"4g" | :"16g" | :"64g"

The memory limit configured for the container.

One of the following:
:"1g"
:"4g"
:"16g"
:"64g"
network_policy: NetworkPolicy{ type, allowed_domains}

Network access policy for the container.

type: :allowlist | :disabled

The network policy mode.

One of the following:
:allowlist
:disabled
allowed_domains: Array[String]

Allowed outbound domains when type is allowlist.

class ContainerRetrieveResponse { id, created_at, name, 6 more }
id: String

Unique identifier for the container.

created_at: Integer

Unix timestamp (in seconds) when the container was created.

formatunixtime
name: String

Name of the container.

object: String

The type of this object.

status: String

Status of the container (e.g., active, deleted).

expires_after: ExpiresAfter{ anchor, minutes}

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.

anchor: :last_active_at

The reference point for the expiration.

minutes: Integer

The number of minutes after the anchor before the container expires.

last_active_at: Integer

Unix timestamp (in seconds) when the container was last active.

formatunixtime
memory_limit: :"1g" | :"4g" | :"16g" | :"64g"

The memory limit configured for the container.

One of the following:
:"1g"
:"4g"
:"16g"
:"64g"
network_policy: NetworkPolicy{ type, allowed_domains}

Network access policy for the container.

type: :allowlist | :disabled

The network policy mode.

One of the following:
:allowlist
:disabled
allowed_domains: Array[String]

Allowed outbound domains when type is allowlist.

ContainersFiles

List container files
containers.files.list(container_id, **kwargs) -> CursorPage<FileListResponse { id, bytes, container_id, 4 more } >
GET/containers/{container_id}/files
Create container file
containers.files.create(container_id, **kwargs) -> FileCreateResponse { id, bytes, container_id, 4 more }
POST/containers/{container_id}/files
Retrieve container file
containers.files.retrieve(file_id, **kwargs) -> FileRetrieveResponse { id, bytes, container_id, 4 more }
GET/containers/{container_id}/files/{file_id}
Delete a container file
containers.files.delete(file_id, **kwargs) -> void
DELETE/containers/{container_id}/files/{file_id}
ModelsExpand Collapse
class FileListResponse { id, bytes, container_id, 4 more }
id: String

Unique identifier for the file.

bytes: Integer

Size of the file in bytes.

container_id: String

The container this file belongs to.

created_at: Integer

Unix timestamp (in seconds) when the file was created.

formatunixtime
object: :"container.file"

The type of this object (container.file).

path: String

Path of the file in the container.

source: String

Source of the file (e.g., user, assistant).

class FileCreateResponse { id, bytes, container_id, 4 more }
id: String

Unique identifier for the file.

bytes: Integer

Size of the file in bytes.

container_id: String

The container this file belongs to.

created_at: Integer

Unix timestamp (in seconds) when the file was created.

formatunixtime
object: :"container.file"

The type of this object (container.file).

path: String

Path of the file in the container.

source: String

Source of the file (e.g., user, assistant).

class FileRetrieveResponse { id, bytes, container_id, 4 more }
id: String

Unique identifier for the file.

bytes: Integer

Size of the file in bytes.

container_id: String

The container this file belongs to.

created_at: Integer

Unix timestamp (in seconds) when the file was created.

formatunixtime
object: :"container.file"

The type of this object (container.file).

path: String

Path of the file in the container.

source: String

Source of the file (e.g., user, assistant).

ContainersFilesContent

Retrieve container file content
containers.files.content.retrieve(file_id, **kwargs) -> StringIO
GET/containers/{container_id}/files/{file_id}/content