Sample - OpenAI API
GET/containers/{container_id}/files/{file_id}

Retrieve a container file

Retrieves metadata for a specific file stored in a container. Use container_id and file_id together to identify the file whose metadata you need. The response includes the file's size, path, source, and creation timestamp.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

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

2 status codes
200Returns the container file object with its identifier, container association, size, creation timestamp, 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`).
429Returned when the request was rejected because a rate limit was exceeded.
errorobjectrequired

Error handling

A 429 is returned when the request rate exceeds the allowed limit. Both container_id and file_id must identify the requested container file.