List Files
beta.files.list(**kwargs) -> Page<FileMetadata { id, created_at, filename, 4 more } >
/v1/files?beta=true
List Files
Parameters
after_id: String
ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.
before_id: String
ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.
limit: Integer
Number of items to return per page.
Defaults to 20. Ranges from 1 to 1000.
maximum1000
minimum1
Returns
List Files
Ruby
require "anthropic"
anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")
page = anthropic.beta.files.list
puts(page){
"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
{
"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"
}