SPB Git

Repository Public

retrieve.md 2.6 KB 138 lines markdown

1> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.23## Retrieve container45**get** `/containers/{container_id}`67Retrieve Container89### Path Parameters1011- `container_id: string`1213### Returns1415- `id: string`1617  Unique identifier for the container.1819- `created_at: number`2021  Unix timestamp (in seconds) when the container was created.2223- `name: string`2425  Name of the container.2627- `object: string`2829  The type of this object.3031- `status: string`3233  Status of the container (e.g., active, deleted).3435- `expires_after: optional object { anchor, minutes }`3637  The container will expire after this time period.38  The anchor is the reference point for the expiration.39  The minutes is the number of minutes after the anchor before the container expires.4041  - `anchor: optional "last_active_at"`4243    The reference point for the expiration.4445    - `"last_active_at"`4647  - `minutes: optional number`4849    The number of minutes after the anchor before the container expires.5051- `last_active_at: optional number`5253  Unix timestamp (in seconds) when the container was last active.5455- `memory_limit: optional "1g" or "4g" or "16g" or "64g"`5657  The memory limit configured for the container.5859  - `"1g"`6061  - `"4g"`6263  - `"16g"`6465  - `"64g"`6667- `network_policy: optional object { type, allowed_domains }`6869  Network access policy for the container.7071  - `type: "allowlist" or "disabled"`7273    The network policy mode.7475    - `"allowlist"`7677    - `"disabled"`7879  - `allowed_domains: optional array of string`8081    Allowed outbound domains when `type` is `allowlist`.8283### Example8485```http86curl https://api.openai.com/v1/containers/$CONTAINER_ID \87    -H "Authorization: Bearer $OPENAI_API_KEY"88```8990#### Response9192```json93{94  "id": "id",95  "created_at": 0,96  "name": "name",97  "object": "object",98  "status": "status",99  "expires_after": {100    "anchor": "last_active_at",101    "minutes": 0102  },103  "last_active_at": 0,104  "memory_limit": "1g",105  "network_policy": {106    "type": "allowlist",107    "allowed_domains": [108      "string"109    ]110  }111}112```113114### Example115116```http117curl https://api.openai.com/v1/containers/cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863 \118  -H "Authorization: Bearer $OPENAI_API_KEY"119```120121#### Response122123```json124{125    "id": "cntr_682dfebaacac8198bbfe9c2474fb6f4a085685cbe3cb5863",126    "object": "container",127    "created_at": 1747844794,128    "status": "running",129    "expires_after": {130        "anchor": "last_active_at",131        "minutes": 20132    },133    "last_active_at": 1747844794,134    "memory_limit": "4g",135    "name": "My Container"136}137```138
Files main
Menu

Theme