SpyBara
Go Premium

resources/containers/subresources/files/methods/retrieve/index.md 2026-07-10 23:02 UTC to 2026-07-12 06:58 UTC

3 added, 5 removed.

2026
Thu 23 18:00 Wed 22 20:02 Mon 20 20:00 Fri 17 17:00 Thu 16 20:57 Wed 15 02:58 Tue 14 06:58 Mon 13 15:59 Sun 12 06:58 Fri 10 23:02 Thu 9 20:58 Tue 7 08:02

Retrieve container file

get /containers/{container_id}/files/{file_id}

Retrieve Container File

Path Parameters

  • container_id: string

  • file_id: string

Returns

  • 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: string

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

Example

curl https://api.openai.com/v1/containers/$CONTAINER_ID/files/$FILE_ID \
    -H "Authorization: Bearer $OPENAI_API_KEY"

Response

{
  "id": "id",
  "bytes": 0,
  "container_id": "container_id",
  "created_at": 0,
  "object": "object",
  "path": "path",
  "source": "source"
}

Example

curl https://api.openai.com/v1/containers/container_123/files/file_456 \
  -H "Authorization: Bearer $OPENAI_API_KEY"

Response

{
    "id": "cfile_682e0e8a43c88191a7978f477a09bdf5",
    "object": "container.file",
    "created_at": 1747848842,
    "bytes": 880,
    "container_id": "cntr_682e0e7318108198aa783fd921ff305e08e78805b9fdbb04",
    "path": "/mnt/data/88e12fa445d32636f190a0b33daed6cb-tsconfig.json",
    "source": "user"
}