GET/containers/{container_id}/files/{file_id}

Retrieve a file from a container

Retrieves a file's metadata from a container. Use container_id and file_id to identify the container and file whose details you need.

2 parameters
container_idstringrequired
The identifier of the container that holds the file.
file_idstringrequired
The identifier of the file to retrieve.

3 status codes
200Returns the container file object, including its identifier, container, creation time, size in bytes, path, and source.
idstringrequired
Unique identifier for the file.
objectstringrequired
The type of this object (`container.file`).
container_idstringrequired
The container this file belongs to.
created_atintegerrequired
Unix timestamp (in seconds) when the file was created.
bytesintegerrequired
Size of the file in bytes.
pathstringrequired
Path of the file in the container.
sourcestringrequired
Source of the file (e.g., `user`, `assistant`).
404Returned when the container was not found or has expired, or the file was not found in the container.
errorobjectrequired
429Returned when the request exceeds a rate limit.
errorobjectrequired

Error handling

A 404 is returned when the container was not found or has expired, or when the file was not found in the container. A 429 is returned when the request exceeds a rate limit. The container_id and file_id path parameters must identify the container and file to retrieve.