Retrieve a container file
Returns the metadata of a single file in a container.
Request
- Base URLhttps://openrouter.ai/api/v1
- AuthHTTP bearer
Path parameters
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.
Container file id (cfile_ + base64url of the file path).
Response
The container file.
File size in bytes.
The container the file belongs to — echoes the container_id path parameter (OpenAI field name).
Unix timestamp (seconds) when the file was last synced.
Container file id: cfile_ + base64url of the file path.
Container-relative file path.
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 operation across all 732 revisions of this API.