List Files
client.beta.files.list(FileListParams { after_id, before_id, limit, betas } params?, RequestOptionsoptions?): Page<FileMetadata { id, created_at, filename, 4 more } >
/v1/files
List Files
Parameters
Returns
List Files
import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic({
apiKey: 'my-anthropic-api-key',
});
// Automatically fetches more pages as needed.
for await (const fileMetadata of client.beta.files.list()) {
console.log(fileMetadata.id);
}Response 200
{
"data": [
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"filename": "x",
"mime_type": "x",
"size_bytes": 0,
"type": "file",
"downloadable": true
}
],
"first_id": "first_id",
"has_more": true,
"last_id": "last_id"
}Returns Examples
Response 200
{
"data": [
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"filename": "x",
"mime_type": "x",
"size_bytes": 0,
"type": "file",
"downloadable": true
}
],
"first_id": "first_id",
"has_more": true,
"last_id": "last_id"
}