Get File Metadata
beta.files.retrieve_metadata(strfile_id, FileRetrieveMetadataParams**kwargs) -> FileMetadata
/v1/files/{file_id}?beta=true
Get File Metadata
Parameters
file_id: str
ID of the File.
Returns
Get File Metadata
Python
from anthropic import Anthropic
client = Anthropic(
api_key="my-anthropic-api-key",
)
file_metadata = client.beta.files.retrieve_metadata(
file_id="file_id",
)
print(file_metadata.id){
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"filename": "x",
"mime_type": "x",
"size_bytes": 0,
"type": "file",
"downloadable": true
}Returns Examples
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"filename": "x",
"mime_type": "x",
"size_bytes": 0,
"type": "file",
"downloadable": true
}