Retrieve File

Fetch metadata for a previously uploaded file.

Fetch metadata for an uploaded file. Returns the same FileObject shape as the upload response.

GET /v1/files/:file_id

Use this when you only need to know bytes, expires_at, purpose, etc. - it does not download the file content. For raw bytes, see Retrieve file content.

Path parameters

file_idstringrequired

The id of the file (prefixed file-).

Response

idstringoptional

The file id.

object'file'optional
bytesintegeroptional
created_atintegeroptional
filenamestringoptional
purposestringoptional
statusstringoptional
expires_atintegeroptional

Only present when set at upload time.

Errors

StatusReason
404No such File object: <id> - id does not exist or is owned by another user.