Skip to content
Primary navigation

Containers

List containers
containers.list(ContainerListParams**kwargs) -> SyncCursorPage[ContainerListResponse]
GET/containers
Create container
containers.create(ContainerCreateParams**kwargs) -> ContainerCreateResponse
POST/containers
Retrieve container
containers.retrieve(strcontainer_id) -> ContainerRetrieveResponse
GET/containers/{container_id}
Delete a container
containers.delete(strcontainer_id)
DELETE/containers/{container_id}
ModelsExpand Collapse
class ContainerListResponse:
id: str

Unique identifier for the container.

created_at: int

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

name: str

Name of the container.

object: str

The type of this object.

status: str

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

expires_after: Optional[ExpiresAfter]

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: Optional[Literal["last_active_at"]]

The reference point for the expiration.

minutes: Optional[int]

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

last_active_at: Optional[int]

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

memory_limit: Optional[Literal["1g", "4g", "16g", "64g"]]

The memory limit configured for the container.

One of the following:
"1g"
"4g"
"16g"
"64g"
network_policy: Optional[NetworkPolicy]

Network access policy for the container.

type: Literal["allowlist", "disabled"]

The network policy mode.

One of the following:
"allowlist"
"disabled"
allowed_domains: Optional[List[str]]

Allowed outbound domains when type is allowlist.

class ContainerCreateResponse:
id: str

Unique identifier for the container.

created_at: int

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

name: str

Name of the container.

object: str

The type of this object.

status: str

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

expires_after: Optional[ExpiresAfter]

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: Optional[Literal["last_active_at"]]

The reference point for the expiration.

minutes: Optional[int]

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

last_active_at: Optional[int]

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

memory_limit: Optional[Literal["1g", "4g", "16g", "64g"]]

The memory limit configured for the container.

One of the following:
"1g"
"4g"
"16g"
"64g"
network_policy: Optional[NetworkPolicy]

Network access policy for the container.

type: Literal["allowlist", "disabled"]

The network policy mode.

One of the following:
"allowlist"
"disabled"
allowed_domains: Optional[List[str]]

Allowed outbound domains when type is allowlist.

class ContainerRetrieveResponse:
id: str

Unique identifier for the container.

created_at: int

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

name: str

Name of the container.

object: str

The type of this object.

status: str

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

expires_after: Optional[ExpiresAfter]

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: Optional[Literal["last_active_at"]]

The reference point for the expiration.

minutes: Optional[int]

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

last_active_at: Optional[int]

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

memory_limit: Optional[Literal["1g", "4g", "16g", "64g"]]

The memory limit configured for the container.

One of the following:
"1g"
"4g"
"16g"
"64g"
network_policy: Optional[NetworkPolicy]

Network access policy for the container.

type: Literal["allowlist", "disabled"]

The network policy mode.

One of the following:
"allowlist"
"disabled"
allowed_domains: Optional[List[str]]

Allowed outbound domains when type is allowlist.

ContainersFiles

List container files
containers.files.list(strcontainer_id, FileListParams**kwargs) -> SyncCursorPage[FileListResponse]
GET/containers/{container_id}/files
Create container file
containers.files.create(strcontainer_id, FileCreateParams**kwargs) -> FileCreateResponse
POST/containers/{container_id}/files
Retrieve container file
containers.files.retrieve(strfile_id, FileRetrieveParams**kwargs) -> FileRetrieveResponse
GET/containers/{container_id}/files/{file_id}
Delete a container file
containers.files.delete(strfile_id, FileDeleteParams**kwargs)
DELETE/containers/{container_id}/files/{file_id}
ModelsExpand Collapse
class FileListResponse:
id: str

Unique identifier for the file.

bytes: int

Size of the file in bytes.

container_id: str

The container this file belongs to.

created_at: int

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

object: Literal["container.file"]

The type of this object (container.file).

path: str

Path of the file in the container.

source: str

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

class FileCreateResponse:
id: str

Unique identifier for the file.

bytes: int

Size of the file in bytes.

container_id: str

The container this file belongs to.

created_at: int

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

object: Literal["container.file"]

The type of this object (container.file).

path: str

Path of the file in the container.

source: str

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

class FileRetrieveResponse:
id: str

Unique identifier for the file.

bytes: int

Size of the file in bytes.

container_id: str

The container this file belongs to.

created_at: int

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

object: Literal["container.file"]

The type of this object (container.file).

path: str

Path of the file in the container.

source: str

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

ContainersFilesContent

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