Containers

Retrieve a container file

Returns the metadata of a single file in a container.

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

Path parameters

container_idstring required

The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own -r<nonce>-suffixed id. A session-derived id is always sess_ + the sanitized session key, which is not necessarily the raw session id that was sent.

Example:sess_abc123

The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own -r<nonce>-suffixed id. A session-derived id is always sess_ + the sanitized session key, which is not necessarily the raw session id that was sent.

file_idstring required

Container file id (cfile_ + base64url of the file path).

Example:cfile_b3V0L3JlcG9ydC5jc3Y

Container file id (cfile_ + base64url of the file path).

Response

The container file.

bytesinteger required

File size in bytes.

container_idstring required

The container the file belongs to — echoes the container_id path parameter (OpenAI field name).

created_atinteger required

Unix timestamp (seconds) when the file was last synced.

idstring required

Container file id: cfile_ + base64url of the file path.

object'container.file' required
pathstring required

Container-relative file path.

source'assistant' required

Container files are always produced by the assistant sandbox.

Example response

{
  "bytes": 123,
  "container_id": "sess_abc123",
  "created_at": 1755640000,
  "id": "cfile_b3V0L3JlcG9ydC5jc3Y",
  "object": "container.file",
  "path": "out/report.csv",
  "source": "assistant"
}

Changes

No recorded changes to this endpoint across all 204 revisions of this API.