Returns file metadata (content excluded). Commonly used to confirm that the post-upload safety scan status has transitioned to available.
Prerequisites
Endpoint and authentication are configured. See Overview and authentication.
Endpoint
GET /files/{file_id}
Returns file metadata (filename, size_bytes, mime_type, created_at, status); content is not included. The scope field is returned only on session-sandbox internal copies.
Status values
status reports the safety scan result. Values: available (passed; mountable into sessions), checking (in progress), rejected (content failed review), type_rejected (file type unsupported). Only files with status available can be mounted into a session or referenced as message content.
Request example
Response example
Response fields
| Field | Type | Description |
|---|---|---|
id | string | File ID, formatted as file_<id> |
type | string | Fixed value file |
filename | string | File name |
mime_type | string | MIME type detected by the server |
size_bytes | int | File size in bytes |
downloadable | bool | Whether the file is downloadable. For direct uploads through this endpoint and session-sandbox copies, this is always false. |
status | string | Safety scan status: available / checking / rejected / type_rejected |
scope | object | Returned only for session-sandbox internal copies; shape {"type": "session", "id": "sesn_..."}. Regular uploaded files do not include this field. |
created_at | string | Upload time, ISO 8601 |
requestId | string | Unique identifier for this request |