Get File Metadata
FileMetadata beta().files().retrieveMetadata(FileRetrieveMetadataParamsparams = FileRetrieveMetadataParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
/v1/files/{file_id}?beta=true
Get File Metadata
Parameters
Returns
Get File Metadata
Java
package com.anthropic.example;
import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.beta.files.FileMetadata;
import com.anthropic.models.beta.files.FileRetrieveMetadataParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
AnthropicClient client = AnthropicOkHttpClient.fromEnv();
FileMetadata fileMetadata = client.beta().files().retrieveMetadata("file_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
}