Get File Metadata
beta.files.retrieve_metadata(strfile_id, FileRetrieveMetadataParams**kwargs) -> FileMetadata
/v1/files/{file_id}
Get File Metadata
Parameters
Returns
Get File Metadata
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)Response 200
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"filename": "x",
"mime_type": "x",
"size_bytes": 0,
"type": "file",
"downloadable": true
}Returns Examples
Response 200
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"filename": "x",
"mime_type": "x",
"size_bytes": 0,
"type": "file",
"downloadable": true
}