Skip to content
Primary navigation

Containers

List containers
client.containers.list(ContainerListParams { after, limit, name, order } query?, RequestOptionsoptions?): CursorPage<ContainerListResponse { id, created_at, name, 6 more } >
GET/containers
Create container
client.containers.create(ContainerCreateParams { name, expires_after, file_ids, 3 more } body, RequestOptionsoptions?): ContainerCreateResponse { id, created_at, name, 6 more }
POST/containers
Retrieve container
client.containers.retrieve(stringcontainerID, RequestOptionsoptions?): ContainerRetrieveResponse { id, created_at, name, 6 more }
GET/containers/{container_id}
Delete a container
client.containers.delete(stringcontainerID, RequestOptionsoptions?): void
DELETE/containers/{container_id}
ModelsExpand Collapse
ContainerListResponse { id, created_at, name, 6 more }
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).

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?: number

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

last_active_at?: number

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

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.

ContainerCreateResponse { id, created_at, name, 6 more }
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).

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?: number

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

last_active_at?: number

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

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.

ContainerRetrieveResponse { id, created_at, name, 6 more }
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).

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?: number

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

last_active_at?: number

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

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
client.containers.files.list(stringcontainerID, FileListParams { after, limit, order } query?, RequestOptionsoptions?): CursorPage<FileListResponse { id, bytes, container_id, 4 more } >
GET/containers/{container_id}/files
Create container file
client.containers.files.create(stringcontainerID, FileCreateParams { file, file_id } body, RequestOptionsoptions?): FileCreateResponse { id, bytes, container_id, 4 more }
POST/containers/{container_id}/files
Retrieve container file
client.containers.files.retrieve(stringfileID, FileRetrieveParams { container_id } params, RequestOptionsoptions?): FileRetrieveResponse { id, bytes, container_id, 4 more }
GET/containers/{container_id}/files/{file_id}
Delete a container file
client.containers.files.delete(stringfileID, FileDeleteParams { container_id } params, RequestOptionsoptions?): void
DELETE/containers/{container_id}/files/{file_id}
ModelsExpand Collapse
FileListResponse { id, bytes, container_id, 4 more }
id: string

Unique identifier for the file.

bytes: number

Size of the file in bytes.

container_id: string

The container this file belongs to.

created_at: number

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

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).

FileCreateResponse { id, bytes, container_id, 4 more }
id: string

Unique identifier for the file.

bytes: number

Size of the file in bytes.

container_id: string

The container this file belongs to.

created_at: number

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

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).

FileRetrieveResponse { id, bytes, container_id, 4 more }
id: string

Unique identifier for the file.

bytes: number

Size of the file in bytes.

container_id: string

The container this file belongs to.

created_at: number

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

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
client.containers.files.content.retrieve(stringfileID, ContentRetrieveParams { container_id } params, RequestOptionsoptions?): Response
GET/containers/{container_id}/files/{file_id}/content